Gammu internals  1.38.0
api.c
Go to the documentation of this file.
1 #include <string.h>
2 
3 #include <gammu.h>
4 #include "gsmstate.h"
5 #include "gsmcomon.h"
6 #include "debug.h"
7 
8 #ifdef __FUNCTION__WORKING
9 #define PRINT_FUNCTION_START smprintf(s, "Entering %s\n", __FUNCTION__);
10 #define PRINT_FUNCTION_END smprintf(s, "Leaving %s\n", __FUNCTION__);
11 #else
12 #define PRINT_FUNCTION_START smprintf(s, "Entering %s:%d\n", __FILE__, __LINE__);
13 #define PRINT_FUNCTION_END smprintf(s, "Leaving %s:%d\n", __FILE__, __LINE__);
14 #endif
15 #define PRINT_MEMORY_INFO() smprintf(s, "Location = %d, Memory type = %s\n", entry->Location, GSM_MemoryTypeToString(entry->MemoryType));
16 #define PRINT_TODO_INFO() smprintf(s, "Location = %d\n", ToDo->Location);
17 #define PRINT_CALENDAR_INFO() smprintf(s, "Location = %d\n", Note->Location);
18 #define PRINT_NOTE_INFO() smprintf(s, "Location = %d\n", Note->Location);
19 #define PRINT_MSMS_INFO() smprintf(s, "Number = %d, Location = %d, Folder = %d\n", sms->Number, sms->SMS[0].Location, sms->SMS[0].Folder);
20 #define PRINT_SMS_INFO() smprintf(s, "Location = %d, Folder = %d\n", sms->Location, sms->Folder);
21 #define PRINT_START() if (start) smprintf(s, "Starting reading!\n");
22 
28 #define PRINT_LOG_ERROR(err) \
29 { \
30  GSM_LogError(s, __FUNCTION__, err); \
31  PRINT_FUNCTION_END \
32 }
33 
38 #define CHECK_PHONE_CONNECTION() \
39 { \
40  PRINT_FUNCTION_START \
41  if (!GSM_IsConnected(s)) { \
42  return ERR_NOTCONNECTED; \
43  } \
44  if (s->Phone.Functions->PreAPICall != NONEFUNCTION) { \
45  err = s->Phone.Functions->PreAPICall(s); \
46  if (err != ERR_NONE) { \
47  return err; \
48  } \
49  } \
50 }
51 
56 #define RUN_RESTARTABLE(return_value, function_call) \
57 { \
58  int restarts; \
59  for (restarts = 0; restarts < 10; ++restarts) { \
60  unsigned useconds = 10000 << restarts; \
61  return_value = (function_call); \
62  if (return_value != ERR_BUSY) \
63  break; \
64  smprintf(s, "Sleeping %d ms before retrying the last command\n", useconds / 1000); \
65  usleep(useconds); \
66  } \
67 }
68 
73 {
74  GSM_Error err;
75 
77 
78  s->Phone.Data.Manufacturer[0] = '\0';
79  err = s->Phone.Functions->GetManufacturer(s);
80  if (value != NULL) {
81  strcpy(value, s->Phone.Data.Manufacturer);
82  }
83 
84  PRINT_LOG_ERROR(err);
85  return err;
86 }
91 {
92  GSM_Error err;
93 
95 
96  s->Phone.Data.Model[0] = '\0';
97  err = s->Phone.Functions->GetModel(s);
98  if (value != NULL) {
99  strcpy(value, s->Phone.Data.Model);
100  }
101 
102  PRINT_LOG_ERROR(err);
103  return err;
104 }
108 GSM_Error GSM_GetFirmware(GSM_StateMachine *s, char *value, char *date, double *num)
109 {
110  GSM_Error err;
111 
113 
114  s->Phone.Data.Version[0] = '\0';
115  err = s->Phone.Functions->GetFirmware(s);
116  if (value != NULL) {
117  strcpy(value, s->Phone.Data.Version);
118  }
119  if (date != NULL) {
120  strcpy(date, s->Phone.Data.VerDate);
121  }
122  if (num != NULL) {
123  *num = s->Phone.Data.VerNum;
124  }
125 
126  PRINT_LOG_ERROR(err);
127  return err;
128 }
133 {
134  GSM_Error err;
135 
137 
138  s->Phone.Data.IMEI[0] = '\0';
139  err = s->Phone.Functions->GetIMEI(s);
140  if (value != NULL) {
141  strcpy(value, s->Phone.Data.IMEI);
142  }
143 
144  PRINT_LOG_ERROR(err);
145  return err;
146 }
151 {
152  GSM_Error err;
153 
155 
156  err = s->Phone.Functions->GetOriginalIMEI(s, value);
157  PRINT_LOG_ERROR(err);
158  return err;
159 }
164 {
165  GSM_Error err;
166 
168 
169  err = s->Phone.Functions->GetManufactureMonth(s, value);
170  PRINT_LOG_ERROR(err);
171  return err;
172 }
177 {
178  GSM_Error err;
179 
181 
182  err = s->Phone.Functions->GetProductCode(s, value);
183  PRINT_LOG_ERROR(err);
184  return err;
185 }
190 {
191  GSM_Error err;
192 
194 
195  err = s->Phone.Functions->GetHardware(s, value);
196  PRINT_LOG_ERROR(err);
197  return err;
198 }
204 {
205  GSM_Error err;
206 
208 
209  err = s->Phone.Functions->GetPPM(s, value);
210  PRINT_LOG_ERROR(err);
211  return err;
212 }
217 {
218  GSM_Error err;
219 
221 
222  err = s->Phone.Functions->GetSIMIMSI(s, IMSI);
223  PRINT_LOG_ERROR(err);
224  return err;
225 }
230 {
231  GSM_Error err;
232 
234 
235  err = s->Phone.Functions->GetDateTime(s, date_time);
236  PRINT_LOG_ERROR(err);
237  return err;
238 }
243 {
244  GSM_Error err;
245 
247 
248  err = s->Phone.Functions->SetDateTime(s, date_time);
249  PRINT_LOG_ERROR(err);
250  return err;
251 }
256 {
257  GSM_Error err;
258 
260 
261  err = s->Phone.Functions->GetAlarm(s, Alarm);
262  PRINT_LOG_ERROR(err);
263  return err;
264 }
269 {
270  GSM_Error err;
271 
273 
274  err = s->Phone.Functions->SetAlarm(s, Alarm);
275  PRINT_LOG_ERROR(err);
276  return err;
277 }
282 {
283  GSM_Error err;
284 
286 
287  err = s->Phone.Functions->GetLocale(s, locale);
288  PRINT_LOG_ERROR(err);
289  return err;
290 }
295 {
296  GSM_Error err;
297 
299 
300  err = s->Phone.Functions->SetLocale(s, locale);
301  PRINT_LOG_ERROR(err);
302  return err;
303 }
308 {
309  GSM_Error err;
310 
312 
313  err = s->Phone.Functions->SetPower(s, on);
314  PRINT_LOG_ERROR(err);
315  return err;
316 }
321 {
322  GSM_Error err;
323 
325 
326  err = s->Phone.Functions->PressKey(s, Key, Press);
327  PRINT_LOG_ERROR(err);
328  return err;
329 }
334 {
335  GSM_Error err;
336 
338 
339  err = s->Phone.Functions->Reset(s, hard);
340  PRINT_LOG_ERROR(err);
341  return err;
342 }
347 {
348  GSM_Error err;
349 
351 
352  err = s->Phone.Functions->ResetPhoneSettings(s, Type);
353  PRINT_LOG_ERROR(err);
354  return err;
355 }
360 {
361  GSM_Error err;
362 
364 
365  err = s->Phone.Functions->EnterSecurityCode(s, Code);
366  PRINT_LOG_ERROR(err);
367  return err;
368 }
373 {
374  GSM_Error err;
375 
377 
378  err = s->Phone.Functions->GetSecurityStatus(s, Status);
379  PRINT_LOG_ERROR(err);
380  return err;
381 }
386 {
387  GSM_Error err;
388 
390 
391  err = s->Phone.Functions->GetDisplayStatus(s, features);
392  PRINT_LOG_ERROR(err);
393  return err;
394 }
399 {
400  GSM_Error err;
401 
403 
404  err = s->Phone.Functions->SetAutoNetworkLogin(s);
405  PRINT_LOG_ERROR(err);
406  return err;
407 }
412 {
413  GSM_Error err;
414 
416 
417  memset(bat, 0, sizeof(GSM_BatteryCharge));
418 
419  err = s->Phone.Functions->GetBatteryCharge(s, bat);
420  PRINT_LOG_ERROR(err);
421  return err;
422 }
427 {
428  GSM_Error err;
429 
431 
432  err = s->Phone.Functions->GetSignalQuality(s, sig);
433  PRINT_LOG_ERROR(err);
434  return err;
435 }
440 {
441  GSM_Error err;
442 
444 
445  netinfo->CID[0] = 0;
446  netinfo->LAC[0] = 0;
447  netinfo->PacketCID[0] = 0;
448  netinfo->PacketLAC[0] = 0;
449  netinfo->State = GSM_NetworkStatusUnknown;
451  netinfo->NetworkName[0] = 0;
452  netinfo->NetworkName[1] = 0;
453  netinfo->NetworkCode[0] = 0;
454  netinfo->GPRS = 0;
455 
456  err = s->Phone.Functions->GetNetworkInfo(s, netinfo);
457  PRINT_LOG_ERROR(err);
458  return err;
459 }
464 {
465  GSM_Error err;
466 
468 
469  err = s->Phone.Functions->GetCategory(s, Category);
470  PRINT_LOG_ERROR(err);
471  return err;
472 }
477 {
478  GSM_Error err;
479 
481 
482  err = s->Phone.Functions->AddCategory(s, Category);
483  PRINT_LOG_ERROR(err);
484  return err;
485 }
490 {
491  GSM_Error err;
492 
494 
495  err = s->Phone.Functions->GetCategoryStatus(s, Status);
496  PRINT_LOG_ERROR(err);
497  return err;
498 }
504 {
505  GSM_Error err;
506 
508 
509  err = s->Phone.Functions->GetMemoryStatus(s, status);
510  PRINT_LOG_ERROR(err);
511  return err;
512 }
518 {
519  GSM_Error err;
520 
523 
524  err = s->Phone.Functions->GetMemory(s, entry);
525  PRINT_LOG_ERROR(err);
526  return err;
527 }
533 {
534  GSM_Error err;
535 
537  PRINT_START();
539 
540  err = s->Phone.Functions->GetNextMemory(s, entry, start);
541  PRINT_LOG_ERROR(err);
542  return err;
543 }
548 {
549  GSM_Error err;
550 
553 
554  RUN_RESTARTABLE(err, s->Phone.Functions->SetMemory(s, entry));
555  PRINT_LOG_ERROR(err);
556  return err;
557 }
562 {
563  GSM_Error err;
564 
567 
568  err = s->Phone.Functions->AddMemory(s, entry);
569  PRINT_LOG_ERROR(err);
570  return err;
571 }
576 {
577  GSM_Error err;
578 
581 
582  RUN_RESTARTABLE(err, s->Phone.Functions->DeleteMemory(s, entry));
583  PRINT_LOG_ERROR(err);
584  return err;
585 }
590 {
591  GSM_Error err;
592 
594 
595  err = s->Phone.Functions->DeleteAllMemory(s, MemoryType);
596  PRINT_LOG_ERROR(err);
597  return err;
598 }
603 {
604  GSM_Error err;
605 
607 
608  err = s->Phone.Functions->GetSpeedDial(s, Speed);
609  PRINT_LOG_ERROR(err);
610  return err;
611 }
616 {
617  GSM_Error err;
618 
620 
621  err = s->Phone.Functions->SetSpeedDial(s, Speed);
622  PRINT_LOG_ERROR(err);
623  return err;
624 }
629 {
630  GSM_Error err;
631 
633 
634  err = s->Phone.Functions->GetSMSC(s, smsc);
635  PRINT_LOG_ERROR(err);
636  return err;
637 }
642 {
643  GSM_Error err;
644 
646 
647  err = s->Phone.Functions->SetSMSC(s, smsc);
648  PRINT_LOG_ERROR(err);
649  return err;
650 }
656 {
657  GSM_Error err;
658 
660 
661  err = s->Phone.Functions->GetSMSStatus(s, status);
662  PRINT_LOG_ERROR(err);
663  return err;
664 }
669 {
670  GSM_Error err;
671 
673  PRINT_MSMS_INFO();
674 
675  err = s->Phone.Functions->GetSMS(s, sms);
676  PRINT_LOG_ERROR(err);
677  return err;
678 }
684 {
685  GSM_Error err;
686 
688  PRINT_START();
689  PRINT_MSMS_INFO();
690 
691  err = s->Phone.Functions->GetNextSMS(s, sms, start);
692  PRINT_LOG_ERROR(err);
693  return err;
694 }
699 {
700  GSM_Error err;
701 
703  PRINT_SMS_INFO();
704 
705  err = s->Phone.Functions->SetSMS(s, sms);
706  PRINT_LOG_ERROR(err);
707  return err;
708 }
713 {
714  GSM_Error err;
715 
717  PRINT_SMS_INFO();
718 
719  err = s->Phone.Functions->AddSMS(s, sms);
720  PRINT_LOG_ERROR(err);
721  return err;
722 }
727 {
728  GSM_Error err;
729 
731  PRINT_SMS_INFO();
732 
733  err = s->Phone.Functions->DeleteSMS(s, sms);
734  PRINT_LOG_ERROR(err);
735  return err;
736 }
741 {
742  GSM_Error err;
743 
745 
746  err = s->Phone.Functions->SendSMS(s, sms);
747  PRINT_LOG_ERROR(err);
748  return err;
749 }
753 GSM_Error GSM_SendSavedSMS(GSM_StateMachine *s, int Folder, int Location)
754 {
755  GSM_Error err;
756 
758  smprintf(s, "Location = %d, Folder = %d\n", Location, Folder);
759 
760  err = s->Phone.Functions->SendSavedSMS(s, Folder, Location);
761  PRINT_LOG_ERROR(err);
762  return err;
763 }
768 {
769  GSM_Error err;
770 
772 
773  err = s->Phone.Functions->SetFastSMSSending(s, enable);
774  PRINT_LOG_ERROR(err);
775  return err;
776 }
781 {
782  GSM_Error err;
783 
785 
786  err = s->Phone.Functions->SetIncomingSMS(s, enable);
787  PRINT_LOG_ERROR(err);
788  return err;
789 }
794 {
795  GSM_Error err;
796 
798 
799  err = s->Phone.Functions->SetIncomingCB(s, enable);
800  PRINT_LOG_ERROR(err);
801  return err;
802 }
807 {
808  GSM_Error err;
809 
811 
812  err = s->Phone.Functions->GetSMSFolders(s, folders);
813  PRINT_LOG_ERROR(err);
814  return err;
815 }
820 {
821  GSM_Error err;
822 
824 
825  err = s->Phone.Functions->AddSMSFolder(s, name);
826  PRINT_LOG_ERROR(err);
827  return err;
828 }
833 {
834  GSM_Error err;
835 
837 
838  err = s->Phone.Functions->DeleteSMSFolder(s, ID);
839  PRINT_LOG_ERROR(err);
840  return err;
841 }
846 {
847  GSM_Error err;
848 
850 
851  err = s->Phone.Functions->DialVoice(s, Number, ShowNumber);
852  PRINT_LOG_ERROR(err);
853  return err;
854 }
859 {
860  GSM_Error err;
861 
863 
864  err = s->Phone.Functions->DialService(s, Number);
865  PRINT_LOG_ERROR(err);
866  return err;
867 }
872 {
873  GSM_Error err;
874 
876 
877  err = s->Phone.Functions->AnswerCall(s, ID, all);
878  PRINT_LOG_ERROR(err);
879  return err;
880 }
885 {
886  GSM_Error err;
887 
889 
890  err = s->Phone.Functions->CancelCall(s, ID, all);
891  PRINT_LOG_ERROR(err);
892  return err;
893 }
898 {
899  GSM_Error err;
900 
902 
903  err = s->Phone.Functions->HoldCall(s, ID);
904  PRINT_LOG_ERROR(err);
905  return err;
906 }
911 {
912  GSM_Error err;
913 
915 
916  err = s->Phone.Functions->UnholdCall(s, ID);
917  PRINT_LOG_ERROR(err);
918  return err;
919 }
924 {
925  GSM_Error err;
926 
928 
929  err = s->Phone.Functions->ConferenceCall(s, ID);
930  PRINT_LOG_ERROR(err);
931  return err;
932 }
937 {
938  GSM_Error err;
939 
941 
942  err = s->Phone.Functions->SplitCall(s, ID);
943  PRINT_LOG_ERROR(err);
944  return err;
945 }
950 {
951  GSM_Error err;
952 
954 
955  err = s->Phone.Functions->TransferCall(s, ID, next);
956  PRINT_LOG_ERROR(err);
957  return err;
958 }
963 {
964  GSM_Error err;
965 
967 
968  err = s->Phone.Functions->SwitchCall(s, ID, next);
969  PRINT_LOG_ERROR(err);
970  return err;
971 }
976 {
977  GSM_Error err;
978 
980 
981  err = s->Phone.Functions->GetCallDivert(s, request, result);
982  PRINT_LOG_ERROR(err);
983  return err;
984 }
989 {
990  GSM_Error err;
991 
993 
994  err = s->Phone.Functions->SetCallDivert(s, divert);
995  PRINT_LOG_ERROR(err);
996  return err;
997 }
1002 {
1003  GSM_Error err;
1004 
1006 
1007  err = s->Phone.Functions->CancelAllDiverts(s);
1008  PRINT_LOG_ERROR(err);
1009  return err;
1010 }
1015 {
1016  GSM_Error err;
1017 
1019 
1020  err = s->Phone.Functions->SetIncomingCall(s, enable);
1021  PRINT_LOG_ERROR(err);
1022  return err;
1023 }
1028 {
1029  GSM_Error err;
1030 
1032 
1033  err = s->Phone.Functions->SetIncomingUSSD(s, enable);
1034  PRINT_LOG_ERROR(err);
1035  return err;
1036 }
1041 {
1042  GSM_Error err;
1043 
1045 
1046  err = s->Phone.Functions->SendDTMF(s, sequence);
1047  PRINT_LOG_ERROR(err);
1048  return err;
1049 }
1054 {
1055  GSM_Error err;
1056 
1058 
1059  err = s->Phone.Functions->GetRingtone(s, Ringtone, PhoneRingtone);
1060  PRINT_LOG_ERROR(err);
1061  return err;
1062 }
1067 {
1068  GSM_Error err;
1069 
1071 
1072  err = s->Phone.Functions->SetRingtone(s, Ringtone, maxlength);
1073  PRINT_LOG_ERROR(err);
1074  return err;
1075 }
1080 {
1081  GSM_Error err;
1082 
1084 
1085  err = s->Phone.Functions->GetRingtonesInfo(s, Info);
1086  PRINT_LOG_ERROR(err);
1087  return err;
1088 }
1093 {
1094  GSM_Error err;
1095 
1097 
1098  err = s->Phone.Functions->DeleteUserRingtones(s);
1099  PRINT_LOG_ERROR(err);
1100  return err;
1101 }
1105 GSM_Error GSM_PlayTone(GSM_StateMachine *s, int Herz, unsigned char Volume, gboolean start)
1106 {
1107  GSM_Error err;
1108 
1110 
1111  err = s->Phone.Functions->PlayTone(s, Herz, Volume, start);
1112  PRINT_LOG_ERROR(err);
1113  return err;
1114 }
1119 {
1120  GSM_Error err;
1121 
1123 
1124  err = s->Phone.Functions->GetWAPBookmark(s, bookmark);
1125  PRINT_LOG_ERROR(err);
1126  return err;
1127 }
1132 {
1133  GSM_Error err;
1134 
1136 
1137  err = s->Phone.Functions->SetWAPBookmark(s, bookmark);
1138  PRINT_LOG_ERROR(err);
1139  return err;
1140 }
1145 {
1146  GSM_Error err;
1147 
1149 
1150  err = s->Phone.Functions->DeleteWAPBookmark(s, bookmark);
1151  PRINT_LOG_ERROR(err);
1152  return err;
1153 }
1158 {
1159  GSM_Error err;
1160 
1162 
1163  err = s->Phone.Functions->GetWAPSettings(s, settings);
1164  PRINT_LOG_ERROR(err);
1165  return err;
1166 }
1171 {
1172  GSM_Error err;
1173 
1175 
1176  err = s->Phone.Functions->SetWAPSettings(s, settings);
1177  PRINT_LOG_ERROR(err);
1178  return err;
1179 }
1184 {
1185  GSM_Error err;
1186 
1188 
1189  err = s->Phone.Functions->GetSyncMLSettings(s, settings);
1190  PRINT_LOG_ERROR(err);
1191  return err;
1192 }
1197 {
1198  GSM_Error err;
1199 
1201 
1202  err = s->Phone.Functions->SetSyncMLSettings(s, settings);
1203  PRINT_LOG_ERROR(err);
1204  return err;
1205 }
1210 {
1211  GSM_Error err;
1212 
1214 
1215  err = s->Phone.Functions->GetChatSettings(s, settings);
1216  PRINT_LOG_ERROR(err);
1217  return err;
1218 }
1223 {
1224  GSM_Error err;
1225 
1227 
1228  err = s->Phone.Functions->SetChatSettings(s, settings);
1229  PRINT_LOG_ERROR(err);
1230  return err;
1231 }
1236 {
1237  GSM_Error err;
1238 
1240 
1241  err = s->Phone.Functions->GetMMSSettings(s, settings);
1242  PRINT_LOG_ERROR(err);
1243  return err;
1244 }
1249 {
1250  GSM_Error err;
1251 
1253 
1254  err = s->Phone.Functions->SetMMSSettings(s, settings);
1255  PRINT_LOG_ERROR(err);
1256  return err;
1257 }
1262 {
1263  GSM_Error err;
1264 
1266 
1267  err = s->Phone.Functions->GetMMSFolders(s, folders);
1268  PRINT_LOG_ERROR(err);
1269  return err;
1270 }
1274 GSM_Error GSM_GetNextMMSFileInfo(GSM_StateMachine *s, unsigned char *FileID, int *MMSFolder, gboolean start)
1275 {
1276  GSM_Error err;
1277 
1279  PRINT_START();
1280 
1281  err = s->Phone.Functions->GetNextMMSFileInfo(s, FileID, MMSFolder, start);
1282  PRINT_LOG_ERROR(err);
1283  return err;
1284 }
1289 {
1290  GSM_Error err;
1291 
1293 
1294  err = s->Phone.Functions->GetBitmap(s, Bitmap);
1295  PRINT_LOG_ERROR(err);
1296  return err;
1297 }
1302 {
1303  GSM_Error err;
1304 
1306 
1307  err = s->Phone.Functions->SetBitmap(s, Bitmap);
1308  PRINT_LOG_ERROR(err);
1309  return err;
1310 }
1315 {
1316  GSM_Error err;
1317 
1319 
1320  err = s->Phone.Functions->GetToDoStatus(s, status);
1321  PRINT_LOG_ERROR(err);
1322  return err;
1323 }
1328 {
1329  GSM_Error err;
1330 
1332  PRINT_TODO_INFO();
1333 
1334  err = s->Phone.Functions->GetToDo(s, ToDo);
1335  PRINT_LOG_ERROR(err);
1336  return err;
1337 }
1342 {
1343  GSM_Error err;
1344 
1346  PRINT_START();
1347  PRINT_TODO_INFO();
1348 
1349  err = s->Phone.Functions->GetNextToDo(s, ToDo, start);
1350  PRINT_LOG_ERROR(err);
1351  return err;
1352 }
1357 {
1358  GSM_Error err;
1359 
1361  PRINT_TODO_INFO();
1362 
1363  err = s->Phone.Functions->SetToDo(s, ToDo);
1364  PRINT_LOG_ERROR(err);
1365  return err;
1366 }
1371 {
1372  GSM_Error err;
1373 
1375  PRINT_TODO_INFO();
1376 
1377  err = s->Phone.Functions->AddToDo(s, ToDo);
1378  PRINT_LOG_ERROR(err);
1379  return err;
1380 }
1385 {
1386  GSM_Error err;
1387 
1389  PRINT_TODO_INFO();
1390 
1391  err = s->Phone.Functions->DeleteToDo(s, ToDo);
1392  PRINT_LOG_ERROR(err);
1393  return err;
1394 }
1399 {
1400  GSM_Error err;
1401 
1403 
1404  err = s->Phone.Functions->DeleteAllToDo(s);
1405  PRINT_LOG_ERROR(err);
1406  return err;
1407 }
1412 {
1413  GSM_Error err;
1414 
1416 
1417  err = s->Phone.Functions->GetCalendarStatus(s, Status);
1418  PRINT_LOG_ERROR(err);
1419  return err;
1420 }
1425 {
1426  GSM_Error err;
1427 
1430 
1431  err = s->Phone.Functions->GetCalendar(s, Note);
1432  PRINT_LOG_ERROR(err);
1433  return err;
1434 }
1440 {
1441  GSM_Error err;
1442 
1444  PRINT_START();
1446 
1447  err = s->Phone.Functions->GetNextCalendar(s, Note, start);
1448  PRINT_LOG_ERROR(err);
1449  return err;
1450 }
1455 {
1456  GSM_Error err;
1457 
1460 
1461  err = s->Phone.Functions->SetCalendar(s, Note);
1462  PRINT_LOG_ERROR(err);
1463  return err;
1464 }
1469 {
1470  GSM_Error err;
1471 
1474 
1475  err = s->Phone.Functions->AddCalendar(s, Note);
1476  PRINT_LOG_ERROR(err);
1477  return err;
1478 }
1483 {
1484  GSM_Error err;
1485 
1488 
1489  err = s->Phone.Functions->DeleteCalendar(s, Note);
1490  PRINT_LOG_ERROR(err);
1491  return err;
1492 }
1497 {
1498  GSM_Error err;
1499 
1501 
1502  err = s->Phone.Functions->DeleteAllCalendar(s);
1503  PRINT_LOG_ERROR(err);
1504  return err;
1505 }
1510 {
1511  GSM_Error err;
1512 
1514 
1515  err = s->Phone.Functions->GetCalendarSettings(s, settings);
1516  PRINT_LOG_ERROR(err);
1517  return err;
1518 }
1523 {
1524  GSM_Error err;
1525 
1527 
1528  err = s->Phone.Functions->SetCalendarSettings(s, settings);
1529  PRINT_LOG_ERROR(err);
1530  return err;
1531 }
1536 {
1537  GSM_Error err;
1538 
1540 
1541  err = s->Phone.Functions->GetNotesStatus(s, status);
1542  PRINT_LOG_ERROR(err);
1543  return err;
1544 }
1549 {
1550  GSM_Error err;
1551 
1553  PRINT_NOTE_INFO();
1554 
1555  err = s->Phone.Functions->GetNote(s, Note);
1556  PRINT_LOG_ERROR(err);
1557  return err;
1558 }
1564 {
1565  GSM_Error err;
1566 
1568  PRINT_START();
1569  PRINT_NOTE_INFO();
1570 
1571  err = s->Phone.Functions->GetNextNote(s, Note, start);
1572  PRINT_LOG_ERROR(err);
1573  return err;
1574 }
1579 {
1580  GSM_Error err;
1581 
1583  PRINT_NOTE_INFO();
1584 
1585  err = s->Phone.Functions->SetNote(s, Note);
1586  PRINT_LOG_ERROR(err);
1587  return err;
1588 }
1593 {
1594  GSM_Error err;
1595 
1597  PRINT_NOTE_INFO();
1598 
1599  err = s->Phone.Functions->AddNote(s, Note);
1600  PRINT_LOG_ERROR(err);
1601  return err;
1602 }
1607 {
1608  GSM_Error err;
1609 
1611  PRINT_NOTE_INFO();
1612 
1613  err = s->Phone.Functions->DeleteNote(s, Note);
1614  PRINT_LOG_ERROR(err);
1615  return err;
1616 }
1621 {
1622  GSM_Error err;
1623 
1625 
1626  err = s->Phone.Functions->DeleteAllNotes(s);
1627  PRINT_LOG_ERROR(err);
1628  return err;
1629 }
1634 {
1635  GSM_Error err;
1636 
1638 
1639  err = s->Phone.Functions->GetProfile(s, Profile);
1640  PRINT_LOG_ERROR(err);
1641  return err;
1642 }
1647 {
1648  GSM_Error err;
1649 
1651 
1652  err = s->Phone.Functions->SetProfile(s, Profile);
1653  PRINT_LOG_ERROR(err);
1654  return err;
1655 }
1660 {
1661  GSM_Error err;
1662 
1664 
1665  err = s->Phone.Functions->GetFMStation(s, FMStation);
1666  PRINT_LOG_ERROR(err);
1667  return err;
1668 }
1673 {
1674  GSM_Error err;
1675 
1677 
1678  err = s->Phone.Functions->SetFMStation(s, FMStation);
1679  PRINT_LOG_ERROR(err);
1680  return err;
1681 }
1686 {
1687  GSM_Error err;
1688 
1690 
1691  err = s->Phone.Functions->ClearFMStations(s);
1692  PRINT_LOG_ERROR(err);
1693  return err;
1694 }
1699 {
1700  GSM_Error err;
1701 
1703  PRINT_START();
1704 
1705  err = s->Phone.Functions->GetNextFileFolder(s, File, start);
1706  PRINT_LOG_ERROR(err);
1707  return err;
1708 }
1713 {
1714  GSM_Error err;
1715 
1717  PRINT_START();
1718 
1719  err = s->Phone.Functions->GetFolderListing(s, File, start);
1720  PRINT_LOG_ERROR(err);
1721  return err;
1722 }
1727 {
1728  GSM_Error err;
1729 
1731 
1732  err = s->Phone.Functions->GetNextRootFolder(s, File);
1733  PRINT_LOG_ERROR(err);
1734  return err;
1735 }
1740 {
1741  GSM_Error err;
1742 
1744 
1745  err = s->Phone.Functions->SetFileAttributes(s, File);
1746  PRINT_LOG_ERROR(err);
1747  return err;
1748 }
1752 GSM_Error GSM_GetFilePart(GSM_StateMachine *s, GSM_File *File, int *Handle, size_t *Size)
1753 {
1754  GSM_Error err;
1755 
1757 
1758  err = s->Phone.Functions->GetFilePart(s, File, Handle, Size);
1759  PRINT_LOG_ERROR(err);
1760  return err;
1761 }
1765 GSM_Error GSM_AddFilePart(GSM_StateMachine *s, GSM_File *File, size_t *Pos, int *Handle)
1766 {
1767  GSM_Error err;
1768 
1770 
1771  err = s->Phone.Functions->AddFilePart(s, File, Pos, Handle);
1772  PRINT_LOG_ERROR(err);
1773  return err;
1774 }
1778 GSM_Error GSM_SendFilePart(GSM_StateMachine *s, GSM_File *File, size_t *Pos, int *Handle)
1779 {
1780  GSM_Error err;
1781 
1783 
1784  err = s->Phone.Functions->SendFilePart(s, File, Pos, Handle);
1785  PRINT_LOG_ERROR(err);
1786  return err;
1787 }
1792 {
1793  GSM_Error err;
1794 
1796 
1797  err = s->Phone.Functions->GetFileSystemStatus(s, Status);
1798  PRINT_LOG_ERROR(err);
1799  return err;
1800 }
1805 {
1806  GSM_Error err;
1807 
1809 
1810  err = s->Phone.Functions->DeleteFile(s, ID);
1811  PRINT_LOG_ERROR(err);
1812  return err;
1813 }
1818 {
1819  GSM_Error err;
1820 
1822 
1823  err = s->Phone.Functions->AddFolder(s, File);
1824  PRINT_LOG_ERROR(err);
1825  return err;
1826 }
1831 {
1832  GSM_Error err;
1833 
1835 
1836  err = s->Phone.Functions->DeleteFolder(s, ID);
1837  PRINT_LOG_ERROR(err);
1838  return err;
1839 }
1844 {
1845  GSM_Error err;
1846 
1848 
1849  err = s->Phone.Functions->GetGPRSAccessPoint(s, point);
1850  PRINT_LOG_ERROR(err);
1851  return err;
1852 }
1857 {
1858  GSM_Error err;
1859 
1861 
1862  err = s->Phone.Functions->SetGPRSAccessPoint(s, point);
1863  PRINT_LOG_ERROR(err);
1864  return err;
1865 }
1866 
1871 {
1872  GSM_Error err;
1873 
1875 
1876  picture->Length = 0;
1877  picture->Buffer = NULL;
1878  picture->Type = 0;
1879 
1880  err = s->Phone.Functions->GetScreenshot(s, picture);
1881  PRINT_LOG_ERROR(err);
1882  return err;
1883 }
1884 
1888 GSM_Error GSM_Install(GSM_StateMachine *s, const char *ExtraPath, gboolean Minimal)
1889 {
1890  GSM_Error err;
1891 
1892  err = s->Phone.Functions->Install(s, ExtraPath, Minimal);
1893  PRINT_LOG_ERROR(err);
1894  return err;
1895 }
1896 
1897 /* How should editor hadle tabs in this file? Add editor commands here.
1898  * vim: noexpandtab sw=8 ts=8 sts=8:
1899  */
GSM_Error GSM_GetSecurityStatus(GSM_StateMachine *s, GSM_SecurityCodeType *Status)
Definition: api.c:372
GSM_Error(* CancelAllDiverts)(GSM_StateMachine *s)
Definition: gsmstate.h:1043
GSM_Error GSM_DeleteAllNotes(GSM_StateMachine *s)
Definition: api.c:1620
GSM_Error GSM_SetIncomingUSSD(GSM_StateMachine *s, gboolean enable)
Definition: api.c:1027
GSM_Error(* GetNextFileFolder)(GSM_StateMachine *s, GSM_File *File, gboolean start)
Definition: gsmstate.h:1253
GSM_Error(* SetPower)(GSM_StateMachine *s, gboolean on)
Definition: gsmstate.h:1309
GSM_Error GSM_SetWAPSettings(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: api.c:1170
GSM_Error GSM_SendSavedSMS(GSM_StateMachine *s, int Folder, int Location)
Definition: api.c:753
GSM_Error GSM_DialVoice(GSM_StateMachine *s, char *Number, GSM_CallShowNumber ShowNumber)
Definition: api.c:845
GSM_Error(* GetAlarm)(GSM_StateMachine *s, GSM_Alarm *Alarm)
Definition: gsmstate.h:822
#define PRINT_CALENDAR_INFO()
Definition: api.c:17
GSM_Error GSM_DialService(GSM_StateMachine *s, char *Number)
Definition: api.c:858
GSM_Error(* GetGPRSAccessPoint)(GSM_StateMachine *s, GSM_GPRSAccessPoint *point)
Definition: gsmstate.h:1297
GSM_Error GSM_SetSMSC(GSM_StateMachine *s, GSM_SMSC *smsc)
Definition: api.c:641
GSM_Error(* AddCategory)(GSM_StateMachine *s, GSM_Category *Category)
Definition: gsmstate.h:882
GSM_Error GSM_SendDTMF(GSM_StateMachine *s, char *sequence)
Definition: api.c:1040
GSM_Error GSM_GetSMSC(GSM_StateMachine *s, GSM_SMSC *smsc)
Definition: api.c:628
GSM_Error(* SendSMS)(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: gsmstate.h:963
GSM_Error(* DeleteSMSFolder)(GSM_StateMachine *s, int ID)
Definition: gsmstate.h:991
GSM_Error GSM_SetMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: api.c:547
GSM_Error(* GetCalendarSettings)(GSM_StateMachine *s, GSM_CalendarSettings *settings)
Definition: gsmstate.h:1196
GSM_Error(* GetNextRootFolder)(GSM_StateMachine *s, GSM_File *File)
Definition: gsmstate.h:1261
GSM_Error(* SetAlarm)(GSM_StateMachine *s, GSM_Alarm *Alarm)
Definition: gsmstate.h:826
GSM_Error GSM_PressKey(GSM_StateMachine *s, GSM_KeyCode Key, gboolean Press)
Definition: api.c:320
GSM_Error(* SetMMSSettings)(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: gsmstate.h:1119
GSM_Error GSM_DeleteNote(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: api.c:1606
GSM_Error(* GetFileSystemStatus)(GSM_StateMachine *s, GSM_FileSystemStatus *Status)
Definition: gsmstate.h:1281
GSM_Error GSM_GetSyncMLSettings(GSM_StateMachine *s, GSM_SyncMLSettings *settings)
Definition: api.c:1183
GSM_Error(* GetCategory)(GSM_StateMachine *s, GSM_Category *Category)
Definition: gsmstate.h:878
GSM_Error GSM_DeleteMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: api.c:575
GSM_Error(* DeleteToDo)(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: gsmstate.h:1159
GSM_Error GSM_ClearFMStations(GSM_StateMachine *s)
Definition: api.c:1685
GSM_Error(* PressKey)(GSM_StateMachine *s, GSM_KeyCode Key, gboolean Press)
Definition: gsmstate.h:838
GSM_Error(* SetIncomingSMS)(GSM_StateMachine *s, gboolean enable)
Definition: gsmstate.h:975
GSM_Error(* SetSMSC)(GSM_StateMachine *s, GSM_SMSC *smsc)
Definition: gsmstate.h:933
GSM_Error GSM_SetProfile(GSM_StateMachine *s, GSM_Profile *Profile)
Definition: api.c:1646
GSM_Error GSM_GetCalendarStatus(GSM_StateMachine *s, GSM_CalendarStatus *Status)
Definition: api.c:1411
GSM_Error(* SetSpeedDial)(GSM_StateMachine *s, GSM_SpeedDial *Speed)
Definition: gsmstate.h:925
GSM_Error(* GetNextToDo)(GSM_StateMachine *s, GSM_ToDoEntry *ToDo, gboolean start)
Definition: gsmstate.h:1147
GSM_Error(* GetToDoStatus)(GSM_StateMachine *s, GSM_ToDoStatus *status)
Definition: gsmstate.h:1139
GSM_Error GSM_SendFilePart(GSM_StateMachine *s, GSM_File *File, size_t *Pos, int *Handle)
Definition: api.c:1778
GSM_Error(* GetHardware)(GSM_StateMachine *s, char *value)
Definition: gsmstate.h:801
GSM_Error(* DeleteAllCalendar)(GSM_StateMachine *s)
Definition: gsmstate.h:1192
GSM_Error(* GetManufactureMonth)(GSM_StateMachine *s, char *value)
Definition: gsmstate.h:793
#define PRINT_TODO_INFO()
Definition: api.c:16
GSM_Error(* GetOriginalIMEI)(GSM_StateMachine *s, char *value)
Definition: gsmstate.h:789
GSM_Error GSM_SetGPRSAccessPoint(GSM_StateMachine *s, GSM_GPRSAccessPoint *point)
Definition: api.c:1856
GSM_Error(* TransferCall)(GSM_StateMachine *s, int ID, gboolean next)
Definition: gsmstate.h:1027
GSM_Error(* SetFileAttributes)(GSM_StateMachine *s, GSM_File *File)
Definition: gsmstate.h:1265
GSM_Error GSM_SetCalendarSettings(GSM_StateMachine *s, GSM_CalendarSettings *settings)
Definition: api.c:1522
GSM_Error(* SetFMStation)(GSM_StateMachine *s, GSM_FMStation *FMStation)
Definition: gsmstate.h:1245
unsigned char NetworkName[15 *2]
Definition: gammu-info.h:135
GSM_Error GSM_GetNextCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note, gboolean start)
Definition: api.c:1439
GSM_Error GSM_SetIncomingSMS(GSM_StateMachine *s, gboolean enable)
Definition: api.c:780
GSM_Error(* SplitCall)(GSM_StateMachine *s, int ID)
Definition: gsmstate.h:1023
GSM_Error GSM_GetBatteryCharge(GSM_StateMachine *s, GSM_BatteryCharge *bat)
Definition: api.c:411
GSM_Error GSM_TransferCall(GSM_StateMachine *s, int ID, gboolean next)
Definition: api.c:949
char VerDate[GSM_MAX_VERSION_DATE_LENGTH+1]
Definition: gsmstate.h:458
GSM_Error(* Reset)(GSM_StateMachine *s, gboolean hard)
Definition: gsmstate.h:842
GSM_Error(* EnterSecurityCode)(GSM_StateMachine *s, GSM_SecurityCode *Code)
Definition: gsmstate.h:850
GSM_Error GSM_DeleteFile(GSM_StateMachine *s, unsigned char *ID)
Definition: api.c:1804
GSM_Error GSM_DeleteUserRingtones(GSM_StateMachine *s)
Definition: api.c:1092
GSM_Error GSM_GetPPM(GSM_StateMachine *s, char *value)
Definition: api.c:203
GSM_Error(* AddMemory)(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: gsmstate.h:909
GSM_Error GSM_GetMMSSettings(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: api.c:1235
GSM_Error GSM_Reset(GSM_StateMachine *s, gboolean hard)
Definition: api.c:333
GSM_Error(* DeleteMemory)(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: gsmstate.h:913
GSM_Error GSM_AnswerCall(GSM_StateMachine *s, int ID, gboolean all)
Definition: api.c:871
GSM_Error(* GetSyncMLSettings)(GSM_StateMachine *s, GSM_SyncMLSettings *settings)
Definition: gsmstate.h:1099
GSM_Error(* SetAutoNetworkLogin)(GSM_StateMachine *s)
Definition: gsmstate.h:862
GSM_Error GSM_GetNextMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry, gboolean start)
Definition: api.c:532
GSM_Error GSM_SetPower(GSM_StateMachine *s, gboolean on)
Definition: api.c:307
GSM_Error(* SetDateTime)(GSM_StateMachine *s, GSM_DateTime *date_time)
Definition: gsmstate.h:818
GSM_Error GSM_SetFMStation(GSM_StateMachine *s, GSM_FMStation *FMStation)
Definition: api.c:1672
GSM_Error
Definition: gammu-error.h:23
GSM_Error GSM_GetNextMMSFileInfo(GSM_StateMachine *s, unsigned char *FileID, int *MMSFolder, gboolean start)
Definition: api.c:1274
GSM_Error GSM_SetChatSettings(GSM_StateMachine *s, GSM_ChatSettings *settings)
Definition: api.c:1222
GSM_Error GSM_GetCategory(GSM_StateMachine *s, GSM_Category *Category)
Definition: api.c:463
GSM_Error GSM_DeleteSMSFolder(GSM_StateMachine *s, int ID)
Definition: api.c:832
GSM_Error(* GetWAPSettings)(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: gsmstate.h:1091
GSM_Error GSM_GetGPRSAccessPoint(GSM_StateMachine *s, GSM_GPRSAccessPoint *point)
Definition: api.c:1843
GSM_BinaryPicture_Types Type
Definition: gammu-bitmap.h:44
GSM_Error(* GetSMSC)(GSM_StateMachine *s, GSM_SMSC *smsc)
Definition: gsmstate.h:929
#define PRINT_START()
Definition: api.c:21
GSM_Error(* GetWAPBookmark)(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
Definition: gsmstate.h:1079
GSM_Error GSM_GetNote(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: api.c:1548
GSM_CallShowNumber
Definition: gammu-call.h:192
GSM_Error(* SetGPRSAccessPoint)(GSM_StateMachine *s, GSM_GPRSAccessPoint *point)
Definition: gsmstate.h:1301
GSM_Error(* GetSignalQuality)(GSM_StateMachine *s, GSM_SignalQuality *sig)
Definition: gsmstate.h:870
GSM_Error(* GetFMStation)(GSM_StateMachine *s, GSM_FMStation *FMStation)
Definition: gsmstate.h:1241
unsigned char * Buffer
Definition: gammu-bitmap.h:45
GSM_Error GSM_GetIMEI(GSM_StateMachine *s, char *value)
Definition: api.c:132
GSM_Error GSM_CancelAllDiverts(GSM_StateMachine *s)
Definition: api.c:1001
GSM_Error(* GetSMSStatus)(GSM_StateMachine *s, GSM_SMSMemoryStatus *status)
Definition: gsmstate.h:938
GSM_Error(* GetNextSMS)(GSM_StateMachine *s, GSM_MultiSMSMessage *sms, gboolean start)
Definition: gsmstate.h:947
GSM_Error(* SetSMS)(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: gsmstate.h:951
char LAC[10]
Definition: gammu-info.h:131
GSM_Error(* AddFilePart)(GSM_StateMachine *s, GSM_File *File, size_t *Pos, int *Handle)
Definition: gsmstate.h:1273
GSM_Error(* DeleteFolder)(GSM_StateMachine *s, unsigned char *ID)
Definition: gsmstate.h:1293
GSM_Error GSM_DeleteToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: api.c:1384
GSM_Error(* GetNextMemory)(GSM_StateMachine *s, GSM_MemoryEntry *entry, gboolean start)
Definition: gsmstate.h:901
char PacketCID[10]
Definition: gammu-info.h:143
GSM_Error GSM_DeleteCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: api.c:1482
const char features[]
Definition: feature_tests.c:2
GSM_Error GSM_GetToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: api.c:1327
GSM_Error GSM_SetIncomingCB(GSM_StateMachine *s, gboolean enable)
Definition: api.c:793
GSM_Error(* SetLocale)(GSM_StateMachine *s, GSM_Locale *locale)
Definition: gsmstate.h:834
char IMEI[GSM_MAX_IMEI_LENGTH+1]
Definition: gsmstate.h:437
char Version[GSM_MAX_VERSION_LENGTH+1]
Definition: gsmstate.h:454
GSM_Error(* AddNote)(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: gsmstate.h:1221
GSM_Error(* DeleteAllToDo)(GSM_StateMachine *s)
Definition: gsmstate.h:1163
GSM_Error GSM_GetCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: api.c:1424
GSM_Error GSM_ConferenceCall(GSM_StateMachine *s, int ID)
Definition: api.c:923
GSM_Error(* GetRingtonesInfo)(GSM_StateMachine *s, GSM_AllRingtonesInfo *Info)
Definition: gsmstate.h:1067
#define PRINT_MSMS_INFO()
Definition: api.c:19
GSM_Error GSM_SetAlarm(GSM_StateMachine *s, GSM_Alarm *Alarm)
Definition: api.c:268
GSM_Error GSM_AddFilePart(GSM_StateMachine *s, GSM_File *File, size_t *Pos, int *Handle)
Definition: api.c:1765
char Manufacturer[GSM_MAX_MANUFACTURER_LENGTH+1]
Definition: gsmstate.h:441
GSM_Error(* SendFilePart)(GSM_StateMachine *s, GSM_File *File, size_t *Pos, int *Handle)
Definition: gsmstate.h:1277
GSM_Error GSM_CancelCall(GSM_StateMachine *s, int ID, gboolean all)
Definition: api.c:884
char NetworkCode[10]
Definition: gammu-info.h:122
GSM_Error GSM_GetNextSMS(GSM_StateMachine *s, GSM_MultiSMSMessage *sms, gboolean start)
Definition: api.c:683
GSM_Error GSM_DeleteAllToDo(GSM_StateMachine *s)
Definition: api.c:1398
char CID[10]
Definition: gammu-info.h:118
GSM_Error(* AddFolder)(GSM_StateMachine *s, GSM_File *File)
Definition: gsmstate.h:1289
GSM_Error(* SetSyncMLSettings)(GSM_StateMachine *s, GSM_SyncMLSettings *settings)
Definition: gsmstate.h:1103
GSM_Error(* AddSMS)(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: gsmstate.h:955
GSM_Error(* GetSpeedDial)(GSM_StateMachine *s, GSM_SpeedDial *Speed)
Definition: gsmstate.h:921
GSM_Error(* GetModel)(GSM_StateMachine *s)
Definition: gsmstate.h:777
GSM_Error(* DialService)(GSM_StateMachine *s, char *Number)
Definition: gsmstate.h:999
GSM_Error(* GetChatSettings)(GSM_StateMachine *s, GSM_ChatSettings *settings)
Definition: gsmstate.h:1107
GSM_Error GSM_GetNextNote(GSM_StateMachine *s, GSM_NoteEntry *Note, gboolean start)
Definition: api.c:1563
GSM_Error(* GetManufacturer)(GSM_StateMachine *s)
Definition: gsmstate.h:773
GSM_Error(* DeleteAllNotes)(GSM_StateMachine *s)
Definition: gsmstate.h:1229
GSM_Error(* DeleteFile)(GSM_StateMachine *s, unsigned char *ID)
Definition: gsmstate.h:1285
GSM_Error(* DeleteCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: gsmstate.h:1188
GSM_Error GSM_GetSMSFolders(GSM_StateMachine *s, GSM_SMSFolders *folders)
Definition: api.c:806
GSM_Error GSM_GetSIMIMSI(GSM_StateMachine *s, char *IMSI)
Definition: api.c:216
GSM_Error(* GetNetworkInfo)(GSM_StateMachine *s, GSM_NetworkInfo *netinfo)
Definition: gsmstate.h:874
GSM_Error GSM_AddSMSFolder(GSM_StateMachine *s, unsigned char *name)
Definition: api.c:819
GSM_Error(* DeleteAllMemory)(GSM_StateMachine *s, GSM_MemoryType MemoryType)
Definition: gsmstate.h:917
int gboolean
Definition: gammu-types.h:23
GSM_Error(* GetFirmware)(GSM_StateMachine *s)
Definition: gsmstate.h:781
GSM_Error GSM_GetCategoryStatus(GSM_StateMachine *s, GSM_CategoryStatus *Status)
Definition: api.c:489
GSM_Error GSM_SendSMS(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: api.c:740
GSM_MemoryType
Definition: gammu-memory.h:31
GSM_Error(* GetCategoryStatus)(GSM_StateMachine *s, GSM_CategoryStatus *Status)
Definition: gsmstate.h:886
GSM_Error GSM_GetFolderListing(GSM_StateMachine *s, GSM_File *File, gboolean start)
Definition: api.c:1712
GSM_Error GSM_GetModel(GSM_StateMachine *s, char *value)
Definition: api.c:90
GSM_Error GSM_GetChatSettings(GSM_StateMachine *s, GSM_ChatSettings *settings)
Definition: api.c:1209
GSM_Error GSM_GetLocale(GSM_StateMachine *s, GSM_Locale *locale)
Definition: api.c:281
GSM_Error GSM_GetSpeedDial(GSM_StateMachine *s, GSM_SpeedDial *Speed)
Definition: api.c:602
GSM_Error GSM_SetSpeedDial(GSM_StateMachine *s, GSM_SpeedDial *Speed)
Definition: api.c:615
#define PRINT_MEMORY_INFO()
Definition: api.c:15
GSM_Error GSM_GetToDoStatus(GSM_StateMachine *s, GSM_ToDoStatus *status)
Definition: api.c:1314
GSM_Phone Phone
Definition: gsmstate.h:1431
GSM_Error(* SetCalendarSettings)(GSM_StateMachine *s, GSM_CalendarSettings *settings)
Definition: gsmstate.h:1200
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
GSM_Error GSM_ResetPhoneSettings(GSM_StateMachine *s, GSM_ResetSettingsType Type)
Definition: api.c:346
GSM_Error GSM_SetLocale(GSM_StateMachine *s, GSM_Locale *locale)
Definition: api.c:294
GSM_Error GSM_SetCallDivert(GSM_StateMachine *s, GSM_CallDivert *divert)
Definition: api.c:988
GSM_Error GSM_GetNextRootFolder(GSM_StateMachine *s, GSM_File *File)
Definition: api.c:1726
GSM_SecurityCodeType
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Error(* SetCallDivert)(GSM_StateMachine *s, GSM_CallDivert *divert)
Definition: gsmstate.h:1039
GSM_Error GSM_GetNotesStatus(GSM_StateMachine *s, GSM_ToDoStatus *status)
Definition: api.c:1535
GSM_Error(* SetMemory)(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: gsmstate.h:905
GSM_Error(* GetSecurityStatus)(GSM_StateMachine *s, GSM_SecurityCodeType *Status)
Definition: gsmstate.h:854
GSM_Error GSM_GetProfile(GSM_StateMachine *s, GSM_Profile *Profile)
Definition: api.c:1633
GSM_Error GSM_DeleteSMS(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: api.c:726
GSM_GPRS_State GPRS
Definition: gammu-info.h:139
GSM_Error(* SetIncomingUSSD)(GSM_StateMachine *s, gboolean enable)
Definition: gsmstate.h:1051
GSM_Error(* SendSavedSMS)(GSM_StateMachine *s, int Folder, int Location)
Definition: gsmstate.h:967
GSM_Error GSM_SetSMS(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: api.c:698
GSM_Error GSM_GetNetworkInfo(GSM_StateMachine *s, GSM_NetworkInfo *netinfo)
Definition: api.c:439
GSM_Error GSM_GetMMSFolders(GSM_StateMachine *s, GSM_MMSFolders *folders)
Definition: api.c:1261
GSM_Error GSM_DeleteWAPBookmark(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
Definition: api.c:1144
GSM_Error GSM_GetWAPBookmark(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
Definition: api.c:1118
GSM_Error(* SetWAPBookmark)(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
Definition: gsmstate.h:1083
GSM_Error(* DeleteSMS)(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: gsmstate.h:959
GSM_Error GSM_SetIncomingCall(GSM_StateMachine *s, gboolean enable)
Definition: api.c:1014
GSM_Error(* GetCalendarStatus)(GSM_StateMachine *s, GSM_CalendarStatus *Status)
Definition: gsmstate.h:1167
GSM_Error GSM_GetMemoryStatus(GSM_StateMachine *s, GSM_MemoryStatus *status)
Definition: api.c:503
GSM_Error(* HoldCall)(GSM_StateMachine *s, int ID)
Definition: gsmstate.h:1011
GSM_Error GSM_GetFileSystemStatus(GSM_StateMachine *s, GSM_FileSystemStatus *Status)
Definition: api.c:1791
GSM_Error GSM_DeleteAllCalendar(GSM_StateMachine *s)
Definition: api.c:1496
GSM_Error(* GetDisplayStatus)(GSM_StateMachine *s, GSM_DisplayFeatures *features)
Definition: gsmstate.h:858
GSM_Error GSM_GetDisplayStatus(GSM_StateMachine *s, GSM_DisplayFeatures *features)
Definition: api.c:385
GSM_Error GSM_GetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap)
Definition: api.c:1288
GSM_Error(* GetSMSFolders)(GSM_StateMachine *s, GSM_SMSFolders *folders)
Definition: gsmstate.h:983
GSM_Error GSM_SetMMSSettings(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: api.c:1248
GSM_Error GSM_GetAlarm(GSM_StateMachine *s, GSM_Alarm *Alarm)
Definition: api.c:255
GSM_Error GSM_HoldCall(GSM_StateMachine *s, int ID)
Definition: api.c:897
GSM_Error(* GetMemory)(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: gsmstate.h:896
GSM_Error GSM_GetSMS(GSM_StateMachine *s, GSM_MultiSMSMessage *sms)
Definition: api.c:668
GSM_Error(* GetToDo)(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: gsmstate.h:1143
GSM_Error GSM_AddMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: api.c:561
GSM_Error GSM_SetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap)
Definition: api.c:1301
GSM_Error(* AddToDo)(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: gsmstate.h:1155
GSM_Error(* GetRingtone)(GSM_StateMachine *s, GSM_Ringtone *Ringtone, gboolean PhoneRingtone)
Definition: gsmstate.h:1059
GSM_Error(* GetNote)(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: gsmstate.h:1208
GSM_Error GSM_GetFMStation(GSM_StateMachine *s, GSM_FMStation *FMStation)
Definition: api.c:1659
GSM_Error(* GetNextNote)(GSM_StateMachine *s, GSM_NoteEntry *Note, gboolean start)
Definition: gsmstate.h:1213
GSM_NetworkInfo_State State
Definition: gammu-info.h:127
GSM_Error GSM_AddCategory(GSM_StateMachine *s, GSM_Category *Category)
Definition: api.c:476
GSM_Error GSM_SwitchCall(GSM_StateMachine *s, int ID, gboolean next)
Definition: api.c:962
GSM_Error(* PlayTone)(GSM_StateMachine *s, int Herz, unsigned char Volume, gboolean start)
Definition: gsmstate.h:1075
GSM_Error(* GetBatteryCharge)(GSM_StateMachine *s, GSM_BatteryCharge *bat)
Definition: gsmstate.h:866
GSM_Error(* GetProfile)(GSM_StateMachine *s, GSM_Profile *Profile)
Definition: gsmstate.h:1233
GSM_Error GSM_GetOriginalIMEI(GSM_StateMachine *s, char *value)
Definition: api.c:150
GSM_Error(* GetDateTime)(GSM_StateMachine *s, GSM_DateTime *date_time)
Definition: gsmstate.h:814
GSM_Error(* DeleteWAPBookmark)(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
Definition: gsmstate.h:1087
GSM_Error GSM_SetWAPBookmark(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
Definition: api.c:1131
GSM_Error(* SetIncomingCB)(GSM_StateMachine *s, gboolean enable)
Definition: gsmstate.h:979
GSM_Phone_Data Data
Definition: gsmstate.h:1369
GSM_KeyCode
Definition: gammu-keys.h:30
GSM_Error(* GetBitmap)(GSM_StateMachine *s, GSM_Bitmap *Bitmap)
Definition: gsmstate.h:1131
GSM_Error GSM_UnholdCall(GSM_StateMachine *s, int ID)
Definition: api.c:910
GSM_Error(* Install)(GSM_StateMachine *s, const char *ExtraPath, gboolean Minimal)
Definition: gsmstate.h:752
GSM_Error GSM_GetCallDivert(GSM_StateMachine *s, GSM_CallDivert *request, GSM_MultiCallDivert *result)
Definition: api.c:975
GSM_Error(* ConferenceCall)(GSM_StateMachine *s, int ID)
Definition: gsmstate.h:1019
GSM_Error(* DeleteNote)(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: gsmstate.h:1225
double VerNum
Definition: gsmstate.h:462
GSM_Error GSM_SetAutoNetworkLogin(GSM_StateMachine *s)
Definition: api.c:398
GSM_Error GSM_AddSMS(GSM_StateMachine *s, GSM_SMSMessage *sms)
Definition: api.c:712
GSM_Error GSM_AddNote(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: api.c:1592
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* SetIncomingCall)(GSM_StateMachine *s, gboolean enable)
Definition: gsmstate.h:1047
GSM_Error(* GetPPM)(GSM_StateMachine *s, char *value)
Definition: gsmstate.h:806
GSM_Error GSM_SetFastSMSSending(GSM_StateMachine *s, gboolean enable)
Definition: api.c:767
GSM_Error GSM_SetCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: api.c:1454
GSM_Error(* GetSMS)(GSM_StateMachine *s, GSM_MultiSMSMessage *sms)
Definition: gsmstate.h:942
#define RUN_RESTARTABLE(return_value, function_call)
Definition: api.c:56
GSM_Error(* SetCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: gsmstate.h:1180
GSM_Error(* SetWAPSettings)(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: gsmstate.h:1095
GSM_Error(* GetMMSFolders)(GSM_StateMachine *s, GSM_MMSFolders *folders)
Definition: gsmstate.h:1123
GSM_Error GSM_Install(GSM_StateMachine *s, const char *ExtraPath, gboolean Minimal)
Definition: api.c:1888
GSM_Error GSM_SetToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: api.c:1356
#define PRINT_SMS_INFO()
Definition: api.c:20
GSM_Error GSM_GetFilePart(GSM_StateMachine *s, GSM_File *File, int *Handle, size_t *Size)
Definition: api.c:1752
GSM_Error GSM_GetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone, gboolean PhoneRingtone)
Definition: api.c:1053
GSM_Error GSM_SetNote(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: api.c:1578
GSM_Error GSM_GetSMSStatus(GSM_StateMachine *s, GSM_SMSMemoryStatus *status)
Definition: api.c:655
GSM_Error(* GetFolderListing)(GSM_StateMachine *s, GSM_File *File, gboolean start)
Definition: gsmstate.h:1257
GSM_Error(* AddSMSFolder)(GSM_StateMachine *s, unsigned char *name)
Definition: gsmstate.h:987
GSM_Error(* SetBitmap)(GSM_StateMachine *s, GSM_Bitmap *Bitmap)
Definition: gsmstate.h:1135
GSM_Error(* GetNotesStatus)(GSM_StateMachine *s, GSM_ToDoStatus *status)
Definition: gsmstate.h:1204
GSM_Error(* UnholdCall)(GSM_StateMachine *s, int ID)
Definition: gsmstate.h:1015
GSM_Error(* GetCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: gsmstate.h:1171
GSM_NetworkInfo_State PacketState
Definition: gammu-info.h:148
char PacketLAC[10]
Definition: gammu-info.h:152
GSM_Error GSM_DeleteAllMemory(GSM_StateMachine *s, GSM_MemoryType MemoryType)
Definition: api.c:589
GSM_Error(* SendDTMF)(GSM_StateMachine *s, char *sequence)
Definition: gsmstate.h:1055
GSM_Error GSM_GetScreenshot(GSM_StateMachine *s, GSM_BinaryPicture *picture)
Definition: api.c:1870
GSM_Error(* DialVoice)(GSM_StateMachine *s, char *Number, GSM_CallShowNumber ShowNumber)
Definition: gsmstate.h:995
GSM_Error GSM_AddCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: api.c:1468
#define PRINT_NOTE_INFO()
Definition: api.c:18
GSM_Error GSM_DeleteFolder(GSM_StateMachine *s, unsigned char *ID)
Definition: api.c:1830
GSM_Error(* SetChatSettings)(GSM_StateMachine *s, GSM_ChatSettings *settings)
Definition: gsmstate.h:1111
GSM_Error(* AddCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: gsmstate.h:1184
GSM_Error GSM_GetNextFileFolder(GSM_StateMachine *s, GSM_File *File, gboolean start)
Definition: api.c:1698
GSM_Error(* ResetPhoneSettings)(GSM_StateMachine *s, GSM_ResetSettingsType Type)
Definition: gsmstate.h:846
GSM_Error(* GetSIMIMSI)(GSM_StateMachine *s, char *IMSI)
Definition: gsmstate.h:810
GSM_Error(* SwitchCall)(GSM_StateMachine *s, int ID, gboolean next)
Definition: gsmstate.h:1031
GSM_Error GSM_SetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone, int *maxlength)
Definition: api.c:1066
GSM_Error GSM_AddFolder(GSM_StateMachine *s, GSM_File *File)
Definition: api.c:1817
GSM_Error GSM_PlayTone(GSM_StateMachine *s, int Herz, unsigned char Volume, gboolean start)
Definition: api.c:1105
GSM_Error GSM_GetNextToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo, gboolean start)
Definition: api.c:1341
GSM_Error GSM_GetSignalQuality(GSM_StateMachine *s, GSM_SignalQuality *sig)
Definition: api.c:426
GSM_Error GSM_SetSyncMLSettings(GSM_StateMachine *s, GSM_SyncMLSettings *settings)
Definition: api.c:1196
GSM_Error(* GetLocale)(GSM_StateMachine *s, GSM_Locale *locale)
Definition: gsmstate.h:830
GSM_Error(* GetNextMMSFileInfo)(GSM_StateMachine *s, unsigned char *FileID, int *MMSFolder, gboolean start)
Definition: gsmstate.h:1127
GSM_Error(* SetNote)(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: gsmstate.h:1217
GSM_Error(* GetIMEI)(GSM_StateMachine *s)
Definition: gsmstate.h:785
GSM_Error(* SetToDo)(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: gsmstate.h:1151
GSM_Error(* GetNextCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note, gboolean start)
Definition: gsmstate.h:1176
GSM_Error GSM_GetCalendarSettings(GSM_StateMachine *s, GSM_CalendarSettings *settings)
Definition: api.c:1509
GSM_Error GSM_AddToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: api.c:1370
GSM_Error(* GetProductCode)(GSM_StateMachine *s, char *value)
Definition: gsmstate.h:797
GSM_Error GSM_EnterSecurityCode(GSM_StateMachine *s, GSM_SecurityCode *Code)
Definition: api.c:359
GSM_Error GSM_SetFileAttributes(GSM_StateMachine *s, GSM_File *File)
Definition: api.c:1739
GSM_Error(* AnswerCall)(GSM_StateMachine *s, int ID, gboolean all)
Definition: gsmstate.h:1003
GSM_Error GSM_GetHardware(GSM_StateMachine *s, char *value)
Definition: api.c:189
GSM_Error(* GetCallDivert)(GSM_StateMachine *s, GSM_CallDivert *request, GSM_MultiCallDivert *result)
Definition: gsmstate.h:1035
char Model[GSM_MAX_MODEL_LENGTH+1]
Definition: gsmstate.h:445
GSM_Error GSM_GetManufacturer(GSM_StateMachine *s, char *value)
Definition: api.c:72
GSM_Error GSM_GetManufactureMonth(GSM_StateMachine *s, char *value)
Definition: api.c:163
GSM_Error GSM_GetRingtonesInfo(GSM_StateMachine *s, GSM_AllRingtonesInfo *Info)
Definition: api.c:1079
GSM_Error GSM_SetDateTime(GSM_StateMachine *s, GSM_DateTime *date_time)
Definition: api.c:242
GSM_Error(* SetRingtone)(GSM_StateMachine *s, GSM_Ringtone *Ringtone, int *maxlength)
Definition: gsmstate.h:1063
GSM_Error GSM_GetWAPSettings(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: api.c:1157
GSM_Error(* GetFilePart)(GSM_StateMachine *s, GSM_File *File, int *Handle, size_t *Size)
Definition: gsmstate.h:1269
GSM_Error(* SetProfile)(GSM_StateMachine *s, GSM_Profile *Profile)
Definition: gsmstate.h:1237
GSM_Error(* CancelCall)(GSM_StateMachine *s, int ID, gboolean all)
Definition: gsmstate.h:1007
GSM_Error(* DeleteUserRingtones)(GSM_StateMachine *s)
Definition: gsmstate.h:1071
GSM_Error(* GetScreenshot)(GSM_StateMachine *s, GSM_BinaryPicture *picture)
Definition: gsmstate.h:1305
GSM_Error GSM_GetDateTime(GSM_StateMachine *s, GSM_DateTime *date_time)
Definition: api.c:229
GSM_ResetSettingsType
int smprintf(GSM_StateMachine *s, const char *format,...)
Definition: debug.c:261
GSM_Error(* SetFastSMSSending)(GSM_StateMachine *s, gboolean enable)
Definition: gsmstate.h:971
GSM_Error(* GetMMSSettings)(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: gsmstate.h:1115
GSM_Error GSM_GetProductCode(GSM_StateMachine *s, char *value)
Definition: api.c:176
GSM_Error(* GetMemoryStatus)(GSM_StateMachine *s, GSM_MemoryStatus *status)
Definition: gsmstate.h:891
GSM_Error GSM_GetFirmware(GSM_StateMachine *s, char *value, char *date, double *num)
Definition: api.c:108
GSM_Error GSM_SplitCall(GSM_StateMachine *s, int ID)
Definition: api.c:936
GSM_Error GSM_GetMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: api.c:517
GSM_Error(* ClearFMStations)(GSM_StateMachine *s)
Definition: gsmstate.h:1249