Imported gammu 0.90.7
[gammu.git] / common / service / gsmcall.h
blobc8265ab95eaaceddd805042a4f568033e461bff7
1 #ifndef _gsm_call_h
2 #define _gsm_call_h
4 #include "../misc/misc.h"
6 /* ------------------ call info -------------------------------------------- */
8 /**
9 * Status of call.
11 typedef enum {
12 /**
13 * Somebody calls to us
15 GN_CALL_IncomingCall=1,
16 /**
17 * We call somewhere
19 GN_CALL_OutgoingCall,
20 /**
21 * Call started
23 GN_CALL_CallStart,
24 /**
25 * End of call from unknown side
27 GN_CALL_CallEnd,
28 /**
29 * End of call from remote side
31 GN_CALL_CallRemoteEnd,
32 /**
33 * End of call from our side
35 GN_CALL_CallLocalEnd,
36 /**
37 * Call established. Waiting for answer or dropping
39 GN_CALL_CallEstablished,
40 /**
41 * Call held
43 GN_CALL_CallHeld,
44 /**
45 * Call resumed
47 GN_CALL_CallResumed,
48 /**
49 * We switch to call
51 GN_CALL_CallSwitched
52 } GSM_CallStatus;
54 /**
55 * Call information.
57 typedef struct {
58 /**
59 * Call status.
61 GSM_CallStatus Status;
62 /**
63 * Remote phone number.
65 char PhoneNumber [(GSM_MAX_NUMBER_LENGTH+1)*2];
66 /**
67 * Call ID
69 int CallID;
70 /**
71 * Whether Call ID is available.
73 bool CallIDAvailable;
74 /**
75 * Status code.
77 int StatusCode;
78 } GSM_Call;
80 /* --------------- Data structures for the call divert -------------------- */
82 /**
83 * Defines when diversion is active.
85 typedef enum {
86 /**
87 * Divert when busy.
89 GSM_CDV_Busy = 0x01,
90 /**
91 * Divert when not answered.
93 GSM_CDV_NoAnswer,
94 /**
95 * Divert when phone off or no coverage.
97 GSM_CDV_OutOfReach,
98 /**
99 * Divert all calls without ringing.
101 GSM_CDV_AllTypes
102 } GSM_CDV_DivertTypes;
105 * Which type of calls should be diverted.
107 typedef enum {
109 * Voice calls.
111 GSM_CDV_VoiceCalls = 0x01,
113 * Fax calls.
115 GSM_CDV_FaxCalls,
117 * Data calls.
119 GSM_CDV_DataCalls,
121 * All calls.
123 GSM_CDV_AllCalls
124 } GSM_CDV_CallTypes;
127 * Call diversion definition.
129 typedef struct {
131 * When diversion is active.
133 GSM_CDV_DivertTypes DType;
135 * Type of call to divert.
137 GSM_CDV_CallTypes CType;
139 * Number where to divert.
141 char Number[(GSM_MAX_NUMBER_LENGTH+1)*2];
143 * Timeout for diversion.
145 unsigned int Timeout;
146 } GSM_CallDivert;
149 * Multiple call diversions.
151 typedef struct {
152 GSM_CallDivert Request;
153 struct {
154 int EntriesNum;
155 GSM_CallDivert Entries[10];
156 } Response;
157 } GSM_MultiCallDivert;
159 /* -------------------------------- dial voice ---------------------------- */
162 * How to handle number when initiating voice call.
164 typedef enum {
166 * Show number.
168 GN_CALL_ShowNumber = 1,
170 * Hide number.
172 GN_CALL_HideNumber,
174 * Keep phone default settings.
176 GN_CALL_Default
177 } GSM_CallShowNumber;
179 #endif
181 /* How should editor hadle tabs in this file? Add editor commands here.
182 * vim: noexpandtab sw=8 ts=8 sts=8: