1 //*********************************************************
2 //
3 // Copyright (c) Microsoft. All rights reserved.
4 // This code is licensed under the MIT License (MIT).
5 // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
6 // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
7 // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
8 // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
9 //
10 //*********************************************************
11 using System;
12 
13 namespace VoipTasks.BackgroundOperations
14 {
15     public enum BackgroundRequest
16     {
17         NewOutgoingCall,
18         EndCall,
19         GetCallDuration,
20         StartVideo,
21         EndVideo,
22 
23         //Account request
24         GetAccountInfo,
25         ModifyAccount,
26 
27         //Endpoint request
28         StartService,
29         StopService,
30 
31         // Always keep this as the last option
32         InValid
33     }
34 
35     public enum ForegroundReguest
36     {
37         UpdateCallState,
38         UpdateAcccountInfo,
39         UpdateRegState,
40         InValid
41     }
42 
43     public enum NewCallArguments
44     {
45         DstURI
46     }
47 
48     public enum ModifyAccountArguments
49     {
50         id,
51         registrar,
52         proxy,
53         username,
54         password
55     }
56 
57     public enum UpdateCallStateArguments
58     {
59         CallState
60     }
61 
62     public enum UpdateRegStateArguments
63     {
64         RegState
65     }
66 
67     public enum UpdateAccountInfoArguments
68     {
69         id,
70         registrar,
71         proxy,
72         username,
73         password
74     }
75 
76     public enum OperationResult
77     {
78         Succeeded,
79         Failed
80     }
81 
82     public static class BackgroundOperation
83     {
84         public static String AppServiceName
85         {
86             get { return _appServiceName; }
87         }
88 
89         public static String NewBackgroundRequest
90         {
91             get { return _newBackgroundRequest; }
92         }
93 
94         public static String Result
95         {
96             get { return _result; }
97         }
98 
99         const String _appServiceName = "VoipTasks.AppService";
100         const String _newBackgroundRequest = "NewBackgroundRequest";
101         const String _result = "Result";
102     }
103 
104     public static class ForegroundOperation
105     {
106         public static String NewForegroundRequest
107         {
108             get { return _newForegroundRequest; }
109         }
110         const String _newForegroundRequest = "NewForegroundRequest";
111     }
112 }
113