GSM_Error ATOBEX_SendSMS(GSM_StateMachine *s, GSM_SMSMessage *sms) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_SendSMS(s, sms); }
GSM_Error ATOBEX_SetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_SetBitmap(s, Bitmap); }
GSM_Error ATOBEX_GetSMSC(GSM_StateMachine *s, GSM_SMSC *smsc) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_GetSMSC(s, smsc); }
GSM_Error ATOBEX_SetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone, int *maxlength) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_SetRingtone(s, Ringtone, maxlength); }
GSM_Error ATOBEX_GetSignalStrength(GSM_StateMachine *s, GSM_SignalQuality *sig) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_GetSignalQuality(s, sig); }
GSM_Error ATOBEX_GetManufacturer(GSM_StateMachine *s) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_GetManufacturer(s); }
GSM_Error ATOBEX_SetIncomingUSSD(GSM_StateMachine *s, gboolean enable) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_SetIncomingUSSD(s, enable); }
GSM_Error ATOBEX_ResetPhoneSettings(GSM_StateMachine *s, GSM_ResetSettingsType Type) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_ResetPhoneSettings(s, Type); }
GSM_Error ATOBEX_GetSIMIMSI(GSM_StateMachine *s, char *IMSI) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_GetSIMIMSI(s, IMSI); }
GSM_Error ATOBEX_GetNetworkInfo(GSM_StateMachine *s, GSM_NetworkInfo *netinfo) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_GetNetworkInfo(s, netinfo); }
GSM_Error ATOBEX_GetDisplayStatus(GSM_StateMachine *s, GSM_DisplayFeatures *features) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_GetDisplayStatus(s, features); }
GSM_Error ATOBEX_DialVoice(GSM_StateMachine *s, char *number, GSM_CallShowNumber ShowNumber) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_DialVoice(s, number, ShowNumber); }
GSM_Error ATOBEX_DialService(GSM_StateMachine *s, char *number) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_DialService(s, number); }
GSM_Error ATOBEX_GetSMSStatus(GSM_StateMachine *s, GSM_SMSMemoryStatus *status) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_GetSMSStatus(s, status); }
GSM_Error ATOBEX_GetNextSMS(GSM_StateMachine *s, GSM_MultiSMSMessage *sms, gboolean start) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_GetNextSMS(s, sms, start); }
GSM_Error ATOBEX_GetSMSFolders(GSM_StateMachine *s, GSM_SMSFolders *folders) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_GetSMSFolders(s, folders); }
GSM_Error ATOBEX_EnterSecurityCode(GSM_StateMachine *s, GSM_SecurityCode *Code) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_EnterSecurityCode(s, Code); }
GSM_Error ATOBEX_SetAutoNetworkLogin(GSM_StateMachine *s) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_SetAutoNetworkLogin(s); }
GSM_Error ATOBEX_GetSecurityStatus(GSM_StateMachine *s, GSM_SecurityCodeType *Status) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_GetSecurityStatus(s, Status); }
GSM_Error ATOBEX_Reset(GSM_StateMachine *s, gboolean hard) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_Reset(s, hard); }
GSM_Error ATOBEX_SendDTMF(GSM_StateMachine *s, char *sequence) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_SendDTMF(s, sequence); }
GSM_Error ATOBEX_CancelCall(GSM_StateMachine *s, int ID, gboolean all) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_CancelCall(s,ID,all); }
GSM_Error ATOBEX_SetFastSMSSending(GSM_StateMachine *s, gboolean enable) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_SetFastSMSSending(s, enable); }
GSM_Error ATOBEX_SendSavedSMS(GSM_StateMachine *s, int Folder, int Location) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_SendSavedSMS(s, Folder, Location); }
GSM_Error ATOBEX_SetAlarm(GSM_StateMachine *s, GSM_Alarm *Alarm) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_SetAlarm(s, Alarm); }
/** * \author Peter Ondraska, based on code by Marcin Wiacek and Michal Cihar * * License: Whatever the current maintainer of gammulib chooses, as long as there * is an easy way to obtain the source under GPL, otherwise the author's parts * of this function are GPL 2.0. */ GSM_Error ATOBEX_SetLocale(GSM_StateMachine *s, GSM_Locale *locale) { /* this is not yet supported by gammu.c */ int format=0; char req[12]; GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; if (locale->DateFormat==GSM_Date_OFF) { format=0; } else if ((locale->DateFormat==GSM_Date_DDMMMYY)&&(locale->DateSeparator=='-')) { format=1; } else if ((locale->DateFormat==GSM_Date_DDMMYY)&&(locale->DateSeparator=='-')) { format=2; } else if ((locale->DateFormat==GSM_Date_MMDDYY)&&(locale->DateSeparator=='/')) { format=3; } else if ((locale->DateFormat==GSM_Date_DDMMYY)&&(locale->DateSeparator=='/')) { format=4; } else if ((locale->DateFormat==GSM_Date_DDMMYY)&&(locale->DateSeparator=='.')) { format=5; } else if ((locale->DateFormat==GSM_Date_YYMMDD)&&(locale->DateSeparator==0)) { format=6; } else if ((locale->DateFormat==GSM_Date_YYMMDD)&&(locale->DateSeparator=='-')) { format=7; } else { return ERR_NOTSUPPORTED; } /* ERR_WRONGINPUT */ sprintf(req,"AT*ESDF=%i\r",format); smprintf(s, "Setting date format\n"); error = GSM_WaitFor (s, req, strlen(req), 0x00, 3, ID_SetLocale); if (error!=ERR_NONE) return error; if (locale->AMPMTime) { format=2; } else { format=1; } sprintf(req,"AT*ESTF=%i\r",format); smprintf(s, "Setting time format\n"); return GSM_WaitFor (s, req, strlen(req), 0x00, 3, ID_SetLocale); }
GSM_Error ATOBEX_GetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone, gboolean PhoneRingtone) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_GetRingtone(s, Ringtone, PhoneRingtone); }
GSM_Error ATOBEX_SetDateTime(GSM_StateMachine *s, GSM_DateTime *date_time) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_SetDateTime(s, date_time); }
GSM_Error ATOBEX_SetPower(GSM_StateMachine *s, gboolean on) { GSM_Error error; if ((error = ATOBEX_SetATMode(s))!= ERR_NONE) return error; return ATGEN_SetPower(s, on); }
/** * Switch to AT mode and calls AT module termination procedure. */ GSM_Error ATOBEX_Terminate(GSM_StateMachine *s) { GSM_Error error; error = ATOBEX_SetATMode(s); if (error != ERR_NONE) return error; OBEXGEN_FreeVars(s); return ATGEN_Terminate(s); }