author | zautrix <zautrix> | 2004-08-07 17:24:40 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-07 17:24:40 (UTC) |
commit | 88b0d33b8b0b1f6ae320cfc863ca6a47fa8fec22 (patch) (unidiff) | |
tree | 6331418973714243beb674abc87692277b83869d /gammu/emb/common/service/gsmcall.h | |
parent | ef8a09ce74ad3f0a51484d03fdf009bd5b3677bf (diff) | |
download | kdepimpi-88b0d33b8b0b1f6ae320cfc863ca6a47fa8fec22.zip kdepimpi-88b0d33b8b0b1f6ae320cfc863ca6a47fa8fec22.tar.gz kdepimpi-88b0d33b8b0b1f6ae320cfc863ca6a47fa8fec22.tar.bz2 |
Initial revision
Diffstat (limited to 'gammu/emb/common/service/gsmcall.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | gammu/emb/common/service/gsmcall.h | 185 |
1 files changed, 185 insertions, 0 deletions
diff --git a/gammu/emb/common/service/gsmcall.h b/gammu/emb/common/service/gsmcall.h new file mode 100644 index 0000000..c5032a5 --- a/dev/null +++ b/gammu/emb/common/service/gsmcall.h | |||
@@ -0,0 +1,185 @@ | |||
1 | /* (c) 2002-2003 by Marcin Wiacek */ | ||
2 | |||
3 | #ifndef _gsm_call_h | ||
4 | #define _gsm_call_h | ||
5 | |||
6 | #include "../misc/misc.h" | ||
7 | |||
8 | /* ------------------ call info -------------------------------------------- */ | ||
9 | |||
10 | /** | ||
11 | * Enum with status of call. | ||
12 | */ | ||
13 | typedef enum { | ||
14 | /** | ||
15 | * Somebody calls to us | ||
16 | */ | ||
17 | GSM_CALL_IncomingCall=1, | ||
18 | /** | ||
19 | * We call somewhere | ||
20 | */ | ||
21 | GSM_CALL_OutgoingCall, | ||
22 | /** | ||
23 | * Call started | ||
24 | */ | ||
25 | GSM_CALL_CallStart, | ||
26 | /** | ||
27 | * End of call from unknown side | ||
28 | */ | ||
29 | GSM_CALL_CallEnd, | ||
30 | /** | ||
31 | * End of call from remote side | ||
32 | */ | ||
33 | GSM_CALL_CallRemoteEnd, | ||
34 | /** | ||
35 | * End of call from our side | ||
36 | */ | ||
37 | GSM_CALL_CallLocalEnd, | ||
38 | /** | ||
39 | * Call established. Waiting for answer or dropping | ||
40 | */ | ||
41 | GSM_CALL_CallEstablished, | ||
42 | /** | ||
43 | * Call held | ||
44 | */ | ||
45 | GSM_CALL_CallHeld, | ||
46 | /** | ||
47 | * Call resumed | ||
48 | */ | ||
49 | GSM_CALL_CallResumed, | ||
50 | /** | ||
51 | * We switch to call | ||
52 | */ | ||
53 | GSM_CALL_CallSwitched | ||
54 | } GSM_CallStatus; | ||
55 | |||
56 | /** | ||
57 | * Call information. | ||
58 | */ | ||
59 | typedef struct { | ||
60 | /** | ||
61 | * Call status. | ||
62 | */ | ||
63 | GSM_CallStatus Status; | ||
64 | /** | ||
65 | * Remote phone number. | ||
66 | */ | ||
67 | char PhoneNumber [(GSM_MAX_NUMBER_LENGTH+1)*2]; | ||
68 | /** | ||
69 | * Call ID | ||
70 | */ | ||
71 | int CallID; | ||
72 | /** | ||
73 | * Whether Call ID is available. | ||
74 | */ | ||
75 | bool CallIDAvailable; | ||
76 | /** | ||
77 | * Status code. | ||
78 | */ | ||
79 | int StatusCode; | ||
80 | } GSM_Call; | ||
81 | |||
82 | /* --------------- Data structures for the call divert -------------------- */ | ||
83 | |||
84 | /** | ||
85 | * Defines when diversion is active. | ||
86 | */ | ||
87 | typedef enum { | ||
88 | /** | ||
89 | * Divert when busy. | ||
90 | */ | ||
91 | GSM_DIVERT_Busy = 0x01, | ||
92 | /** | ||
93 | * Divert when not answered. | ||
94 | */ | ||
95 | GSM_DIVERT_NoAnswer, | ||
96 | /** | ||
97 | * Divert when phone off or no coverage. | ||
98 | */ | ||
99 | GSM_DIVERT_OutOfReach, | ||
100 | /** | ||
101 | * Divert all calls without ringing. | ||
102 | */ | ||
103 | GSM_DIVERT_AllTypes | ||
104 | } GSM_Divert_DivertTypes; | ||
105 | |||
106 | /** | ||
107 | * Which type of calls should be diverted. | ||
108 | */ | ||
109 | typedef enum { | ||
110 | /** | ||
111 | * Voice calls. | ||
112 | */ | ||
113 | GSM_DIVERT_VoiceCalls = 0x01, | ||
114 | /** | ||
115 | * Fax calls. | ||
116 | */ | ||
117 | GSM_DIVERT_FaxCalls, | ||
118 | /** | ||
119 | * Data calls. | ||
120 | */ | ||
121 | GSM_DIVERT_DataCalls, | ||
122 | /** | ||
123 | * All calls. | ||
124 | */ | ||
125 | GSM_DIVERT_AllCalls | ||
126 | } GSM_Divert_CallTypes; | ||
127 | |||
128 | /** | ||
129 | * Call diversion definition. | ||
130 | */ | ||
131 | typedef struct { | ||
132 | /** | ||
133 | * When diversion is active. | ||
134 | */ | ||
135 | GSM_Divert_DivertTypes DivertType; | ||
136 | /** | ||
137 | * Type of call to divert. | ||
138 | */ | ||
139 | GSM_Divert_CallTypes CallType; | ||
140 | /** | ||
141 | * Number where to divert. | ||
142 | */ | ||
143 | char Number[(GSM_MAX_NUMBER_LENGTH+1)*2]; | ||
144 | /** | ||
145 | * Timeout for diversion. | ||
146 | */ | ||
147 | unsigned int Timeout; | ||
148 | } GSM_CallDivert; | ||
149 | |||
150 | /** | ||
151 | * Multiple call diversions. | ||
152 | */ | ||
153 | typedef struct { | ||
154 | GSM_CallDivert Request; | ||
155 | struct { | ||
156 | int EntriesNum; | ||
157 | GSM_CallDivertEntries[10]; | ||
158 | } Response; | ||
159 | } GSM_MultiCallDivert; | ||
160 | |||
161 | /* -------------------------------- dial voice ---------------------------- */ | ||
162 | |||
163 | /** | ||
164 | * How to handle number when initiating voice call. | ||
165 | */ | ||
166 | typedef enum { | ||
167 | /** | ||
168 | * Show number. | ||
169 | */ | ||
170 | GSM_CALL_ShowNumber = 1, | ||
171 | /** | ||
172 | * Hide number. | ||
173 | */ | ||
174 | GSM_CALL_HideNumber, | ||
175 | /** | ||
176 | * Keep phone default settings. | ||
177 | */ | ||
178 | GSM_CALL_DefaultNumberPresence | ||
179 | } GSM_CallShowNumber; | ||
180 | |||
181 | #endif | ||
182 | |||
183 | /* How should editor hadle tabs in this file? Add editor commands here. | ||
184 | * vim: noexpandtab sw=8 ts=8 sts=8: | ||
185 | */ | ||