48
46
// Static ME information (AT command sequences given in brackets)
51
string _manufacturer; // (+CGMI)
52
string _model; // (+CGMM)
53
string _revision; // (+CGMR)
54
string _serialNumber; // (+CGSN), IMEI
49
std::string _manufacturer; // (+CGMI)
50
std::string _model; // (+CGMM)
51
std::string _revision; // (+CGMR)
52
std::string _serialNumber; // (+CGSN), IMEI
57
55
// modes for network operation selection
102
100
bool _active; // status in the network
103
101
FacilityClass _cl; // voice, fax, or data
104
string _number; // telephone number
105
string _subAddr; // subaddress
102
std::string _number; // telephone number
103
std::string _subAddr; // subaddress
106
104
int _time; // time in the range 1..30 (for NoReplyReason)
107
105
ForwardReason _reason; // reason for the forwarding
111
109
typedef Ref<SMSStore> SMSStoreRef;
112
typedef vector<SMSStoreRef> SMSStoreVector;
110
typedef std::vector<SMSStoreRef> SMSStoreVector;
114
112
// this class allows access to all functions of a ME/TA as described
115
113
// in sections 5-8 of ETSI GSM 07.07
123
121
Ref<GsmAt> _at; // chat object for the port
124
122
PhonebookVector _phonebookCache; // cache of all used phonebooks
125
123
SMSStoreVector _smsStoreCache; // cache of all used phonebooks
126
string _lastPhonebookName; // remember last phonebook set on ME/TA
127
string _lastSMSStoreName; // remember last SMS store set on ME/TA
124
std::string _lastPhonebookName; // remember last phonebook set on ME/TA
125
std::string _lastSMSStoreName; // remember last SMS store set on ME/TA
128
126
Capabilities _capabilities; // ME/TA quirks
129
127
GsmEvent _defaultEventHandler; // default event handler
130
128
// see comments in MeTa::init()
131
string _lastCharSet; // remember last character set
129
std::string _lastCharSet; // remember last character set
133
131
// init ME/TA to sensible defaults
134
132
void init() throw(GsmException);
143
141
// set the current phonebook in the ME
144
142
// remember the last phonebook set for optimisation
145
void setPhonebook(string phonebookName) throw(GsmException);
143
void setPhonebook(std::string phonebookName) throw(GsmException);
147
145
// set the current SMS store in the ME
148
146
// set storeTypes to
151
149
// 3 to preferred store for receiving SMS (includes types 1 and 2)
152
150
// remember the last SMS store set for optimisation
153
151
// if needResultCode is set this optimisation is not done
154
string setSMSStore(string smsStore, int storeTypes,
152
std::string setSMSStore(std::string smsStore, int storeTypes,
155
153
bool needResultCode = false)
156
154
throw(GsmException);
158
156
// get current SMS store settings
159
void getSMSStore(string &readDeleteStore,
160
string &writeSendStore,
161
string &receiveStore) throw(GsmException);
157
void getSMSStore(std::string &readDeleteStore,
158
std::string &writeSendStore,
159
std::string &receiveStore) throw(GsmException);
163
161
// get capabilities of this ME/TA
164
162
Capabilities getCapabilities() const {return _capabilities;}
182
180
MEInfo getMEInfo() throw(GsmException);
184
182
// return available character sets
185
vector<string> getSupportedCharSets() throw(GsmException);// (+CSCS=?)
183
std::vector<std::string> getSupportedCharSets() throw(GsmException);// (+CSCS=?)
187
185
// return current character set (default: GSM)
188
string getCurrentCharSet() throw(GsmException);// (+CSCS?)
186
std::string getCurrentCharSet() throw(GsmException);// (+CSCS?)
190
188
// set character set to use
191
void setCharSet(string charSetName) throw(GsmException);// (+CSCS=)
189
void setCharSet(std::string charSetName) throw(GsmException);// (+CSCS=)
193
191
// *** ETSI GSM 07.07 Section 6: "Call control commands and methods"
195
193
// get extended error report
196
string getExtendedErrorReport() throw(GsmException);// (+CEER)
194
std::string getExtendedErrorReport() throw(GsmException);// (+CEER)
198
196
// dial a number, CLI presentation as defined in network
199
void dial(string number) throw(GsmException);// (ATD)
197
void dial(std::string number) throw(GsmException);// (ATD)
202
200
void answer() throw(GsmException); // (ATA)
205
203
void hangup() throw(GsmException); // (ATH)
207
205
// set Personal Identification Number
208
void setPIN(string number) throw(GsmException);// (+CPIN)
206
void setPIN(std::string number) throw(GsmException);// (+CPIN)
210
208
// get PIN Status
211
string getPINStatus() throw(GsmException);// (+CPIN?)
209
std::string getPINStatus() throw(GsmException);// (+CPIN?)
213
211
// *** ETSI GSM 07.07 Section 7: "Network service related commands"
215
213
// return available network operators
216
214
// this fills in all fields of OPInfo with the exception of _mode
217
vector<OPInfo> getAvailableOPInfo() throw(GsmException); // (+COPS=?)
215
std::vector<OPInfo> getAvailableOPInfo() throw(GsmException); // (+COPS=?)
219
217
// return current network operators
220
218
// this fills in all the fields of OPInfo with the exception of _status
225
223
// of getCurrentOPInfo() or getAvailableOPInfo()
226
224
// (because ME/TA might not implement all names)
227
225
void setCurrentOPInfo(OPModes mode,
228
string longName = "",
229
string shortName = "",
226
std::string longName = "",
227
std::string shortName = "",
230
228
int numericName = NOT_SET) throw(GsmException);
232
230
// get facility lock capabilities (+CLCK)
233
vector<string> getFacilityLockCapabilities() throw(GsmException);
231
std::vector<std::string> getFacilityLockCapabilities() throw(GsmException);
235
233
// query facility lock status for named facility
236
bool getFacilityLockStatus(string facility, FacilityClass cl)
234
bool getFacilityLockStatus(std::string facility, FacilityClass cl)
237
235
throw(GsmException);
240
void lockFacility(string facility, FacilityClass cl, string passwd = "")
238
void lockFacility(std::string facility, FacilityClass cl, std::string passwd = "")
241
239
throw(GsmException);
243
241
// unlock facility
244
void unlockFacility(string facility, FacilityClass cl, string passwd = "")
242
void unlockFacility(std::string facility, FacilityClass cl, std::string passwd = "")
245
243
throw(GsmException);
247
245
// return names of facility for which a password can be set
248
246
// and the maximum length of the respective password
249
vector<PWInfo> getPasswords() throw(GsmException);// (+CPWD=?)
247
std::vector<PWInfo> getPasswords() throw(GsmException);// (+CPWD=?)
251
249
// set password for the given facility
252
void setPassword(string facility, string oldPasswd, string newPasswd)
250
void setPassword(std::string facility, std::string oldPasswd, std::string newPasswd)
253
251
throw(GsmException);
266
264
// set call forwarding
267
265
void setCallForwarding(ForwardReason reason,
268
266
ForwardMode mode,
271
269
FacilityClass cl = (FacilityClass)ALL_FACILITIES,
272
270
int forwardTime = NOT_SET)
273
271
throw(GsmException); // (+CCFC=)
318
316
int getBitErrorRate() throw(GsmException);
320
318
// get available phone book memory storage strings (+CPBS=?)
321
vector<string> getPhoneBookStrings() throw(GsmException);
319
std::vector<std::string> getPhoneBookStrings() throw(GsmException);
323
321
// get phone book given the phone book memory storage string
324
PhonebookRef getPhonebook(string phonebookString,
322
PhonebookRef getPhonebook(std::string phonebookString,
325
323
bool preload = false) throw(GsmException);
328
326
// *** ETSI GSM 07.05 SMS functions
330
328
// return service centre address (+CSCA?)
331
string getServiceCentreAddress() throw(GsmException);
329
std::string getServiceCentreAddress() throw(GsmException);
333
331
// set service centre address (+CSCA=)
334
void setServiceCentreAddress(string sca) throw(GsmException);
332
void setServiceCentreAddress(std::string sca) throw(GsmException);
336
334
// return names of available message stores (<mem1>, +CPMS=?)
337
vector<string> getSMSStoreNames() throw(GsmException);
335
std::vector<std::string> getSMSStoreNames() throw(GsmException);
339
337
// return SMS store given the name
340
SMSStoreRef getSMSStore(string storeName) throw(GsmException);
338
SMSStoreRef getSMSStore(std::string storeName) throw(GsmException);
342
340
// send a single SMS message
343
341
void sendSMS(Ref<SMSSubmitMessage> smsMessage) throw(GsmException);
349
347
// are sent. If concatenatedMessageId is != -1 this is used as the message
350
348
// ID for concatenated SMS (for this a user data header as defined in
351
349
// GSM GTS 3.40 is used, the old UDH in the template is overwritten).
352
void sendSMSs(Ref<SMSSubmitMessage> smsTemplate, string text,
350
void sendSMSs(Ref<SMSSubmitMessage> smsTemplate, std::string text,
353
351
bool oneSMS = false,
354
352
int concatenatedMessageId = -1)
355
353
throw(GsmException);