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