179 |
Command(cmd); |
Command(cmd); |
180 |
} |
} |
181 |
|
|
|
int ModemTransceiver::DeleteAllSms() |
|
|
{ |
|
|
vector<SMS> sms = ReadSms(true); |
|
|
|
|
|
for (unsigned int i= 0; i<sms.size(); ++i) |
|
|
{ |
|
|
DeleteSms( sms[i].GetIndex() ); |
|
|
} |
|
|
return sms.size(); |
|
|
} |
|
|
|
|
|
|
|
182 |
|
|
183 |
void ModemTransceiver::WaitForSimcard() |
void ModemTransceiver::WaitForSimcard() |
184 |
{ |
{ |
200 |
|
|
201 |
void ModemTransceiver::HandlePincode() |
void ModemTransceiver::HandlePincode() |
202 |
{ |
{ |
203 |
string pin = Common::instance()->GetConfigfile()->GetValue("gsmmodem","pin"); |
string pin = Common::instance()->GetConfigfile()->GetValue("gsmmodem","pin",""); |
204 |
|
|
205 |
string result = Command("AT+CPIN?"); |
string result = Command("AT+CPIN?"); |
206 |
result = Util::str_trim(result); |
result = Util::str_trim(result); |
283 |
timestamp = Util::str_replace(timestamp, "\""); |
timestamp = Util::str_replace(timestamp, "\""); |
284 |
sms.SetTimestamp(timestamp); |
sms.SetTimestamp(timestamp); |
285 |
|
|
286 |
sms.SetMessage( body ); |
sms.SetMessage( Util::str_gsm2latin(body) ); |
287 |
|
|
288 |
return sms; |
return sms; |
289 |
} |
} |
302 |
|
|
303 |
sms.SetIndex(index); |
sms.SetIndex(index); |
304 |
|
|
305 |
|
sms.SetMessage( Util::str_gsm2latin(sms.GetMessage()) ) ; |
306 |
|
|
307 |
return sms; |
return sms; |
308 |
} |
} |
309 |
|
|