Gammu internals  1.33.90
api.c
Go to the documentation of this file.
1 #include <string.h>
2 
3 #include <gammu.h>
4 #include "gsmstate.h"
5 #include "debug.h"
6 
7 #ifdef __FUNCTION__WORKING
8 #define PRINT_FUNCTION_START smprintf(s, "Entering %s\n", __FUNCTION__);
9 #define PRINT_FUNCTION_END smprintf(s, "Leaving %s\n", __FUNCTION__);
10 #else
11 #define PRINT_FUNCTION_START smprintf(s, "Entering %s:%d\n", __FILE__, __LINE__);
12 #define PRINT_FUNCTION_END smprintf(s, "Leaving %s:%d\n", __FILE__, __LINE__);
13 #endif
14 #define PRINT_MEMORY_INFO() smprintf(s, "Location = %d, Memory type = %s\n", entry->Location, GSM_MemoryTypeToString(entry->MemoryType));
15 #define PRINT_TODO_INFO() smprintf(s, "Location = %d\n", ToDo->Location);
16 #define PRINT_CALENDAR_INFO() smprintf(s, "Location = %d\n", Note->Location);
17 #define PRINT_NOTE_INFO() smprintf(s, "Location = %d\n", Note->Location);
18 #define PRINT_MSMS_INFO() smprintf(s, "Number = %d, Location = %d, Folder = %d\n", sms->Number, sms->SMS[0].Location, sms->SMS[0].Folder);
19 #define PRINT_SMS_INFO() smprintf(s, "Location = %d, Folder = %d\n", sms->Location, sms->Folder);
20 #define PRINT_START() if (start) smprintf(s, "Starting reading!\n");
21 
27 #define PRINT_LOG_ERROR(err) \
28 { \
29  GSM_LogError(s, __FUNCTION__, err); \
30  PRINT_FUNCTION_END \
31 }
32 
37 #define CHECK_PHONE_CONNECTION() \
38 { \
39  PRINT_FUNCTION_START \
40  if (!GSM_IsConnected(s)) { \
41  return ERR_NOTCONNECTED; \
42  } \
43 }
44 
49 #define RUN_RESTARTABLE(return_value, function_call) \
50 { \
51  int restarts; \
52  for (restarts = 0; restarts < 10; ++restarts) { \
53  unsigned useconds = 10000 << restarts; \
54  return_value = (function_call); \
55  if (return_value != ERR_BUSY) \
56  break; \
57  smprintf(s, "Sleeping %d ms before retrying the last command\n", useconds / 1000); \
58  usleep(useconds); \
59  } \
60 }
61 
66 {
67  GSM_Error err;
68 
70 
71  s->Phone.Data.Manufacturer[0] = '\0';
72  err = s->Phone.Functions->GetManufacturer(s);
73  if (value != NULL) {
74  strcpy(value, s->Phone.Data.Manufacturer);
75  }
76 
77  PRINT_LOG_ERROR(err);
78  return err;
79 }
84 {
85  GSM_Error err;
86 
88 
89  s->Phone.Data.Model[0] = '\0';
90  err = s->Phone.Functions->GetModel(s);
91  if (value != NULL) {
92  strcpy(value, s->Phone.Data.Model);
93  }
94 
95  PRINT_LOG_ERROR(err);
96  return err;
97 }
101 GSM_Error GSM_GetFirmware(GSM_StateMachine *s, char *value, char *date, double *num)
102 {
103  GSM_Error err;
104 
106 
107  s->Phone.Data.Version[0] = '\0';
108  err = s->Phone.Functions->GetFirmware(s);
109  if (value != NULL) {
110  strcpy(value, s->Phone.Data.Version);
111  }
112  if (date != NULL) {
113  strcpy(date, s->Phone.Data.VerDate);
114  }
115  if (num != NULL) {
116  *num = s->Phone.Data.VerNum;
117  }
118 
119  PRINT_LOG_ERROR(err);
120  return err;
121 }
126 {
127  GSM_Error err;
128 
130 
131  s->Phone.Data.IMEI[0] = '\0';
132  err = s->Phone.Functions->GetIMEI(s);
133  if (value != NULL) {
134  strcpy(value, s->Phone.Data.IMEI);
135  }
136 
137  PRINT_LOG_ERROR(err);
138  return err;
139 }
144 {
145  GSM_Error err;
146 
148 
149  err = s->Phone.Functions->GetOriginalIMEI(s, value);
150  PRINT_LOG_ERROR(err);
151  return err;
152 }
157 {
158  GSM_Error err;
159 
161 
162  err = s->Phone.Functions->GetManufactureMonth(s, value);
163  PRINT_LOG_ERROR(err);
164  return err;
165 }
170 {
171  GSM_Error err;
172 
174 
175  err = s->Phone.Functions->GetProductCode(s, value);
176  PRINT_LOG_ERROR(err);
177  return err;
178 }
183 {
184  GSM_Error err;
185 
187 
188  err = s->Phone.Functions->GetHardware(s, value);
189  PRINT_LOG_ERROR(err);
190  return err;
191 }
197 {
198  GSM_Error err;
199 
201 
202  err = s->Phone.Functions->GetPPM(s, value);
203  PRINT_LOG_ERROR(err);
204  return err;
205 }
210 {
211  GSM_Error err;
212 
214 
215  err = s->Phone.Functions->GetSIMIMSI(s, IMSI);
216  PRINT_LOG_ERROR(err);
217  return err;
218 }
223 {
224  GSM_Error err;
225 
227 
228  err = s->Phone.Functions->GetDateTime(s, date_time);
229  PRINT_LOG_ERROR(err);
230  return err;
231 }
236 {
237  GSM_Error err;
238 
240 
241  err = s->Phone.Functions->SetDateTime(s, date_time);
242  PRINT_LOG_ERROR(err);
243  return err;
244 }
249 {
250  GSM_Error err;
251 
253 
254  err = s->Phone.Functions->GetAlarm(s, Alarm);
255  PRINT_LOG_ERROR(err);
256  return err;
257 }
262 {
263  GSM_Error err;
264 
266 
267  err = s->Phone.Functions->SetAlarm(s, Alarm);
268  PRINT_LOG_ERROR(err);
269  return err;
270 }
275 {
276  GSM_Error err;
277 
279 
280  err = s->Phone.Functions->GetLocale(s, locale);
281  PRINT_LOG_ERROR(err);
282  return err;
283 }
288 {
289  GSM_Error err;
290 
292 
293  err = s->Phone.Functions->SetLocale(s, locale);
294  PRINT_LOG_ERROR(err);
295  return err;
296 }
301 {
302  GSM_Error err;
303 
305 
306  err = s->Phone.Functions->SetPower(s, on);
307  PRINT_LOG_ERROR(err);
308  return err;
309 }
314 {
315  GSM_Error err;
316 
318 
319  err = s->Phone.Functions->PressKey(s, Key, Press);
320  PRINT_LOG_ERROR(err);
321  return err;
322 }
327 {
328  GSM_Error err;
329 
331 
332  err = s->Phone.Functions->Reset(s, hard);
333  PRINT_LOG_ERROR(err);
334  return err;
335 }
340 {
341  GSM_Error err;
342 
344 
345  err = s->Phone.Functions->ResetPhoneSettings(s, Type);
346  PRINT_LOG_ERROR(err);
347  return err;
348 }
353 {
354  GSM_Error err;
355 
357 
358  err = s->Phone.Functions->EnterSecurityCode(s, Code);
359  PRINT_LOG_ERROR(err);
360  return err;
361 }
366 {
367  GSM_Error err;
368 
370 
371  err = s->Phone.Functions->GetSecurityStatus(s, Status);
372  PRINT_LOG_ERROR(err);
373  return err;
374 }
379 {
380  GSM_Error err;
381 
383 
384  err = s->Phone.Functions->GetDisplayStatus(s, features);
385  PRINT_LOG_ERROR(err);
386  return err;
387 }
392 {
393  GSM_Error err;
394 
396 
397  err = s->Phone.Functions->SetAutoNetworkLogin(s);
398  PRINT_LOG_ERROR(err);
399  return err;
400 }
405 {
406  GSM_Error err;
407 
409 
410  memset(bat, 0, sizeof(GSM_BatteryCharge));
411 
412  err = s->Phone.Functions->GetBatteryCharge(s, bat);
413  PRINT_LOG_ERROR(err);
414  return err;
415 }
420 {
421  GSM_Error err;
422 
424 
425  err = s->Phone.Functions->GetSignalQuality(s, sig);
426  PRINT_LOG_ERROR(err);
427  return err;
428 }
433 {
434  GSM_Error err;
435 
437 
438  netinfo->CID[0] = 0;
439  netinfo->LAC[0] = 0;
440  netinfo->PacketCID[0] = 0;
441  netinfo->PacketLAC[0] = 0;
442  netinfo->State = GSM_NetworkStatusUnknown;
444  netinfo->NetworkName[0] = 0;
445  netinfo->NetworkName[1] = 0;
446  netinfo->NetworkCode[0] = 0;
447  netinfo->GPRS = 0;
448 
449  err = s->Phone.Functions->GetNetworkInfo(s, netinfo);
450  PRINT_LOG_ERROR(err);
451  return err;
452 }
457 {
458  GSM_Error err;
459 
461 
462  err = s->Phone.Functions->GetCategory(s, Category);
463  PRINT_LOG_ERROR(err);
464  return err;
465 }
470 {
471  GSM_Error err;
472 
474 
475  err = s->Phone.Functions->AddCategory(s, Category);
476  PRINT_LOG_ERROR(err);
477  return err;
478 }
483 {
484  GSM_Error err;
485 
487 
488  err = s->Phone.Functions->GetCategoryStatus(s, Status);
489  PRINT_LOG_ERROR(err);
490  return err;
491 }
497 {
498  GSM_Error err;
499 
501 
502  err = s->Phone.Functions->GetMemoryStatus(s, status);
503  PRINT_LOG_ERROR(err);
504  return err;
505 }
511 {
512  GSM_Error err;
513 
516 
517  err = s->Phone.Functions->GetMemory(s, entry);
518  PRINT_LOG_ERROR(err);
519  return err;
520 }
526 {
527  GSM_Error err;
528 
530  PRINT_START();
532 
533  err = s->Phone.Functions->GetNextMemory(s, entry, start);
534  PRINT_LOG_ERROR(err);
535  return err;
536 }
541 {
542  GSM_Error err;
543 
546 
547  RUN_RESTARTABLE(err, s->Phone.Functions->SetMemory(s, entry));
548  PRINT_LOG_ERROR(err);
549  return err;
550 }
555 {
556  GSM_Error err;
557 
560 
561  err = s->Phone.Functions->AddMemory(s, entry);
562  PRINT_LOG_ERROR(err);
563  return err;
564 }
569 {
570  GSM_Error err;
571 
574 
575  RUN_RESTARTABLE(err, s->Phone.Functions->DeleteMemory(s, entry));
576  PRINT_LOG_ERROR(err);
577  return err;
578 }
583 {
584  GSM_Error err;
585 
587 
588  err = s->Phone.Functions->DeleteAllMemory(s, MemoryType);
589  PRINT_LOG_ERROR(err);
590  return err;
591 }
596 {
597  GSM_Error err;
598 
600 
601  err = s->Phone.Functions->GetSpeedDial(s, Speed);
602  PRINT_LOG_ERROR(err);
603  return err;
604 }
609 {
610  GSM_Error err;
611 
613 
614  err = s->Phone.Functions->SetSpeedDial(s, Speed);
615  PRINT_LOG_ERROR(err);
616  return err;
617 }
622 {
623  GSM_Error err;
624 
626 
627  err = s->Phone.Functions->GetSMSC(s, smsc);
628  PRINT_LOG_ERROR(err);
629  return err;
630 }
635 {
636  GSM_Error err;
637 
639 
640  err = s->Phone.Functions->SetSMSC(s, smsc);
641  PRINT_LOG_ERROR(err);
642  return err;
643 }
649 {
650  GSM_Error err;
651 
653 
654  err = s->Phone.Functions->GetSMSStatus(s, status);
655  PRINT_LOG_ERROR(err);
656  return err;
657 }
662 {
663  GSM_Error err;
664 
666  PRINT_MSMS_INFO();
667 
668  err = s->Phone.Functions->GetSMS(s, sms);
669  PRINT_LOG_ERROR(err);
670  return err;
671 }
677 {
678  GSM_Error err;
679 
681  PRINT_START();
682  PRINT_MSMS_INFO();
683 
684  err = s->Phone.Functions->GetNextSMS(s, sms, start);
685  PRINT_LOG_ERROR(err);
686  return err;
687 }
692 {
693  GSM_Error err;
694 
696  PRINT_SMS_INFO();
697 
698  err = s->Phone.Functions->SetSMS(s, sms);
699  PRINT_LOG_ERROR(err);
700  return err;
701 }
706 {
707  GSM_Error err;
708 
710  PRINT_SMS_INFO();
711 
712  err = s->Phone.Functions->AddSMS(s, sms);
713  PRINT_LOG_ERROR(err);
714  return err;
715 }
720 {
721  GSM_Error err;
722 
724  PRINT_SMS_INFO();
725 
726  err = s->Phone.Functions->DeleteSMS(s, sms);
727  PRINT_LOG_ERROR(err);
728  return err;
729 }
734 {
735  GSM_Error err;
736 
738 
739  err = s->Phone.Functions->SendSMS(s, sms);
740  PRINT_LOG_ERROR(err);
741  return err;
742 }
746 GSM_Error GSM_SendSavedSMS(GSM_StateMachine *s, int Folder, int Location)
747 {
748  GSM_Error err;
749 
751  smprintf(s, "Location = %d, Folder = %d\n", Location, Folder);
752 
753  err = s->Phone.Functions->SendSavedSMS(s, Folder, Location);
754  PRINT_LOG_ERROR(err);
755  return err;
756 }
761 {
762  GSM_Error err;
763 
765 
766  err = s->Phone.Functions->SetFastSMSSending(s, enable);
767  PRINT_LOG_ERROR(err);
768  return err;
769 }
774 {
775  GSM_Error err;
776 
778 
779  err = s->Phone.Functions->SetIncomingSMS(s, enable);
780  PRINT_LOG_ERROR(err);
781  return err;
782 }
787 {
788  GSM_Error err;
789 
791 
792  err = s->Phone.Functions->SetIncomingCB(s, enable);
793  PRINT_LOG_ERROR(err);
794  return err;
795 }
800 {
801  GSM_Error err;
802 
804 
805  err = s->Phone.Functions->GetSMSFolders(s, folders);
806  PRINT_LOG_ERROR(err);
807  return err;
808 }
813 {
814  GSM_Error err;
815 
817 
818  err = s->Phone.Functions->AddSMSFolder(s, name);
819  PRINT_LOG_ERROR(err);
820  return err;
821 }
826 {
827  GSM_Error err;
828 
830 
831  err = s->Phone.Functions->DeleteSMSFolder(s, ID);
832  PRINT_LOG_ERROR(err);
833  return err;
834 }
839 {
840  GSM_Error err;
841 
843 
844  err = s->Phone.Functions->DialVoice(s, Number, ShowNumber);
845  PRINT_LOG_ERROR(err);
846  return err;
847 }
852 {
853  GSM_Error err;
854 
856 
857  err = s->Phone.Functions->DialService(s, Number);
858  PRINT_LOG_ERROR(err);
859  return err;
860 }
865 {
866  GSM_Error err;
867 
869 
870  err = s->Phone.Functions->AnswerCall(s, ID, all);
871  PRINT_LOG_ERROR(err);
872  return err;
873 }
878 {
879  GSM_Error err;
880 
882 
883  err = s->Phone.Functions->CancelCall(s, ID, all);
884  PRINT_LOG_ERROR(err);
885  return err;
886 }
891 {
892  GSM_Error err;
893 
895 
896  err = s->Phone.Functions->HoldCall(s, ID);
897  PRINT_LOG_ERROR(err);
898  return err;
899 }
904 {
905  GSM_Error err;
906 
908 
909  err = s->Phone.Functions->UnholdCall(s, ID);
910  PRINT_LOG_ERROR(err);
911  return err;
912 }
917 {
918  GSM_Error err;
919 
921 
922  err = s->Phone.Functions->ConferenceCall(s, ID);
923  PRINT_LOG_ERROR(err);
924  return err;
925 }
930 {
931  GSM_Error err;
932 
934 
935  err = s->Phone.Functions->SplitCall(s, ID);
936  PRINT_LOG_ERROR(err);
937  return err;
938 }
943 {
944  GSM_Error err;
945 
947 
948  err = s->Phone.Functions->TransferCall(s, ID, next);
949  PRINT_LOG_ERROR(err);
950  return err;
951 }
956 {
957  GSM_Error err;
958 
960 
961  err = s->Phone.Functions->SwitchCall(s, ID, next);
962  PRINT_LOG_ERROR(err);
963  return err;
964 }
969 {
970  GSM_Error err;
971 
973 
974  err = s->Phone.Functions->GetCallDivert(s, request, result);
975  PRINT_LOG_ERROR(err);
976  return err;
977 }
982 {
983  GSM_Error err;
984 
986 
987  err = s->Phone.Functions->SetCallDivert(s, divert);
988  PRINT_LOG_ERROR(err);
989  return err;
990 }
995 {
996  GSM_Error err;
997 
999 
1000  err = s->Phone.Functions->CancelAllDiverts(s);
1001  PRINT_LOG_ERROR(err);
1002  return err;
1003 }
1008 {
1009  GSM_Error err;
1010 
1012 
1013  err = s->Phone.Functions->SetIncomingCall(s, enable);
1014  PRINT_LOG_ERROR(err);
1015  return err;
1016 }
1021 {
1022  GSM_Error err;
1023 
1025 
1026  err = s->Phone.Functions->SetIncomingUSSD(s, enable);
1027  PRINT_LOG_ERROR(err);
1028  return err;
1029 }
1034 {
1035  GSM_Error err;
1036 
1038 
1039  err = s->Phone.Functions->SendDTMF(s, sequence);
1040  PRINT_LOG_ERROR(err);
1041  return err;
1042 }
1047 {
1048  GSM_Error err;
1049 
1051 
1052  err = s->Phone.Functions->GetRingtone(s, Ringtone, PhoneRingtone);
1053  PRINT_LOG_ERROR(err);
1054  return err;
1055 }
1060 {
1061  GSM_Error err;
1062 
1064 
1065  err = s->Phone.Functions->SetRingtone(s, Ringtone, maxlength);
1066  PRINT_LOG_ERROR(err);
1067  return err;
1068 }
1073 {
1074  GSM_Error err;
1075 
1077 
1078  err = s->Phone.Functions->GetRingtonesInfo(s, Info);
1079  PRINT_LOG_ERROR(err);
1080  return err;
1081 }
1086 {
1087  GSM_Error err;
1088 
1090 
1091  err = s->Phone.Functions->DeleteUserRingtones(s);
1092  PRINT_LOG_ERROR(err);
1093  return err;
1094 }
1098 GSM_Error GSM_PlayTone(GSM_StateMachine *s, int Herz, unsigned char Volume, gboolean start)
1099 {
1100  GSM_Error err;
1101 
1103 
1104  err = s->Phone.Functions->PlayTone(s, Herz, Volume, start);
1105  PRINT_LOG_ERROR(err);
1106  return err;
1107 }
1112 {
1113  GSM_Error err;
1114 
1116 
1117  err = s->Phone.Functions->GetWAPBookmark(s, bookmark);
1118  PRINT_LOG_ERROR(err);
1119  return err;
1120 }
1125 {
1126  GSM_Error err;
1127 
1129 
1130  err = s->Phone.Functions->SetWAPBookmark(s, bookmark);
1131  PRINT_LOG_ERROR(err);
1132  return err;
1133 }
1138 {
1139  GSM_Error err;
1140 
1142 
1143  err = s->Phone.Functions->DeleteWAPBookmark(s, bookmark);
1144  PRINT_LOG_ERROR(err);
1145  return err;
1146 }
1151 {
1152  GSM_Error err;
1153 
1155 
1156  err = s->Phone.Functions->GetWAPSettings(s, settings);
1157  PRINT_LOG_ERROR(err);
1158  return err;
1159 }
1164 {
1165  GSM_Error err;
1166 
1168 
1169  err = s->Phone.Functions->SetWAPSettings(s, settings);
1170  PRINT_LOG_ERROR(err);
1171  return err;
1172 }
1177 {
1178  GSM_Error err;
1179 
1181 
1182  err = s->Phone.Functions->GetSyncMLSettings(s, settings);
1183  PRINT_LOG_ERROR(err);
1184  return err;
1185 }
1190 {
1191  GSM_Error err;
1192 
1194 
1195  err = s->Phone.Functions->SetSyncMLSettings(s, settings);
1196  PRINT_LOG_ERROR(err);
1197  return err;
1198 }
1203 {
1204  GSM_Error err;
1205 
1207 
1208  err = s->Phone.Functions->GetChatSettings(s, settings);
1209  PRINT_LOG_ERROR(err);
1210  return err;
1211 }
1216 {
1217  GSM_Error err;
1218 
1220 
1221  err = s->Phone.Functions->SetChatSettings(s, settings);
1222  PRINT_LOG_ERROR(err);
1223  return err;
1224 }
1229 {
1230  GSM_Error err;
1231 
1233 
1234  err = s->Phone.Functions->GetMMSSettings(s, settings);
1235  PRINT_LOG_ERROR(err);
1236  return err;
1237 }
1242 {
1243  GSM_Error err;
1244 
1246 
1247  err = s->Phone.Functions->SetMMSSettings(s, settings);
1248  PRINT_LOG_ERROR(err);
1249  return err;
1250 }
1255 {
1256  GSM_Error err;
1257 
1259 
1260  err = s->Phone.Functions->GetMMSFolders(s, folders);
1261  PRINT_LOG_ERROR(err);
1262  return err;
1263 }
1267 GSM_Error GSM_GetNextMMSFileInfo(GSM_StateMachine *s, unsigned char *FileID, int *MMSFolder, gboolean start)
1268 {
1269  GSM_Error err;
1270 
1272  PRINT_START();
1273 
1274  err = s->Phone.Functions->GetNextMMSFileInfo(s, FileID, MMSFolder, start);
1275  PRINT_LOG_ERROR(err);
1276  return err;
1277 }
1282 {
1283  GSM_Error err;
1284 
1286 
1287  err = s->Phone.Functions->GetBitmap(s, Bitmap);
1288  PRINT_LOG_ERROR(err);
1289  return err;
1290 }
1295 {
1296  GSM_Error err;
1297 
1299 
1300  err = s->Phone.Functions->SetBitmap(s, Bitmap);
1301  PRINT_LOG_ERROR(err);
1302  return err;
1303 }
1308 {
1309  GSM_Error err;
1310 
1312 
1313  err = s->Phone.Functions->GetToDoStatus(s, status);
1314  PRINT_LOG_ERROR(err);
1315  return err;
1316 }
1321 {
1322  GSM_Error err;
1323 
1325  PRINT_TODO_INFO();
1326 
1327  err = s->Phone.Functions->GetToDo(s, ToDo);
1328  PRINT_LOG_ERROR(err);
1329  return err;
1330 }
1335 {
1336  GSM_Error err;
1337 
1339  PRINT_START();
1340  PRINT_TODO_INFO();
1341 
1342  err = s->Phone.Functions->GetNextToDo(s, ToDo, start);
1343  PRINT_LOG_ERROR(err);
1344  return err;
1345 }
1350 {
1351  GSM_Error err;
1352 
1354  PRINT_TODO_INFO();
1355 
1356  err = s->Phone.Functions->SetToDo(s, ToDo);
1357  PRINT_LOG_ERROR(err);
1358  return err;
1359 }
1364 {
1365  GSM_Error err;
1366 
1368  PRINT_TODO_INFO();
1369 
1370  err = s->Phone.Functions->AddToDo(s, ToDo);
1371  PRINT_LOG_ERROR(err);
1372  return err;
1373 }
1378 {
1379  GSM_Error err;
1380 
1382  PRINT_TODO_INFO();
1383 
1384  err = s->Phone.Functions->DeleteToDo(s, ToDo);
1385  PRINT_LOG_ERROR(err);
1386  return err;
1387 }
1392 {
1393  GSM_Error err;
1394 
1396 
1397  err = s->Phone.Functions->DeleteAllToDo(s);
1398  PRINT_LOG_ERROR(err);
1399  return err;
1400 }
1405 {
1406  GSM_Error err;
1407 
1409 
1410  err = s->Phone.Functions->GetCalendarStatus(s, Status);
1411  PRINT_LOG_ERROR(err);
1412  return err;
1413 }
1418 {
1419  GSM_Error err;
1420 
1423 
1424  err = s->Phone.Functions->GetCalendar(s, Note);
1425  PRINT_LOG_ERROR(err);
1426  return err;
1427 }
1433 {
1434  GSM_Error err;
1435 
1437  PRINT_START();
1439 
1440  err = s->Phone.Functions->GetNextCalendar(s, Note, start);
1441  PRINT_LOG_ERROR(err);
1442  return err;
1443 }
1448 {
1449  GSM_Error err;
1450 
1453 
1454  err = s->Phone.Functions->SetCalendar(s, Note);
1455  PRINT_LOG_ERROR(err);
1456  return err;
1457 }
1462 {
1463  GSM_Error err;
1464 
1467 
1468  err = s->Phone.Functions->AddCalendar(s, Note);
1469  PRINT_LOG_ERROR(err);
1470  return err;
1471 }
1476 {
1477  GSM_Error err;
1478 
1481 
1482  err = s->Phone.Functions->DeleteCalendar(s, Note);
1483  PRINT_LOG_ERROR(err);
1484  return err;
1485 }
1490 {
1491  GSM_Error err;
1492 
1494 
1495  err = s->Phone.Functions->DeleteAllCalendar(s);
1496  PRINT_LOG_ERROR(err);
1497  return err;
1498 }
1503 {
1504  GSM_Error err;
1505 
1507 
1508  err = s->Phone.Functions->GetCalendarSettings(s, settings);
1509  PRINT_LOG_ERROR(err);
1510  return err;
1511 }
1516 {
1517  GSM_Error err;
1518 
1520 
1521  err = s->Phone.Functions->SetCalendarSettings(s, settings);
1522  PRINT_LOG_ERROR(err);
1523  return err;
1524 }
1529 {
1530  GSM_Error err;
1531 
1533 
1534  err = s->Phone.Functions->GetNotesStatus(s, status);
1535  PRINT_LOG_ERROR(err);
1536  return err;
1537 }
1542 {
1543  GSM_Error err;
1544 
1546  PRINT_NOTE_INFO();
1547 
1548  err = s->Phone.Functions->GetNote(s, Note);
1549  PRINT_LOG_ERROR(err);
1550  return err;
1551 }
1557 {
1558  GSM_Error err;
1559 
1561  PRINT_START();
1562  PRINT_NOTE_INFO();
1563 
1564  err = s->Phone.Functions->GetNextNote(s, Note, start);
1565  PRINT_LOG_ERROR(err);
1566  return err;
1567 }
1572 {
1573  GSM_Error err;
1574 
1576  PRINT_NOTE_INFO();
1577 
1578  err = s->Phone.Functions->SetNote(s, Note);
1579  PRINT_LOG_ERROR(err);
1580  return err;
1581 }
1586 {
1587  GSM_Error err;
1588 
1590  PRINT_NOTE_INFO();
1591 
1592  err = s->Phone.Functions->AddNote(s, Note);
1593  PRINT_LOG_ERROR(err);
1594  return err;
1595 }
1600 {
1601  GSM_Error err;
1602 
1604  PRINT_NOTE_INFO();
1605 
1606  err = s->Phone.Functions->DeleteNote(s, Note);
1607  PRINT_LOG_ERROR(err);
1608  return err;
1609 }
1614 {
1615  GSM_Error err;
1616 
1618 
1619  err = s->Phone.Functions->DeleteAllNotes(s);
1620  PRINT_LOG_ERROR(err);
1621  return err;
1622 }
1627 {
1628  GSM_Error err;
1629 
1631 
1632  err = s->Phone.Functions->GetProfile(s, Profile);
1633  PRINT_LOG_ERROR(err);
1634  return err;
1635 }
1640 {
1641  GSM_Error err;
1642 
1644 
1645  err = s->Phone.Functions->SetProfile(s, Profile);
1646  PRINT_LOG_ERROR(err);
1647  return err;
1648 }
1653 {
1654  GSM_Error err;
1655 
1657 
1658  err = s->Phone.Functions->GetFMStation(s, FMStation);
1659  PRINT_LOG_ERROR(err);
1660  return err;
1661 }
1666 {
1667  GSM_Error err;
1668 
1670 
1671  err = s->Phone.Functions->SetFMStation(s, FMStation);
1672  PRINT_LOG_ERROR(err);
1673  return err;
1674 }
1679 {
1680  GSM_Error err;
1681 
1683 
1684  err = s->Phone.Functions->ClearFMStations(s);
1685  PRINT_LOG_ERROR(err);
1686  return err;
1687 }
1692 {
1693  GSM_Error err;
1694 
1696  PRINT_START();
1697 
1698  err = s->Phone.Functions->GetNextFileFolder(s, File, start);
1699  PRINT_LOG_ERROR(err);
1700  return err;
1701 }
1706 {
1707  GSM_Error err;
1708 
1710  PRINT_START();
1711 
1712  err = s->Phone.Functions->GetFolderListing(s, File, start);
1713  PRINT_LOG_ERROR(err);
1714  return err;
1715 }
1720 {
1721  GSM_Error err;
1722 
1724 
1725  err = s->Phone.Functions->GetNextRootFolder(s, File);
1726  PRINT_LOG_ERROR(err);
1727  return err;
1728 }
1733 {
1734  GSM_Error err;
1735 
1737 
1738  err = s->Phone.Functions->SetFileAttributes(s, File);
1739  PRINT_LOG_ERROR(err);
1740  return err;
1741 }
1745 GSM_Error GSM_GetFilePart(GSM_StateMachine *s, GSM_File *File, int *Handle, int *Size)
1746 {
1747  GSM_Error err;
1748 
1750 
1751  err = s->Phone.Functions->GetFilePart(s, File, Handle, Size);
1752  PRINT_LOG_ERROR(err);
1753  return err;
1754 }
1758 GSM_Error GSM_AddFilePart(GSM_StateMachine *s, GSM_File *File, int *Pos, int *Handle)
1759 {
1760  GSM_Error err;
1761 
1763 
1764  err = s->Phone.Functions->AddFilePart(s, File, Pos, Handle);
1765  PRINT_LOG_ERROR(err);
1766  return err;
1767 }
1771 GSM_Error GSM_SendFilePart(GSM_StateMachine *s, GSM_File *File, int *Pos, int *Handle)
1772 {
1773  GSM_Error err;
1774 
1776 
1777  err = s->Phone.Functions->SendFilePart(s, File, Pos, Handle);
1778  PRINT_LOG_ERROR(err);
1779  return err;
1780 }
1785 {
1786  GSM_Error err;
1787 
1789 
1790  err = s->Phone.Functions->GetFileSystemStatus(s, Status);
1791  PRINT_LOG_ERROR(err);
1792  return err;
1793 }
1798 {
1799  GSM_Error err;
1800 
1802 
1803  err = s->Phone.Functions->DeleteFile(s, ID);
1804  PRINT_LOG_ERROR(err);
1805  return err;
1806 }
1811 {
1812  GSM_Error err;
1813 
1815 
1816  err = s->Phone.Functions->AddFolder(s, File);
1817  PRINT_LOG_ERROR(err);
1818  return err;
1819 }
1824 {
1825  GSM_Error err;
1826 
1828 
1829  err = s->Phone.Functions->DeleteFolder(s, ID);
1830  PRINT_LOG_ERROR(err);
1831  return err;
1832 }
1837 {
1838  GSM_Error err;
1839 
1841 
1842  err = s->Phone.Functions->GetGPRSAccessPoint(s, point);
1843  PRINT_LOG_ERROR(err);
1844  return err;
1845 }
1850 {
1851  GSM_Error err;
1852 
1854 
1855  err = s->Phone.Functions->SetGPRSAccessPoint(s, point);
1856  PRINT_LOG_ERROR(err);
1857  return err;
1858 }
1859 
1864 {
1865  GSM_Error err;
1866 
1868 
1869  picture->Length = 0;
1870  picture->Buffer = NULL;
1871  picture->Type = 0;
1872 
1873  err = s->Phone.Functions->GetScreenshot(s, picture);
1874  PRINT_LOG_ERROR(err);
1875  return err;
1876 }
1877 
1881 GSM_Error GSM_Install(GSM_StateMachine *s, const char *ExtraPath, gboolean Minimal)
1882 {
1883  GSM_Error err;
1884 
1885  err = s->Phone.Functions->Install(s, ExtraPath, Minimal);
1886  PRINT_LOG_ERROR(err);
1887  return err;
1888 }
1889 
1890 /* How should editor hadle tabs in this file? Add editor commands here.
1891  * vim: noexpandtab sw=8 ts=8 sts=8:
1892  */
GSM_Error(* SetIncomingCall)(GSM_StateMachine *s, gboolean enable)
Definition: gsmstate.h:1032
GSM_Error GSM_GetSecurityStatus(GSM_StateMachine *s, GSM_SecurityCodeType *Status)
Definition: api.c:365
GSM_Error(* GetModel)(GSM_StateMachine *s)
Definition: gsmstate.h:762
GSM_Error GSM_DeleteAllNotes(GSM_StateMachine *s)
Definition: api.c:1613
GSM_Error GSM_SetIncomingUSSD(GSM_StateMachine *s, gboolean enable)
Definition: api.c:1020
GSM_Error GSM_SetWAPSettings(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: api.c:1163
GSM_Error(* SetFMStation)(GSM_StateMachine *s, GSM_FMStation *FMStation)
Definition: gsmstate.h:1230
GSM_Error GSM_SendSavedSMS(GSM_StateMachine *s, int Folder, int Location)
Definition: api.c:746
GSM_Error(* AddNote)(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: gsmstate.h:1206
GSM_Error GSM_DialVoice(GSM_StateMachine *s, char *Number, GSM_CallShowNumber ShowNumber)
Definition: api.c:838
#define PRINT_CALENDAR_INFO()
Definition: api.c:16
GSM_Error(* GetManufactureMonth)(GSM_StateMachine *s, char *value)
Definition: gsmstate.h:778
GSM_Error(* SetIncomingSMS)(GSM_StateMachine *s, gboolean enable)
Definition: gsmstate.h:960
GSM_Error(* PlayTone)(GSM_StateMachine *s, int Herz, unsigned char Volume, gboolean start)
Definition: gsmstate.h:1060
GSM_Error GSM_DialService(GSM_StateMachine *s, char *Number)
Definition: api.c:851
GSM_Error(* GetDateTime)(GSM_StateMachine *s, GSM_DateTime *date_time)
Definition: gsmstate.h:799
GSM_Error GSM_SetSMSC(GSM_StateMachine *s, GSM_SMSC *smsc)
Definition: api.c:634
GSM_Error GSM_SendDTMF(GSM_StateMachine *s, char *sequence)
Definition: api.c:1033
GSM_Error GSM_GetSMSC(GSM_StateMachine *s, GSM_SMSC *smsc)
Definition: api.c:621
GSM_Error(* GetWAPBookmark)(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
Definition: gsmstate.h:1064
GSM_Error(* DeleteToDo)(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: gsmstate.h:1144
GSM_Error GSM_SetMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: api.c:540
GSM_Error(* GetScreenshot)(GSM_StateMachine *s, GSM_BinaryPicture *picture)
Definition: gsmstate.h:1290
GSM_Error GSM_PressKey(GSM_StateMachine *s, GSM_KeyCode Key, gboolean Press)
Definition: api.c:313
GSM_Error(* GetNextNote)(GSM_StateMachine *s, GSM_NoteEntry *Note, gboolean start)
Definition: gsmstate.h:1198
GSM_Error(* GetRingtonesInfo)(GSM_StateMachine *s, GSM_AllRingtonesInfo *Info)
Definition: gsmstate.h:1052
GSM_Error(* GetToDo)(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: gsmstate.h:1128
GSM_Error GSM_DeleteNote(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: api.c:1599
GSM_Error GSM_GetSyncMLSettings(GSM_StateMachine *s, GSM_SyncMLSettings *settings)
Definition: api.c:1176
GSM_Error(* GetNextMemory)(GSM_StateMachine *s, GSM_MemoryEntry *entry, gboolean start)
Definition: gsmstate.h:886
GSM_Error GSM_DeleteMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: api.c:568
GSM_Error GSM_ClearFMStations(GSM_StateMachine *s)
Definition: api.c:1678
GSM_Error(* SetToDo)(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: gsmstate.h:1136
GSM_Error(* GetMemoryStatus)(GSM_StateMachine *s, GSM_MemoryStatus *status)
Definition: gsmstate.h:876
GSM_Error(* AddSMSFolder)(GSM_StateMachine *s, unsigned char *name)
Definition: gsmstate.h:972
GSM_Error GSM_SetProfile(GSM_StateMachine *s, GSM_Profile *Profile)
Definition: api.c:1639
GSM_Error GSM_GetCalendarStatus(GSM_StateMachine *s, GSM_CalendarStatus *Status)
Definition: api.c:1404
GSM_Error(* GetCallDivert)(GSM_StateMachine *s, GSM_CallDivert *request, GSM_MultiCallDivert *result)
Definition: gsmstate.h:1020
GSM_Error(* GetFirmware)(GSM_StateMachine *s)
Definition: gsmstate.h:766
GSM_Error(* AddCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: gsmstate.h:1169
#define PRINT_TODO_INFO()
Definition: api.c:15
GSM_Error GSM_SetGPRSAccessPoint(GSM_StateMachine *s, GSM_GPRSAccessPoint *point)
Definition: api.c:1849
GSM_Error(* DialVoice)(GSM_StateMachine *s, char *Number, GSM_CallShowNumber ShowNumber)
Definition: gsmstate.h:980
GSM_Error(* SetRingtone)(GSM_StateMachine *s, GSM_Ringtone *Ringtone, int *maxlength)
Definition: gsmstate.h:1048
GSM_Error GSM_SetCalendarSettings(GSM_StateMachine *s, GSM_CalendarSettings *settings)
Definition: api.c:1515
unsigned char NetworkName[15 *2]
Definition: gammu-info.h:131
GSM_Error GSM_GetNextCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note, gboolean start)
Definition: api.c:1432
GSM_Error GSM_SetIncomingSMS(GSM_StateMachine *s, gboolean enable)
Definition: api.c:773
GSM_Error(* SetSMSC)(GSM_StateMachine *s, GSM_SMSC *smsc)
Definition: gsmstate.h:918
GSM_Error GSM_GetBatteryCharge(GSM_StateMachine *s, GSM_BatteryCharge *bat)
Definition: api.c:404
GSM_Error GSM_TransferCall(GSM_StateMachine *s, int ID, gboolean next)
Definition: api.c:942
char VerDate[GSM_MAX_VERSION_DATE_LENGTH+1]
Definition: gsmstate.h:443
GSM_Error(* GetSMSFolders)(GSM_StateMachine *s, GSM_SMSFolders *folders)
Definition: gsmstate.h:968
GSM_Error(* SplitCall)(GSM_StateMachine *s, int ID)
Definition: gsmstate.h:1008
GSM_Error GSM_DeleteFile(GSM_StateMachine *s, unsigned char *ID)
Definition: api.c:1797
GSM_Error GSM_DeleteUserRingtones(GSM_StateMachine *s)
Definition: api.c:1085
GSM_Error GSM_GetPPM(GSM_StateMachine *s, char *value)
Definition: api.c:196
GSM_Error GSM_GetMMSSettings(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: api.c:1228
GSM_Error(* GetNote)(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: gsmstate.h:1193
GSM_Error GSM_Reset(GSM_StateMachine *s, gboolean hard)
Definition: api.c:326
GSM_Error(* GetSpeedDial)(GSM_StateMachine *s, GSM_SpeedDial *Speed)
Definition: gsmstate.h:906
GSM_Error(* PressKey)(GSM_StateMachine *s, GSM_KeyCode Key, gboolean Press)
Definition: gsmstate.h:823
GSM_Error GSM_AnswerCall(GSM_StateMachine *s, int ID, gboolean all)
Definition: api.c:864
GSM_Error GSM_GetFilePart(GSM_StateMachine *s, GSM_File *File, int *Handle, int *Size)
Definition: api.c:1745
GSM_Error GSM_GetNextMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry, gboolean start)
Definition: api.c:525
GSM_Error(* GetRingtone)(GSM_StateMachine *s, GSM_Ringtone *Ringtone, gboolean PhoneRingtone)
Definition: gsmstate.h:1044
GSM_Error GSM_SetPower(GSM_StateMachine *s, gboolean on)
Definition: api.c:300
GSM_Error GSM_SetFMStation(GSM_StateMachine *s, GSM_FMStation *FMStation)
Definition: api.c:1665
GSM_Error
Definition: gammu-error.h:19
GSM_Error(* SetWAPBookmark)(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
Definition: gsmstate.h:1068
GSM_Error GSM_GetNextMMSFileInfo(GSM_StateMachine *s, unsigned char *FileID, int *MMSFolder, gboolean start)
Definition: api.c:1267
GSM_Error(* SetBitmap)(GSM_StateMachine *s, GSM_Bitmap *Bitmap)
Definition: gsmstate.h:1120
GSM_Error GSM_SetChatSettings(GSM_StateMachine *s, GSM_ChatSettings *settings)
Definition: api.c:1215
GSM_Error GSM_GetCategory(GSM_StateMachine *s, GSM_Category *Category)
Definition: api.c:456
GSM_Error(* SetMMSSettings)(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: gsmstate.h:1104
GSM_Error GSM_DeleteSMSFolder(GSM_StateMachine *s, int ID)
Definition: api.c:825
GSM_Error(* GetAlarm)(GSM_StateMachine *s, GSM_Alarm *Alarm)
Definition: gsmstate.h:807
GSM_Error(* GetNetworkInfo)(GSM_StateMachine *s, GSM_NetworkInfo *netinfo)
Definition: gsmstate.h:859
GSM_Error GSM_GetGPRSAccessPoint(GSM_StateMachine *s, GSM_GPRSAccessPoint *point)
Definition: api.c:1836
GSM_BinaryPicture_Types Type
Definition: gammu-bitmap.h:40
#define PRINT_START()
Definition: api.c:20
GSM_Error(* GetMemory)(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: gsmstate.h:881
GSM_Error GSM_GetNote(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: api.c:1541
GSM_CallShowNumber
Definition: gammu-call.h:188
unsigned char * Buffer
Definition: gammu-bitmap.h:41
GSM_Error GSM_GetIMEI(GSM_StateMachine *s, char *value)
Definition: api.c:125
GSM_Error GSM_CancelAllDiverts(GSM_StateMachine *s)
Definition: api.c:994
GSM_Error(* SetPower)(GSM_StateMachine *s, gboolean on)
Definition: gsmstate.h:1294
char LAC[10]
Definition: gammu-info.h:127
GSM_Error(* GetCategoryStatus)(GSM_StateMachine *s, GSM_CategoryStatus *Status)
Definition: gsmstate.h:871
GSM_Error(* DeleteAllMemory)(GSM_StateMachine *s, GSM_MemoryType MemoryType)
Definition: gsmstate.h:902
GSM_Error GSM_DeleteToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: api.c:1377
GSM_Error(* GetSignalQuality)(GSM_StateMachine *s, GSM_SignalQuality *sig)
Definition: gsmstate.h:855
GSM_Error(* SetAlarm)(GSM_StateMachine *s, GSM_Alarm *Alarm)
Definition: gsmstate.h:811
GSM_Error(* GetMMSFolders)(GSM_StateMachine *s, GSM_MMSFolders *folders)
Definition: gsmstate.h:1108
GSM_Error(* SetNote)(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: gsmstate.h:1202
GSM_Error(* GetChatSettings)(GSM_StateMachine *s, GSM_ChatSettings *settings)
Definition: gsmstate.h:1092
char PacketCID[10]
Definition: gammu-info.h:139
GSM_Error(* GetCalendarSettings)(GSM_StateMachine *s, GSM_CalendarSettings *settings)
Definition: gsmstate.h:1181
GSM_Error GSM_DeleteCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: api.c:1475
GSM_Error GSM_GetToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: api.c:1320
GSM_Error(* GetNextSMS)(GSM_StateMachine *s, GSM_MultiSMSMessage *sms, gboolean start)
Definition: gsmstate.h:932
GSM_Error GSM_SetIncomingCB(GSM_StateMachine *s, gboolean enable)
Definition: api.c:786
char IMEI[GSM_MAX_IMEI_LENGTH+1]
Definition: gsmstate.h:422
char Version[GSM_MAX_VERSION_LENGTH+1]
Definition: gsmstate.h:439
GSM_Error GSM_AddFilePart(GSM_StateMachine *s, GSM_File *File, int *Pos, int *Handle)
Definition: api.c:1758
GSM_Error(* SetSMS)(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: gsmstate.h:936
GSM_Error GSM_GetCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: api.c:1417
GSM_Error GSM_ConferenceCall(GSM_StateMachine *s, int ID)
Definition: api.c:916
#define PRINT_MSMS_INFO()
Definition: api.c:18
GSM_Error GSM_SetAlarm(GSM_StateMachine *s, GSM_Alarm *Alarm)
Definition: api.c:261
GSM_Error(* GetSecurityStatus)(GSM_StateMachine *s, GSM_SecurityCodeType *Status)
Definition: gsmstate.h:839
GSM_Error(* GetFolderListing)(GSM_StateMachine *s, GSM_File *File, gboolean start)
Definition: gsmstate.h:1242
char Manufacturer[GSM_MAX_MANUFACTURER_LENGTH+1]
Definition: gsmstate.h:426
GSM_Error(* DeleteAllNotes)(GSM_StateMachine *s)
Definition: gsmstate.h:1214
GSM_Error GSM_CancelCall(GSM_StateMachine *s, int ID, gboolean all)
Definition: api.c:877
char NetworkCode[10]
Definition: gammu-info.h:118
GSM_Error(* SetCalendarSettings)(GSM_StateMachine *s, GSM_CalendarSettings *settings)
Definition: gsmstate.h:1185
GSM_Error GSM_GetNextSMS(GSM_StateMachine *s, GSM_MultiSMSMessage *sms, gboolean start)
Definition: api.c:676
GSM_Error GSM_DeleteAllToDo(GSM_StateMachine *s)
Definition: api.c:1391
GSM_Error(* Reset)(GSM_StateMachine *s, gboolean hard)
Definition: gsmstate.h:827
char CID[10]
Definition: gammu-info.h:114
GSM_Error(* GetNextToDo)(GSM_StateMachine *s, GSM_ToDoEntry *ToDo, gboolean start)
Definition: gsmstate.h:1132
GSM_Error(* SetSpeedDial)(GSM_StateMachine *s, GSM_SpeedDial *Speed)
Definition: gsmstate.h:910
GSM_Error(* DeleteAllCalendar)(GSM_StateMachine *s)
Definition: gsmstate.h:1177
GSM_Error(* GetWAPSettings)(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: gsmstate.h:1076
GSM_Error(* SetFileAttributes)(GSM_StateMachine *s, GSM_File *File)
Definition: gsmstate.h:1250
GSM_Error(* GetNextCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note, gboolean start)
Definition: gsmstate.h:1161
GSM_Error(* HoldCall)(GSM_StateMachine *s, int ID)
Definition: gsmstate.h:996
GSM_Error(* DeleteNote)(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: gsmstate.h:1210
GSM_Error(* GetNextRootFolder)(GSM_StateMachine *s, GSM_File *File)
Definition: gsmstate.h:1246
GSM_Error GSM_GetNextNote(GSM_StateMachine *s, GSM_NoteEntry *Note, gboolean start)
Definition: api.c:1556
GSM_Error(* GetIMEI)(GSM_StateMachine *s)
Definition: gsmstate.h:770
GSM_Error(* AnswerCall)(GSM_StateMachine *s, int ID, gboolean all)
Definition: gsmstate.h:988
GSM_Error(* SwitchCall)(GSM_StateMachine *s, int ID, gboolean next)
Definition: gsmstate.h:1016
GSM_Error(* SetWAPSettings)(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: gsmstate.h:1080
GSM_Error(* GetPPM)(GSM_StateMachine *s, char *value)
Definition: gsmstate.h:791
GSM_Error(* GetOriginalIMEI)(GSM_StateMachine *s, char *value)
Definition: gsmstate.h:774
GSM_Error GSM_GetSMSFolders(GSM_StateMachine *s, GSM_SMSFolders *folders)
Definition: api.c:799
GSM_Error GSM_GetSIMIMSI(GSM_StateMachine *s, char *IMSI)
Definition: api.c:209
GSM_Error(* SetCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: gsmstate.h:1165
GSM_Error(* DeleteFolder)(GSM_StateMachine *s, unsigned char *ID)
Definition: gsmstate.h:1278
GSM_Error GSM_AddSMSFolder(GSM_StateMachine *s, unsigned char *name)
Definition: api.c:812
int gboolean
Definition: gammu-types.h:19
GSM_Error(* ConferenceCall)(GSM_StateMachine *s, int ID)
Definition: gsmstate.h:1004
GSM_Error GSM_GetCategoryStatus(GSM_StateMachine *s, GSM_CategoryStatus *Status)
Definition: api.c:482
GSM_Error GSM_SendSMS(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: api.c:733
GSM_MemoryType
Definition: gammu-memory.h:27
GSM_Error GSM_SendFilePart(GSM_StateMachine *s, GSM_File *File, int *Pos, int *Handle)
Definition: api.c:1771
GSM_Error(* SetDateTime)(GSM_StateMachine *s, GSM_DateTime *date_time)
Definition: gsmstate.h:803
GSM_Error(* DeleteCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: gsmstate.h:1173
GSM_Error(* GetManufacturer)(GSM_StateMachine *s)
Definition: gsmstate.h:758
GSM_Error GSM_GetFolderListing(GSM_StateMachine *s, GSM_File *File, gboolean start)
Definition: api.c:1705
GSM_Error GSM_GetModel(GSM_StateMachine *s, char *value)
Definition: api.c:83
GSM_Error GSM_GetChatSettings(GSM_StateMachine *s, GSM_ChatSettings *settings)
Definition: api.c:1202
GSM_Error GSM_GetLocale(GSM_StateMachine *s, GSM_Locale *locale)
Definition: api.c:274
GSM_Error GSM_GetSpeedDial(GSM_StateMachine *s, GSM_SpeedDial *Speed)
Definition: api.c:595
GSM_Error(* GetNextMMSFileInfo)(GSM_StateMachine *s, unsigned char *FileID, int *MMSFolder, gboolean start)
Definition: gsmstate.h:1112
GSM_Error GSM_SetSpeedDial(GSM_StateMachine *s, GSM_SpeedDial *Speed)
Definition: api.c:608
#define PRINT_MEMORY_INFO()
Definition: api.c:14
GSM_Error GSM_GetToDoStatus(GSM_StateMachine *s, GSM_ToDoStatus *status)
Definition: api.c:1307
GSM_Phone Phone
Definition: gsmstate.h:1404
#define PRINT_LOG_ERROR(err)
Definition: api.c:27
GSM_Error(* GetGPRSAccessPoint)(GSM_StateMachine *s, GSM_GPRSAccessPoint *point)
Definition: gsmstate.h:1282
GSM_Error GSM_ResetPhoneSettings(GSM_StateMachine *s, GSM_ResetSettingsType Type)
Definition: api.c:339
GSM_Error GSM_SetLocale(GSM_StateMachine *s, GSM_Locale *locale)
Definition: api.c:287
GSM_Error(* GetBatteryCharge)(GSM_StateMachine *s, GSM_BatteryCharge *bat)
Definition: gsmstate.h:851
GSM_Error(* CancelCall)(GSM_StateMachine *s, int ID, gboolean all)
Definition: gsmstate.h:992
GSM_Error GSM_SetCallDivert(GSM_StateMachine *s, GSM_CallDivert *divert)
Definition: api.c:981
GSM_Error GSM_GetNextRootFolder(GSM_StateMachine *s, GSM_File *File)
Definition: api.c:1719
GSM_SecurityCodeType
GSM_Error(* GetToDoStatus)(GSM_StateMachine *s, GSM_ToDoStatus *status)
Definition: gsmstate.h:1124
#define CHECK_PHONE_CONNECTION()
Definition: api.c:37
GSM_Error(* SetMemory)(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: gsmstate.h:890
GSM_Error(* SetProfile)(GSM_StateMachine *s, GSM_Profile *Profile)
Definition: gsmstate.h:1222
GSM_Error GSM_GetNotesStatus(GSM_StateMachine *s, GSM_ToDoStatus *status)
Definition: api.c:1528
GSM_Error(* DeleteFile)(GSM_StateMachine *s, unsigned char *ID)
Definition: gsmstate.h:1270
GSM_Error(* AddSMS)(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: gsmstate.h:940
GSM_Error GSM_GetProfile(GSM_StateMachine *s, GSM_Profile *Profile)
Definition: api.c:1626
GSM_Error GSM_DeleteSMS(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: api.c:719
GSM_GPRS_State GPRS
Definition: gammu-info.h:135
GSM_Error(* DeleteAllToDo)(GSM_StateMachine *s)
Definition: gsmstate.h:1148
GSM_Error GSM_SetSMS(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: api.c:691
GSM_Error GSM_GetNetworkInfo(GSM_StateMachine *s, GSM_NetworkInfo *netinfo)
Definition: api.c:432
GSM_Error(* SendSMS)(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: gsmstate.h:948
GSM_Error GSM_GetMMSFolders(GSM_StateMachine *s, GSM_MMSFolders *folders)
Definition: api.c:1254
GSM_Error GSM_DeleteWAPBookmark(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
Definition: api.c:1137
GSM_Error(* DeleteSMSFolder)(GSM_StateMachine *s, int ID)
Definition: gsmstate.h:976
GSM_Error GSM_GetWAPBookmark(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
Definition: api.c:1111
GSM_Error(* SetAutoNetworkLogin)(GSM_StateMachine *s)
Definition: gsmstate.h:847
GSM_Error GSM_SetIncomingCall(GSM_StateMachine *s, gboolean enable)
Definition: api.c:1007
GSM_Error GSM_GetMemoryStatus(GSM_StateMachine *s, GSM_MemoryStatus *status)
Definition: api.c:496
GSM_Error GSM_GetFileSystemStatus(GSM_StateMachine *s, GSM_FileSystemStatus *Status)
Definition: api.c:1784
GSM_Error GSM_DeleteAllCalendar(GSM_StateMachine *s)
Definition: api.c:1489
GSM_Error GSM_GetDisplayStatus(GSM_StateMachine *s, GSM_DisplayFeatures *features)
Definition: api.c:378
GSM_Error GSM_GetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap)
Definition: api.c:1281
GSM_Error GSM_SetMMSSettings(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: api.c:1241
GSM_Error GSM_GetAlarm(GSM_StateMachine *s, GSM_Alarm *Alarm)
Definition: api.c:248
GSM_Error(* SendDTMF)(GSM_StateMachine *s, char *sequence)
Definition: gsmstate.h:1040
GSM_Error GSM_HoldCall(GSM_StateMachine *s, int ID)
Definition: api.c:890
GSM_Error GSM_GetSMS(GSM_StateMachine *s, GSM_MultiSMSMessage *sms)
Definition: api.c:661
GSM_Error(* AddFilePart)(GSM_StateMachine *s, GSM_File *File, int *Pos, int *Handle)
Definition: gsmstate.h:1258
GSM_Error(* SetIncomingUSSD)(GSM_StateMachine *s, gboolean enable)
Definition: gsmstate.h:1036
GSM_Error GSM_AddMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: api.c:554
GSM_Error(* GetMMSSettings)(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: gsmstate.h:1100
GSM_Error GSM_SetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap)
Definition: api.c:1294
GSM_Error GSM_GetFMStation(GSM_StateMachine *s, GSM_FMStation *FMStation)
Definition: api.c:1652
GSM_NetworkInfo_State State
Definition: gammu-info.h:123
GSM_Error GSM_AddCategory(GSM_StateMachine *s, GSM_Category *Category)
Definition: api.c:469
GSM_Error GSM_SwitchCall(GSM_StateMachine *s, int ID, gboolean next)
Definition: api.c:955
GSM_Error(* SetCallDivert)(GSM_StateMachine *s, GSM_CallDivert *divert)
Definition: gsmstate.h:1024
GSM_Error GSM_GetOriginalIMEI(GSM_StateMachine *s, char *value)
Definition: api.c:143
GSM_Error(* GetNextFileFolder)(GSM_StateMachine *s, GSM_File *File, gboolean start)
Definition: gsmstate.h:1238
GSM_Error(* GetCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: gsmstate.h:1156
GSM_Error GSM_SetWAPBookmark(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
Definition: api.c:1124
GSM_Error(* AddToDo)(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: gsmstate.h:1140
GSM_Error(* GetSMS)(GSM_StateMachine *s, GSM_MultiSMSMessage *sms)
Definition: gsmstate.h:927
GSM_Phone_Data Data
Definition: gsmstate.h:1346
GSM_KeyCode
Definition: gammu-keys.h:26
GSM_Error(* SetGPRSAccessPoint)(GSM_StateMachine *s, GSM_GPRSAccessPoint *point)
Definition: gsmstate.h:1286
GSM_Error(* AddFolder)(GSM_StateMachine *s, GSM_File *File)
Definition: gsmstate.h:1274
GSM_Error GSM_UnholdCall(GSM_StateMachine *s, int ID)
Definition: api.c:903
GSM_Error(* GetBitmap)(GSM_StateMachine *s, GSM_Bitmap *Bitmap)
Definition: gsmstate.h:1116
GSM_Error GSM_GetCallDivert(GSM_StateMachine *s, GSM_CallDivert *request, GSM_MultiCallDivert *result)
Definition: api.c:968
double VerNum
Definition: gsmstate.h:447
GSM_Error GSM_SetAutoNetworkLogin(GSM_StateMachine *s)
Definition: api.c:391
GSM_Error(* SetLocale)(GSM_StateMachine *s, GSM_Locale *locale)
Definition: gsmstate.h:819
GSM_Error GSM_AddSMS(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: api.c:705
GSM_Error GSM_AddNote(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: api.c:1585
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1350
GSM_Error(* DeleteUserRingtones)(GSM_StateMachine *s)
Definition: gsmstate.h:1056
GSM_Error(* ResetPhoneSettings)(GSM_StateMachine *s, GSM_ResetSettingsType Type)
Definition: gsmstate.h:831
GSM_Error(* AddMemory)(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: gsmstate.h:894
GSM_Error(* TransferCall)(GSM_StateMachine *s, int ID, gboolean next)
Definition: gsmstate.h:1012
GSM_Error GSM_SetFastSMSSending(GSM_StateMachine *s, gboolean enable)
Definition: api.c:760
GSM_Error GSM_SetCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: api.c:1447
GSM_Error(* GetSIMIMSI)(GSM_StateMachine *s, char *IMSI)
Definition: gsmstate.h:795
#define RUN_RESTARTABLE(return_value, function_call)
Definition: api.c:49
GSM_Error(* GetProductCode)(GSM_StateMachine *s, char *value)
Definition: gsmstate.h:782
GSM_Error GSM_Install(GSM_StateMachine *s, const char *ExtraPath, gboolean Minimal)
Definition: api.c:1881
GSM_Error GSM_SetToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: api.c:1349
GSM_Error(* SetSyncMLSettings)(GSM_StateMachine *s, GSM_SyncMLSettings *settings)
Definition: gsmstate.h:1088
#define PRINT_SMS_INFO()
Definition: api.c:19
GSM_Error GSM_GetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone, gboolean PhoneRingtone)
Definition: api.c:1046
GSM_Error GSM_SetNote(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: api.c:1571
GSM_Error(* Install)(GSM_StateMachine *s, const char *ExtraPath, gboolean Minimal)
Definition: gsmstate.h:737
GSM_Error GSM_GetSMSStatus(GSM_StateMachine *s, GSM_SMSMemoryStatus *status)
Definition: api.c:648
GSM_Error(* GetLocale)(GSM_StateMachine *s, GSM_Locale *locale)
Definition: gsmstate.h:815
GSM_NetworkInfo_State PacketState
Definition: gammu-info.h:144
GSM_Error(* GetDisplayStatus)(GSM_StateMachine *s, GSM_DisplayFeatures *features)
Definition: gsmstate.h:843
char PacketLAC[10]
Definition: gammu-info.h:148
GSM_Error(* SetIncomingCB)(GSM_StateMachine *s, gboolean enable)
Definition: gsmstate.h:964
GSM_Error GSM_DeleteAllMemory(GSM_StateMachine *s, GSM_MemoryType MemoryType)
Definition: api.c:582
GSM_Error(* SetFastSMSSending)(GSM_StateMachine *s, gboolean enable)
Definition: gsmstate.h:956
GSM_Error(* GetSMSC)(GSM_StateMachine *s, GSM_SMSC *smsc)
Definition: gsmstate.h:914
GSM_Error GSM_GetScreenshot(GSM_StateMachine *s, GSM_BinaryPicture *picture)
Definition: api.c:1863
GSM_Error GSM_AddCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: api.c:1461
#define PRINT_NOTE_INFO()
Definition: api.c:17
GSM_Error GSM_DeleteFolder(GSM_StateMachine *s, unsigned char *ID)
Definition: api.c:1823
GSM_Error(* GetCategory)(GSM_StateMachine *s, GSM_Category *Category)
Definition: gsmstate.h:863
GSM_Error GSM_GetNextFileFolder(GSM_StateMachine *s, GSM_File *File, gboolean start)
Definition: api.c:1691
GSM_Error(* ClearFMStations)(GSM_StateMachine *s)
Definition: gsmstate.h:1234
GSM_Error(* DialService)(GSM_StateMachine *s, char *Number)
Definition: gsmstate.h:984
GSM_Error GSM_SetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone, int *maxlength)
Definition: api.c:1059
GSM_Error GSM_AddFolder(GSM_StateMachine *s, GSM_File *File)
Definition: api.c:1810
GSM_Error GSM_PlayTone(GSM_StateMachine *s, int Herz, unsigned char Volume, gboolean start)
Definition: api.c:1098
GSM_Error(* SendFilePart)(GSM_StateMachine *s, GSM_File *File, int *Pos, int *Handle)
Definition: gsmstate.h:1262
GSM_Error(* DeleteWAPBookmark)(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
Definition: gsmstate.h:1072
GSM_Error GSM_GetNextToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo, gboolean start)
Definition: api.c:1334
GSM_Error(* SetChatSettings)(GSM_StateMachine *s, GSM_ChatSettings *settings)
Definition: gsmstate.h:1096
GSM_Error GSM_GetSignalQuality(GSM_StateMachine *s, GSM_SignalQuality *sig)
Definition: api.c:419
GSM_Error GSM_SetSyncMLSettings(GSM_StateMachine *s, GSM_SyncMLSettings *settings)
Definition: api.c:1189
GSM_Error(* DeleteSMS)(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: gsmstate.h:944
GSM_Error(* CancelAllDiverts)(GSM_StateMachine *s)
Definition: gsmstate.h:1028
GSM_Error(* GetSMSStatus)(GSM_StateMachine *s, GSM_SMSMemoryStatus *status)
Definition: gsmstate.h:923
GSM_Error GSM_GetCalendarSettings(GSM_StateMachine *s, GSM_CalendarSettings *settings)
Definition: api.c:1502
GSM_Error(* GetHardware)(GSM_StateMachine *s, char *value)
Definition: gsmstate.h:786
GSM_Error(* GetSyncMLSettings)(GSM_StateMachine *s, GSM_SyncMLSettings *settings)
Definition: gsmstate.h:1084
GSM_Error GSM_AddToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: api.c:1363
GSM_Error GSM_EnterSecurityCode(GSM_StateMachine *s, GSM_SecurityCode *Code)
Definition: api.c:352
GSM_Error GSM_SetFileAttributes(GSM_StateMachine *s, GSM_File *File)
Definition: api.c:1732
GSM_Error(* GetFileSystemStatus)(GSM_StateMachine *s, GSM_FileSystemStatus *Status)
Definition: gsmstate.h:1266
GSM_Error GSM_GetHardware(GSM_StateMachine *s, char *value)
Definition: api.c:182
GSM_Error(* GetCalendarStatus)(GSM_StateMachine *s, GSM_CalendarStatus *Status)
Definition: gsmstate.h:1152
char Model[GSM_MAX_MODEL_LENGTH+1]
Definition: gsmstate.h:430
GSM_Error(* GetFilePart)(GSM_StateMachine *s, GSM_File *File, int *Handle, int *Size)
Definition: gsmstate.h:1254
GSM_Error(* DeleteMemory)(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: gsmstate.h:898
GSM_Error GSM_GetManufacturer(GSM_StateMachine *s, char *value)
Definition: api.c:65
GSM_Error GSM_GetManufactureMonth(GSM_StateMachine *s, char *value)
Definition: api.c:156
GSM_Error(* SendSavedSMS)(GSM_StateMachine *s, int Folder, int Location)
Definition: gsmstate.h:952
GSM_Error GSM_GetRingtonesInfo(GSM_StateMachine *s, GSM_AllRingtonesInfo *Info)
Definition: api.c:1072
GSM_Error GSM_SetDateTime(GSM_StateMachine *s, GSM_DateTime *date_time)
Definition: api.c:235
GSM_Error GSM_GetWAPSettings(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: api.c:1150
GSM_Error(* UnholdCall)(GSM_StateMachine *s, int ID)
Definition: gsmstate.h:1000
GSM_Error(* GetProfile)(GSM_StateMachine *s, GSM_Profile *Profile)
Definition: gsmstate.h:1218
GSM_Error(* AddCategory)(GSM_StateMachine *s, GSM_Category *Category)
Definition: gsmstate.h:867
GSM_Error(* GetFMStation)(GSM_StateMachine *s, GSM_FMStation *FMStation)
Definition: gsmstate.h:1226
GSM_Error(* GetNotesStatus)(GSM_StateMachine *s, GSM_ToDoStatus *status)
Definition: gsmstate.h:1189
GSM_Error GSM_GetDateTime(GSM_StateMachine *s, GSM_DateTime *date_time)
Definition: api.c:222
GSM_ResetSettingsType
int smprintf(GSM_StateMachine *s, const char *format,...)
Definition: debug.c:261
GSM_Error GSM_GetProductCode(GSM_StateMachine *s, char *value)
Definition: api.c:169
GSM_Error GSM_GetFirmware(GSM_StateMachine *s, char *value, char *date, double *num)
Definition: api.c:101
GSM_Error GSM_SplitCall(GSM_StateMachine *s, int ID)
Definition: api.c:929
GSM_Error GSM_GetMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: api.c:510
GSM_Error(* EnterSecurityCode)(GSM_StateMachine *s, GSM_SecurityCode *Code)
Definition: gsmstate.h:835