Gammu internals  1.38.0
api.c File Reference
#include <string.h>
#include <gammu.h>
#include "gsmstate.h"
#include "gsmcomon.h"
#include "debug.h"
Include dependency graph for api.c:

Go to the source code of this file.

Macros

#define PRINT_FUNCTION_START   smprintf(s, "Entering %s:%d\n", __FILE__, __LINE__);
 
#define PRINT_FUNCTION_END   smprintf(s, "Leaving %s:%d\n", __FILE__, __LINE__);
 
#define PRINT_MEMORY_INFO()   smprintf(s, "Location = %d, Memory type = %s\n", entry->Location, GSM_MemoryTypeToString(entry->MemoryType));
 
#define PRINT_TODO_INFO()   smprintf(s, "Location = %d\n", ToDo->Location);
 
#define PRINT_CALENDAR_INFO()   smprintf(s, "Location = %d\n", Note->Location);
 
#define PRINT_NOTE_INFO()   smprintf(s, "Location = %d\n", Note->Location);
 
#define PRINT_MSMS_INFO()   smprintf(s, "Number = %d, Location = %d, Folder = %d\n", sms->Number, sms->SMS[0].Location, sms->SMS[0].Folder);
 
#define PRINT_SMS_INFO()   smprintf(s, "Location = %d, Folder = %d\n", sms->Location, sms->Folder);
 
#define PRINT_START()   if (start) smprintf(s, "Starting reading!\n");
 
#define PRINT_LOG_ERROR(err)
 
#define CHECK_PHONE_CONNECTION()
 
#define RUN_RESTARTABLE(return_value, function_call)
 

Functions

GSM_Error GSM_GetManufacturer (GSM_StateMachine *s, char *value)
 
GSM_Error GSM_GetModel (GSM_StateMachine *s, char *value)
 
GSM_Error GSM_GetFirmware (GSM_StateMachine *s, char *value, char *date, double *num)
 
GSM_Error GSM_GetIMEI (GSM_StateMachine *s, char *value)
 
GSM_Error GSM_GetOriginalIMEI (GSM_StateMachine *s, char *value)
 
GSM_Error GSM_GetManufactureMonth (GSM_StateMachine *s, char *value)
 
GSM_Error GSM_GetProductCode (GSM_StateMachine *s, char *value)
 
GSM_Error GSM_GetHardware (GSM_StateMachine *s, char *value)
 
GSM_Error GSM_GetPPM (GSM_StateMachine *s, char *value)
 
GSM_Error GSM_GetSIMIMSI (GSM_StateMachine *s, char *IMSI)
 
GSM_Error GSM_GetDateTime (GSM_StateMachine *s, GSM_DateTime *date_time)
 
GSM_Error GSM_SetDateTime (GSM_StateMachine *s, GSM_DateTime *date_time)
 
GSM_Error GSM_GetAlarm (GSM_StateMachine *s, GSM_Alarm *Alarm)
 
GSM_Error GSM_SetAlarm (GSM_StateMachine *s, GSM_Alarm *Alarm)
 
GSM_Error GSM_GetLocale (GSM_StateMachine *s, GSM_Locale *locale)
 
GSM_Error GSM_SetLocale (GSM_StateMachine *s, GSM_Locale *locale)
 
GSM_Error GSM_SetPower (GSM_StateMachine *s, gboolean on)
 
GSM_Error GSM_PressKey (GSM_StateMachine *s, GSM_KeyCode Key, gboolean Press)
 
GSM_Error GSM_Reset (GSM_StateMachine *s, gboolean hard)
 
GSM_Error GSM_ResetPhoneSettings (GSM_StateMachine *s, GSM_ResetSettingsType Type)
 
GSM_Error GSM_EnterSecurityCode (GSM_StateMachine *s, GSM_SecurityCode *Code)
 
GSM_Error GSM_GetSecurityStatus (GSM_StateMachine *s, GSM_SecurityCodeType *Status)
 
GSM_Error GSM_GetDisplayStatus (GSM_StateMachine *s, GSM_DisplayFeatures *features)
 
GSM_Error GSM_SetAutoNetworkLogin (GSM_StateMachine *s)
 
GSM_Error GSM_GetBatteryCharge (GSM_StateMachine *s, GSM_BatteryCharge *bat)
 
GSM_Error GSM_GetSignalQuality (GSM_StateMachine *s, GSM_SignalQuality *sig)
 
GSM_Error GSM_GetNetworkInfo (GSM_StateMachine *s, GSM_NetworkInfo *netinfo)
 
GSM_Error GSM_GetCategory (GSM_StateMachine *s, GSM_Category *Category)
 
GSM_Error GSM_AddCategory (GSM_StateMachine *s, GSM_Category *Category)
 
GSM_Error GSM_GetCategoryStatus (GSM_StateMachine *s, GSM_CategoryStatus *Status)
 
GSM_Error GSM_GetMemoryStatus (GSM_StateMachine *s, GSM_MemoryStatus *status)
 
GSM_Error GSM_GetMemory (GSM_StateMachine *s, GSM_MemoryEntry *entry)
 
GSM_Error GSM_GetNextMemory (GSM_StateMachine *s, GSM_MemoryEntry *entry, gboolean start)
 
GSM_Error GSM_SetMemory (GSM_StateMachine *s, GSM_MemoryEntry *entry)
 
GSM_Error GSM_AddMemory (GSM_StateMachine *s, GSM_MemoryEntry *entry)
 
GSM_Error GSM_DeleteMemory (GSM_StateMachine *s, GSM_MemoryEntry *entry)
 
GSM_Error GSM_DeleteAllMemory (GSM_StateMachine *s, GSM_MemoryType MemoryType)
 
GSM_Error GSM_GetSpeedDial (GSM_StateMachine *s, GSM_SpeedDial *Speed)
 
GSM_Error GSM_SetSpeedDial (GSM_StateMachine *s, GSM_SpeedDial *Speed)
 
GSM_Error GSM_GetSMSC (GSM_StateMachine *s, GSM_SMSC *smsc)
 
GSM_Error GSM_SetSMSC (GSM_StateMachine *s, GSM_SMSC *smsc)
 
GSM_Error GSM_GetSMSStatus (GSM_StateMachine *s, GSM_SMSMemoryStatus *status)
 
GSM_Error GSM_GetSMS (GSM_StateMachine *s, GSM_MultiSMSMessage *sms)
 
GSM_Error GSM_GetNextSMS (GSM_StateMachine *s, GSM_MultiSMSMessage *sms, gboolean start)
 
GSM_Error GSM_SetSMS (GSM_StateMachine *s, GSM_SMSMessage *sms)
 
GSM_Error GSM_AddSMS (GSM_StateMachine *s, GSM_SMSMessage *sms)
 
GSM_Error GSM_DeleteSMS (GSM_StateMachine *s, GSM_SMSMessage *sms)
 
GSM_Error GSM_SendSMS (GSM_StateMachine *s, GSM_SMSMessage *sms)
 
GSM_Error GSM_SendSavedSMS (GSM_StateMachine *s, int Folder, int Location)
 
GSM_Error GSM_SetFastSMSSending (GSM_StateMachine *s, gboolean enable)
 
GSM_Error GSM_SetIncomingSMS (GSM_StateMachine *s, gboolean enable)
 
GSM_Error GSM_SetIncomingCB (GSM_StateMachine *s, gboolean enable)
 
GSM_Error GSM_GetSMSFolders (GSM_StateMachine *s, GSM_SMSFolders *folders)
 
GSM_Error GSM_AddSMSFolder (GSM_StateMachine *s, unsigned char *name)
 
GSM_Error GSM_DeleteSMSFolder (GSM_StateMachine *s, int ID)
 
GSM_Error GSM_DialVoice (GSM_StateMachine *s, char *Number, GSM_CallShowNumber ShowNumber)
 
GSM_Error GSM_DialService (GSM_StateMachine *s, char *Number)
 
GSM_Error GSM_AnswerCall (GSM_StateMachine *s, int ID, gboolean all)
 
GSM_Error GSM_CancelCall (GSM_StateMachine *s, int ID, gboolean all)
 
GSM_Error GSM_HoldCall (GSM_StateMachine *s, int ID)
 
GSM_Error GSM_UnholdCall (GSM_StateMachine *s, int ID)
 
GSM_Error GSM_ConferenceCall (GSM_StateMachine *s, int ID)
 
GSM_Error GSM_SplitCall (GSM_StateMachine *s, int ID)
 
GSM_Error GSM_TransferCall (GSM_StateMachine *s, int ID, gboolean next)
 
GSM_Error GSM_SwitchCall (GSM_StateMachine *s, int ID, gboolean next)
 
GSM_Error GSM_GetCallDivert (GSM_StateMachine *s, GSM_CallDivert *request, GSM_MultiCallDivert *result)
 
GSM_Error GSM_SetCallDivert (GSM_StateMachine *s, GSM_CallDivert *divert)
 
GSM_Error GSM_CancelAllDiverts (GSM_StateMachine *s)
 
GSM_Error GSM_SetIncomingCall (GSM_StateMachine *s, gboolean enable)
 
GSM_Error GSM_SetIncomingUSSD (GSM_StateMachine *s, gboolean enable)
 
GSM_Error GSM_SendDTMF (GSM_StateMachine *s, char *sequence)
 
GSM_Error GSM_GetRingtone (GSM_StateMachine *s, GSM_Ringtone *Ringtone, gboolean PhoneRingtone)
 
GSM_Error GSM_SetRingtone (GSM_StateMachine *s, GSM_Ringtone *Ringtone, int *maxlength)
 
GSM_Error GSM_GetRingtonesInfo (GSM_StateMachine *s, GSM_AllRingtonesInfo *Info)
 
GSM_Error GSM_DeleteUserRingtones (GSM_StateMachine *s)
 
GSM_Error GSM_PlayTone (GSM_StateMachine *s, int Herz, unsigned char Volume, gboolean start)
 
GSM_Error GSM_GetWAPBookmark (GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
 
GSM_Error GSM_SetWAPBookmark (GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
 
GSM_Error GSM_DeleteWAPBookmark (GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
 
GSM_Error GSM_GetWAPSettings (GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
 
GSM_Error GSM_SetWAPSettings (GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
 
GSM_Error GSM_GetSyncMLSettings (GSM_StateMachine *s, GSM_SyncMLSettings *settings)
 
GSM_Error GSM_SetSyncMLSettings (GSM_StateMachine *s, GSM_SyncMLSettings *settings)
 
GSM_Error GSM_GetChatSettings (GSM_StateMachine *s, GSM_ChatSettings *settings)
 
GSM_Error GSM_SetChatSettings (GSM_StateMachine *s, GSM_ChatSettings *settings)
 
GSM_Error GSM_GetMMSSettings (GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
 
GSM_Error GSM_SetMMSSettings (GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
 
GSM_Error GSM_GetMMSFolders (GSM_StateMachine *s, GSM_MMSFolders *folders)
 
GSM_Error GSM_GetNextMMSFileInfo (GSM_StateMachine *s, unsigned char *FileID, int *MMSFolder, gboolean start)
 
GSM_Error GSM_GetBitmap (GSM_StateMachine *s, GSM_Bitmap *Bitmap)
 
GSM_Error GSM_SetBitmap (GSM_StateMachine *s, GSM_Bitmap *Bitmap)
 
GSM_Error GSM_GetToDoStatus (GSM_StateMachine *s, GSM_ToDoStatus *status)
 
GSM_Error GSM_GetToDo (GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
 
GSM_Error GSM_GetNextToDo (GSM_StateMachine *s, GSM_ToDoEntry *ToDo, gboolean start)
 
GSM_Error GSM_SetToDo (GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
 
GSM_Error GSM_AddToDo (GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
 
GSM_Error GSM_DeleteToDo (GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
 
GSM_Error GSM_DeleteAllToDo (GSM_StateMachine *s)
 
GSM_Error GSM_GetCalendarStatus (GSM_StateMachine *s, GSM_CalendarStatus *Status)
 
GSM_Error GSM_GetCalendar (GSM_StateMachine *s, GSM_CalendarEntry *Note)
 
GSM_Error GSM_GetNextCalendar (GSM_StateMachine *s, GSM_CalendarEntry *Note, gboolean start)
 
GSM_Error GSM_SetCalendar (GSM_StateMachine *s, GSM_CalendarEntry *Note)
 
GSM_Error GSM_AddCalendar (GSM_StateMachine *s, GSM_CalendarEntry *Note)
 
GSM_Error GSM_DeleteCalendar (GSM_StateMachine *s, GSM_CalendarEntry *Note)
 
GSM_Error GSM_DeleteAllCalendar (GSM_StateMachine *s)
 
GSM_Error GSM_GetCalendarSettings (GSM_StateMachine *s, GSM_CalendarSettings *settings)
 
GSM_Error GSM_SetCalendarSettings (GSM_StateMachine *s, GSM_CalendarSettings *settings)
 
GSM_Error GSM_GetNotesStatus (GSM_StateMachine *s, GSM_ToDoStatus *status)
 
GSM_Error GSM_GetNote (GSM_StateMachine *s, GSM_NoteEntry *Note)
 
GSM_Error GSM_GetNextNote (GSM_StateMachine *s, GSM_NoteEntry *Note, gboolean start)
 
GSM_Error GSM_SetNote (GSM_StateMachine *s, GSM_NoteEntry *Note)
 
GSM_Error GSM_AddNote (GSM_StateMachine *s, GSM_NoteEntry *Note)
 
GSM_Error GSM_DeleteNote (GSM_StateMachine *s, GSM_NoteEntry *Note)
 
GSM_Error GSM_DeleteAllNotes (GSM_StateMachine *s)
 
GSM_Error GSM_GetProfile (GSM_StateMachine *s, GSM_Profile *Profile)
 
GSM_Error GSM_SetProfile (GSM_StateMachine *s, GSM_Profile *Profile)
 
GSM_Error GSM_GetFMStation (GSM_StateMachine *s, GSM_FMStation *FMStation)
 
GSM_Error GSM_SetFMStation (GSM_StateMachine *s, GSM_FMStation *FMStation)
 
GSM_Error GSM_ClearFMStations (GSM_StateMachine *s)
 
GSM_Error GSM_GetNextFileFolder (GSM_StateMachine *s, GSM_File *File, gboolean start)
 
GSM_Error GSM_GetFolderListing (GSM_StateMachine *s, GSM_File *File, gboolean start)
 
GSM_Error GSM_GetNextRootFolder (GSM_StateMachine *s, GSM_File *File)
 
GSM_Error GSM_SetFileAttributes (GSM_StateMachine *s, GSM_File *File)
 
GSM_Error GSM_GetFilePart (GSM_StateMachine *s, GSM_File *File, int *Handle, size_t *Size)
 
GSM_Error GSM_AddFilePart (GSM_StateMachine *s, GSM_File *File, size_t *Pos, int *Handle)
 
GSM_Error GSM_SendFilePart (GSM_StateMachine *s, GSM_File *File, size_t *Pos, int *Handle)
 
GSM_Error GSM_GetFileSystemStatus (GSM_StateMachine *s, GSM_FileSystemStatus *Status)
 
GSM_Error GSM_DeleteFile (GSM_StateMachine *s, unsigned char *ID)
 
GSM_Error GSM_AddFolder (GSM_StateMachine *s, GSM_File *File)
 
GSM_Error GSM_DeleteFolder (GSM_StateMachine *s, unsigned char *ID)
 
GSM_Error GSM_GetGPRSAccessPoint (GSM_StateMachine *s, GSM_GPRSAccessPoint *point)
 
GSM_Error GSM_SetGPRSAccessPoint (GSM_StateMachine *s, GSM_GPRSAccessPoint *point)
 
GSM_Error GSM_GetScreenshot (GSM_StateMachine *s, GSM_BinaryPicture *picture)
 
GSM_Error GSM_Install (GSM_StateMachine *s, const char *ExtraPath, gboolean Minimal)
 

Macro Definition Documentation

§ CHECK_PHONE_CONNECTION

#define CHECK_PHONE_CONNECTION ( )
Value:
{ \
PRINT_FUNCTION_START \
if (!GSM_IsConnected(s)) { \
return ERR_NOTCONNECTED; \
} \
if (s->Phone.Functions->PreAPICall != NONEFUNCTION) { \
err = s->Phone.Functions->PreAPICall(s); \
if (err != ERR_NONE) { \
return err; \
} \
} \
}
gboolean GSM_IsConnected(GSM_StateMachine *s)
Definition: gsmstate.c:976
#define NONEFUNCTION
Definition: gsmcomon.h:12

Checks whether we are connected to phone, fails with error otherwise.

Definition at line 38 of file api.c.

Referenced by GSM_AddCalendar(), GSM_AddCategory(), GSM_AddFilePart(), GSM_AddFolder(), GSM_AddMemory(), GSM_AddNote(), GSM_AddSMS(), GSM_AddSMSFolder(), GSM_AddToDo(), GSM_AnswerCall(), GSM_CancelAllDiverts(), GSM_CancelCall(), GSM_ClearFMStations(), GSM_ConferenceCall(), GSM_DeleteAllCalendar(), GSM_DeleteAllMemory(), GSM_DeleteAllNotes(), GSM_DeleteAllToDo(), GSM_DeleteCalendar(), GSM_DeleteFile(), GSM_DeleteFolder(), GSM_DeleteMemory(), GSM_DeleteNote(), GSM_DeleteSMS(), GSM_DeleteSMSFolder(), GSM_DeleteToDo(), GSM_DeleteUserRingtones(), GSM_DeleteWAPBookmark(), GSM_DialService(), GSM_DialVoice(), GSM_EnterSecurityCode(), GSM_GetAlarm(), GSM_GetBatteryCharge(), GSM_GetBitmap(), GSM_GetCalendar(), GSM_GetCalendarSettings(), GSM_GetCalendarStatus(), GSM_GetCallDivert(), GSM_GetCategory(), GSM_GetCategoryStatus(), GSM_GetChatSettings(), GSM_GetDateTime(), GSM_GetDisplayStatus(), GSM_GetFilePart(), GSM_GetFileSystemStatus(), GSM_GetFirmware(), GSM_GetFMStation(), GSM_GetFolderListing(), GSM_GetGPRSAccessPoint(), GSM_GetHardware(), GSM_GetIMEI(), GSM_GetLocale(), GSM_GetManufactureMonth(), GSM_GetManufacturer(), GSM_GetMemory(), GSM_GetMemoryStatus(), GSM_GetMMSFolders(), GSM_GetMMSSettings(), GSM_GetModel(), GSM_GetNetworkInfo(), GSM_GetNextCalendar(), GSM_GetNextFileFolder(), GSM_GetNextMemory(), GSM_GetNextMMSFileInfo(), GSM_GetNextNote(), GSM_GetNextRootFolder(), GSM_GetNextSMS(), GSM_GetNextToDo(), GSM_GetNote(), GSM_GetNotesStatus(), GSM_GetOriginalIMEI(), GSM_GetPPM(), GSM_GetProductCode(), GSM_GetProfile(), GSM_GetRingtone(), GSM_GetRingtonesInfo(), GSM_GetScreenshot(), GSM_GetSecurityStatus(), GSM_GetSignalQuality(), GSM_GetSIMIMSI(), GSM_GetSMS(), GSM_GetSMSC(), GSM_GetSMSFolders(), GSM_GetSMSStatus(), GSM_GetSpeedDial(), GSM_GetSyncMLSettings(), GSM_GetToDo(), GSM_GetToDoStatus(), GSM_GetWAPBookmark(), GSM_GetWAPSettings(), GSM_HoldCall(), GSM_PlayTone(), GSM_PressKey(), GSM_Reset(), GSM_ResetPhoneSettings(), GSM_SendDTMF(), GSM_SendFilePart(), GSM_SendSavedSMS(), GSM_SendSMS(), GSM_SetAlarm(), GSM_SetAutoNetworkLogin(), GSM_SetBitmap(), GSM_SetCalendar(), GSM_SetCalendarSettings(), GSM_SetCallDivert(), GSM_SetChatSettings(), GSM_SetDateTime(), GSM_SetFastSMSSending(), GSM_SetFileAttributes(), GSM_SetFMStation(), GSM_SetGPRSAccessPoint(), GSM_SetIncomingCall(), GSM_SetIncomingCB(), GSM_SetIncomingSMS(), GSM_SetIncomingUSSD(), GSM_SetLocale(), GSM_SetMemory(), GSM_SetMMSSettings(), GSM_SetNote(), GSM_SetPower(), GSM_SetProfile(), GSM_SetRingtone(), GSM_SetSMS(), GSM_SetSMSC(), GSM_SetSpeedDial(), GSM_SetSyncMLSettings(), GSM_SetToDo(), GSM_SetWAPBookmark(), GSM_SetWAPSettings(), GSM_SplitCall(), GSM_SwitchCall(), GSM_TransferCall(), and GSM_UnholdCall().

§ PRINT_CALENDAR_INFO

#define PRINT_CALENDAR_INFO ( )    smprintf(s, "Location = %d\n", Note->Location);

§ PRINT_FUNCTION_END

#define PRINT_FUNCTION_END   smprintf(s, "Leaving %s:%d\n", __FILE__, __LINE__);

Definition at line 13 of file api.c.

§ PRINT_FUNCTION_START

#define PRINT_FUNCTION_START   smprintf(s, "Entering %s:%d\n", __FILE__, __LINE__);

Definition at line 12 of file api.c.

§ PRINT_LOG_ERROR

#define PRINT_LOG_ERROR (   err)
Value:
{ \
GSM_LogError(s, __FUNCTION__, err); \
PRINT_FUNCTION_END \
}

Prints error message (if any) to debug log.

Parameters
errError code to check.

Definition at line 28 of file api.c.

Referenced by GSM_AddCalendar(), GSM_AddCategory(), GSM_AddFilePart(), GSM_AddFolder(), GSM_AddMemory(), GSM_AddNote(), GSM_AddSMS(), GSM_AddSMSFolder(), GSM_AddToDo(), GSM_AnswerCall(), GSM_CancelAllDiverts(), GSM_CancelCall(), GSM_ClearFMStations(), GSM_ConferenceCall(), GSM_DeleteAllCalendar(), GSM_DeleteAllMemory(), GSM_DeleteAllNotes(), GSM_DeleteAllToDo(), GSM_DeleteCalendar(), GSM_DeleteFile(), GSM_DeleteFolder(), GSM_DeleteMemory(), GSM_DeleteNote(), GSM_DeleteSMS(), GSM_DeleteSMSFolder(), GSM_DeleteToDo(), GSM_DeleteUserRingtones(), GSM_DeleteWAPBookmark(), GSM_DialService(), GSM_DialVoice(), GSM_EnterSecurityCode(), GSM_GetAlarm(), GSM_GetBatteryCharge(), GSM_GetBitmap(), GSM_GetCalendar(), GSM_GetCalendarSettings(), GSM_GetCalendarStatus(), GSM_GetCallDivert(), GSM_GetCategory(), GSM_GetCategoryStatus(), GSM_GetChatSettings(), GSM_GetDateTime(), GSM_GetDisplayStatus(), GSM_GetFilePart(), GSM_GetFileSystemStatus(), GSM_GetFirmware(), GSM_GetFMStation(), GSM_GetFolderListing(), GSM_GetGPRSAccessPoint(), GSM_GetHardware(), GSM_GetIMEI(), GSM_GetLocale(), GSM_GetManufactureMonth(), GSM_GetManufacturer(), GSM_GetMemory(), GSM_GetMemoryStatus(), GSM_GetMMSFolders(), GSM_GetMMSSettings(), GSM_GetModel(), GSM_GetNetworkInfo(), GSM_GetNextCalendar(), GSM_GetNextFileFolder(), GSM_GetNextMemory(), GSM_GetNextMMSFileInfo(), GSM_GetNextNote(), GSM_GetNextRootFolder(), GSM_GetNextSMS(), GSM_GetNextToDo(), GSM_GetNote(), GSM_GetNotesStatus(), GSM_GetOriginalIMEI(), GSM_GetPPM(), GSM_GetProductCode(), GSM_GetProfile(), GSM_GetRingtone(), GSM_GetRingtonesInfo(), GSM_GetScreenshot(), GSM_GetSecurityStatus(), GSM_GetSignalQuality(), GSM_GetSIMIMSI(), GSM_GetSMS(), GSM_GetSMSC(), GSM_GetSMSFolders(), GSM_GetSMSStatus(), GSM_GetSpeedDial(), GSM_GetSyncMLSettings(), GSM_GetToDo(), GSM_GetToDoStatus(), GSM_GetWAPBookmark(), GSM_GetWAPSettings(), GSM_HoldCall(), GSM_Install(), GSM_PlayTone(), GSM_PressKey(), GSM_Reset(), GSM_ResetPhoneSettings(), GSM_SendDTMF(), GSM_SendFilePart(), GSM_SendSavedSMS(), GSM_SendSMS(), GSM_SetAlarm(), GSM_SetAutoNetworkLogin(), GSM_SetBitmap(), GSM_SetCalendar(), GSM_SetCalendarSettings(), GSM_SetCallDivert(), GSM_SetChatSettings(), GSM_SetDateTime(), GSM_SetFastSMSSending(), GSM_SetFileAttributes(), GSM_SetFMStation(), GSM_SetGPRSAccessPoint(), GSM_SetIncomingCall(), GSM_SetIncomingCB(), GSM_SetIncomingSMS(), GSM_SetIncomingUSSD(), GSM_SetLocale(), GSM_SetMemory(), GSM_SetMMSSettings(), GSM_SetNote(), GSM_SetPower(), GSM_SetProfile(), GSM_SetRingtone(), GSM_SetSMS(), GSM_SetSMSC(), GSM_SetSpeedDial(), GSM_SetSyncMLSettings(), GSM_SetToDo(), GSM_SetWAPBookmark(), GSM_SetWAPSettings(), GSM_SplitCall(), GSM_SwitchCall(), GSM_TransferCall(), and GSM_UnholdCall().

§ PRINT_MEMORY_INFO

#define PRINT_MEMORY_INFO ( )    smprintf(s, "Location = %d, Memory type = %s\n", entry->Location, GSM_MemoryTypeToString(entry->MemoryType));

§ PRINT_MSMS_INFO

#define PRINT_MSMS_INFO ( )    smprintf(s, "Number = %d, Location = %d, Folder = %d\n", sms->Number, sms->SMS[0].Location, sms->SMS[0].Folder);

Definition at line 19 of file api.c.

Referenced by GSM_GetNextSMS(), and GSM_GetSMS().

§ PRINT_NOTE_INFO

#define PRINT_NOTE_INFO ( )    smprintf(s, "Location = %d\n", Note->Location);

Definition at line 18 of file api.c.

Referenced by GSM_AddNote(), GSM_DeleteNote(), GSM_GetNextNote(), GSM_GetNote(), and GSM_SetNote().

§ PRINT_SMS_INFO

#define PRINT_SMS_INFO ( )    smprintf(s, "Location = %d, Folder = %d\n", sms->Location, sms->Folder);

Definition at line 20 of file api.c.

Referenced by GSM_AddSMS(), GSM_DeleteSMS(), and GSM_SetSMS().

§ PRINT_START

#define PRINT_START ( )    if (start) smprintf(s, "Starting reading!\n");

§ PRINT_TODO_INFO

#define PRINT_TODO_INFO ( )    smprintf(s, "Location = %d\n", ToDo->Location);

Definition at line 16 of file api.c.

Referenced by GSM_AddToDo(), GSM_DeleteToDo(), GSM_GetNextToDo(), GSM_GetToDo(), and GSM_SetToDo().

§ RUN_RESTARTABLE

#define RUN_RESTARTABLE (   return_value,
  function_call 
)
Value:
{ \
int restarts; \
for (restarts = 0; restarts < 10; ++restarts) { \
unsigned useconds = 10000 << restarts; \
return_value = (function_call); \
if (return_value != ERR_BUSY) \
break; \
smprintf(s, "Sleeping %d ms before retrying the last command\n", useconds / 1000); \
usleep(useconds); \
} \
}

Tries the command a couple of times to see if it can complete without an ERR_BUSY return.

Definition at line 56 of file api.c.

Referenced by GSM_DeleteMemory(), and GSM_SetMemory().

Function Documentation

§ GSM_ClearFMStations()

GSM_Error GSM_ClearFMStations ( GSM_StateMachine s)

Clears defined FM stations.

Definition at line 1685 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone_Functions::ClearFMStations, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

1686 {
1687  GSM_Error err;
1688 
1690 
1691  err = s->Phone.Functions->ClearFMStations(s);
1692  PRINT_LOG_ERROR(err);
1693  return err;
1694 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* ClearFMStations)(GSM_StateMachine *s)
Definition: gsmstate.h:1249

§ GSM_DeleteUserRingtones()

GSM_Error GSM_DeleteUserRingtones ( GSM_StateMachine s)

Deletes user defined ringtones from phone.

Definition at line 1092 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone_Functions::DeleteUserRingtones, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

1093 {
1094  GSM_Error err;
1095 
1097 
1098  err = s->Phone.Functions->DeleteUserRingtones(s);
1099  PRINT_LOG_ERROR(err);
1100  return err;
1101 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* DeleteUserRingtones)(GSM_StateMachine *s)
Definition: gsmstate.h:1071

§ GSM_GetChatSettings()

GSM_Error GSM_GetChatSettings ( GSM_StateMachine s,
GSM_ChatSettings settings 
)

Acquires chat/presence settings.

Definition at line 1209 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetChatSettings, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

1210 {
1211  GSM_Error err;
1212 
1214 
1215  err = s->Phone.Functions->GetChatSettings(s, settings);
1216  PRINT_LOG_ERROR(err);
1217  return err;
1218 }
GSM_Error
Definition: gammu-error.h:23
GSM_Error(* GetChatSettings)(GSM_StateMachine *s, GSM_ChatSettings *settings)
Definition: gsmstate.h:1107
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_GetFMStation()

GSM_Error GSM_GetFMStation ( GSM_StateMachine s,
GSM_FMStation FMStation 
)

Reads FM station.

Definition at line 1659 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetFMStation, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

1660 {
1661  GSM_Error err;
1662 
1664 
1665  err = s->Phone.Functions->GetFMStation(s, FMStation);
1666  PRINT_LOG_ERROR(err);
1667  return err;
1668 }
GSM_Error
Definition: gammu-error.h:23
GSM_Error(* GetFMStation)(GSM_StateMachine *s, GSM_FMStation *FMStation)
Definition: gsmstate.h:1241
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_GetGPRSAccessPoint()

GSM_Error GSM_GetGPRSAccessPoint ( GSM_StateMachine s,
GSM_GPRSAccessPoint point 
)

Gets GPRS access point.

Definition at line 1843 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetGPRSAccessPoint, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

1844 {
1845  GSM_Error err;
1846 
1848 
1849  err = s->Phone.Functions->GetGPRSAccessPoint(s, point);
1850  PRINT_LOG_ERROR(err);
1851  return err;
1852 }
GSM_Error(* GetGPRSAccessPoint)(GSM_StateMachine *s, GSM_GPRSAccessPoint *point)
Definition: gsmstate.h:1297
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_GetLocale()

GSM_Error GSM_GetLocale ( GSM_StateMachine s,
GSM_Locale locale 
)

Gets locale from phone.

Definition at line 281 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetLocale, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

282 {
283  GSM_Error err;
284 
286 
287  err = s->Phone.Functions->GetLocale(s, locale);
288  PRINT_LOG_ERROR(err);
289  return err;
290 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* GetLocale)(GSM_StateMachine *s, GSM_Locale *locale)
Definition: gsmstate.h:830

§ GSM_GetMMSSettings()

GSM_Error GSM_GetMMSSettings ( GSM_StateMachine s,
GSM_MultiWAPSettings settings 
)

Acquires MMS settings.

Definition at line 1235 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetMMSSettings, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

1236 {
1237  GSM_Error err;
1238 
1240 
1241  err = s->Phone.Functions->GetMMSSettings(s, settings);
1242  PRINT_LOG_ERROR(err);
1243  return err;
1244 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* GetMMSSettings)(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: gsmstate.h:1115

§ GSM_GetProfile()

GSM_Error GSM_GetProfile ( GSM_StateMachine s,
GSM_Profile Profile 
)

Reads profile.

Definition at line 1633 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetProfile, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

1634 {
1635  GSM_Error err;
1636 
1638 
1639  err = s->Phone.Functions->GetProfile(s, Profile);
1640  PRINT_LOG_ERROR(err);
1641  return err;
1642 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Error(* GetProfile)(GSM_StateMachine *s, GSM_Profile *Profile)
Definition: gsmstate.h:1233
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_GetRingtone()

GSM_Error GSM_GetRingtone ( GSM_StateMachine s,
GSM_Ringtone Ringtone,
gboolean  PhoneRingtone 
)

Gets ringtone from phone.

Definition at line 1053 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetRingtone, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

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 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Error(* GetRingtone)(GSM_StateMachine *s, GSM_Ringtone *Ringtone, gboolean PhoneRingtone)
Definition: gsmstate.h:1059
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_GetRingtonesInfo()

GSM_Error GSM_GetRingtonesInfo ( GSM_StateMachine s,
GSM_AllRingtonesInfo Info 
)

Acquires ringtone informaiton.

Definition at line 1079 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetRingtonesInfo, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

1080 {
1081  GSM_Error err;
1082 
1084 
1085  err = s->Phone.Functions->GetRingtonesInfo(s, Info);
1086  PRINT_LOG_ERROR(err);
1087  return err;
1088 }
GSM_Error
Definition: gammu-error.h:23
GSM_Error(* GetRingtonesInfo)(GSM_StateMachine *s, GSM_AllRingtonesInfo *Info)
Definition: gsmstate.h:1067
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_GetSyncMLSettings()

GSM_Error GSM_GetSyncMLSettings ( GSM_StateMachine s,
GSM_SyncMLSettings settings 
)

Acquires SyncML settings.

Definition at line 1183 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetSyncMLSettings, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

1184 {
1185  GSM_Error err;
1186 
1188 
1189  err = s->Phone.Functions->GetSyncMLSettings(s, settings);
1190  PRINT_LOG_ERROR(err);
1191  return err;
1192 }
GSM_Error(* GetSyncMLSettings)(GSM_StateMachine *s, GSM_SyncMLSettings *settings)
Definition: gsmstate.h:1099
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_PlayTone()

GSM_Error GSM_PlayTone ( GSM_StateMachine s,
int  Herz,
unsigned char  Volume,
gboolean  start 
)

Plays tone.

Definition at line 1105 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, GSM_Phone_Functions::PlayTone, and PRINT_LOG_ERROR.

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 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Error(* PlayTone)(GSM_StateMachine *s, int Herz, unsigned char Volume, gboolean start)
Definition: gsmstate.h:1075
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_Reset()

GSM_Error GSM_Reset ( GSM_StateMachine s,
gboolean  hard 
)

Performs phone reset.

Definition at line 333 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::Reset.

Referenced by GSM_WaitFor().

334 {
335  GSM_Error err;
336 
338 
339  err = s->Phone.Functions->Reset(s, hard);
340  PRINT_LOG_ERROR(err);
341  return err;
342 }
GSM_Error(* Reset)(GSM_StateMachine *s, gboolean hard)
Definition: gsmstate.h:842
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_ResetPhoneSettings()

GSM_Error GSM_ResetPhoneSettings ( GSM_StateMachine s,
GSM_ResetSettingsType  Type 
)

Resets phone settings.

Definition at line 346 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::ResetPhoneSettings.

347 {
348  GSM_Error err;
349 
351 
352  err = s->Phone.Functions->ResetPhoneSettings(s, Type);
353  PRINT_LOG_ERROR(err);
354  return err;
355 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* ResetPhoneSettings)(GSM_StateMachine *s, GSM_ResetSettingsType Type)
Definition: gsmstate.h:846

§ GSM_SetAutoNetworkLogin()

GSM_Error GSM_SetAutoNetworkLogin ( GSM_StateMachine s)

Enables network auto login.

Definition at line 398 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetAutoNetworkLogin.

399 {
400  GSM_Error err;
401 
403 
404  err = s->Phone.Functions->SetAutoNetworkLogin(s);
405  PRINT_LOG_ERROR(err);
406  return err;
407 }
GSM_Error(* SetAutoNetworkLogin)(GSM_StateMachine *s)
Definition: gsmstate.h:862
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_SetChatSettings()

GSM_Error GSM_SetChatSettings ( GSM_StateMachine s,
GSM_ChatSettings settings 
)

Changes chat/presence settings.

Definition at line 1222 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetChatSettings.

1223 {
1224  GSM_Error err;
1225 
1227 
1228  err = s->Phone.Functions->SetChatSettings(s, settings);
1229  PRINT_LOG_ERROR(err);
1230  return err;
1231 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* SetChatSettings)(GSM_StateMachine *s, GSM_ChatSettings *settings)
Definition: gsmstate.h:1111

§ GSM_SetFMStation()

GSM_Error GSM_SetFMStation ( GSM_StateMachine s,
GSM_FMStation FMStation 
)

Sets FM station.

Definition at line 1672 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetFMStation.

1673 {
1674  GSM_Error err;
1675 
1677 
1678  err = s->Phone.Functions->SetFMStation(s, FMStation);
1679  PRINT_LOG_ERROR(err);
1680  return err;
1681 }
GSM_Error(* SetFMStation)(GSM_StateMachine *s, GSM_FMStation *FMStation)
Definition: gsmstate.h:1245
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_SetGPRSAccessPoint()

GSM_Error GSM_SetGPRSAccessPoint ( GSM_StateMachine s,
GSM_GPRSAccessPoint point 
)

Sets GPRS access point.

Definition at line 1856 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetGPRSAccessPoint.

1857 {
1858  GSM_Error err;
1859 
1861 
1862  err = s->Phone.Functions->SetGPRSAccessPoint(s, point);
1863  PRINT_LOG_ERROR(err);
1864  return err;
1865 }
GSM_Error
Definition: gammu-error.h:23
GSM_Error(* SetGPRSAccessPoint)(GSM_StateMachine *s, GSM_GPRSAccessPoint *point)
Definition: gsmstate.h:1301
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_SetLocale()

GSM_Error GSM_SetLocale ( GSM_StateMachine s,
GSM_Locale locale 
)

Sets locale of phone.

Definition at line 294 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetLocale.

295 {
296  GSM_Error err;
297 
299 
300  err = s->Phone.Functions->SetLocale(s, locale);
301  PRINT_LOG_ERROR(err);
302  return err;
303 }
GSM_Error
Definition: gammu-error.h:23
GSM_Error(* SetLocale)(GSM_StateMachine *s, GSM_Locale *locale)
Definition: gsmstate.h:834
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_SetMMSSettings()

GSM_Error GSM_SetMMSSettings ( GSM_StateMachine s,
GSM_MultiWAPSettings settings 
)

Changes MMS settings.

Definition at line 1248 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetMMSSettings.

1249 {
1250  GSM_Error err;
1251 
1253 
1254  err = s->Phone.Functions->SetMMSSettings(s, settings);
1255  PRINT_LOG_ERROR(err);
1256  return err;
1257 }
GSM_Error(* SetMMSSettings)(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
Definition: gsmstate.h:1119
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_SetPower()

GSM_Error GSM_SetPower ( GSM_StateMachine s,
gboolean  on 
)

Power on/off the phone.

Definition at line 307 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetPower.

308 {
309  GSM_Error err;
310 
312 
313  err = s->Phone.Functions->SetPower(s, on);
314  PRINT_LOG_ERROR(err);
315  return err;
316 }
GSM_Error(* SetPower)(GSM_StateMachine *s, gboolean on)
Definition: gsmstate.h:1309
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_SetProfile()

GSM_Error GSM_SetProfile ( GSM_StateMachine s,
GSM_Profile Profile 
)

Updates profile.

Definition at line 1646 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetProfile.

1647 {
1648  GSM_Error err;
1649 
1651 
1652  err = s->Phone.Functions->SetProfile(s, Profile);
1653  PRINT_LOG_ERROR(err);
1654  return err;
1655 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* SetProfile)(GSM_StateMachine *s, GSM_Profile *Profile)
Definition: gsmstate.h:1237

§ GSM_SetRingtone()

GSM_Error GSM_SetRingtone ( GSM_StateMachine s,
GSM_Ringtone Ringtone,
int *  maxlength 
)

Sets ringtone in phone.

Definition at line 1066 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetRingtone.

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 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* SetRingtone)(GSM_StateMachine *s, GSM_Ringtone *Ringtone, int *maxlength)
Definition: gsmstate.h:1063

§ GSM_SetSyncMLSettings()

GSM_Error GSM_SetSyncMLSettings ( GSM_StateMachine s,
GSM_SyncMLSettings settings 
)

Changes SyncML settings.

Definition at line 1196 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetSyncMLSettings.

1197 {
1198  GSM_Error err;
1199 
1201 
1202  err = s->Phone.Functions->SetSyncMLSettings(s, settings);
1203  PRINT_LOG_ERROR(err);
1204  return err;
1205 }
GSM_Error
Definition: gammu-error.h:23
GSM_Error(* SetSyncMLSettings)(GSM_StateMachine *s, GSM_SyncMLSettings *settings)
Definition: gsmstate.h:1103
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373