X-Git-Url: http://git.jankratochvil.net/?p=gnokii.git;a=blobdiff_plain;f=include%2Fgsm-api.h;h=fa655b44d798a7d215631c32ca2b53b05dab08c9;hp=7efcfa093c7981aed9ce853543bd6c1466270db6;hb=0484268a27be1ab830d087847d830bc0ec734016;hpb=975a83d253eea8aa37bf3dfd7e026df3027db4ff;ds=sidebyside diff --git a/include/gsm-api.h b/include/gsm-api.h index 7efcfa0..fa655b4 100644 --- a/include/gsm-api.h +++ b/include/gsm-api.h @@ -27,16 +27,12 @@ #include "gsm-ringtones.h" #include "gsm-wap.h" -#ifndef UCLINUX - /* Undefined functions in fbus/mbus files */ extern GSM_Error Unimplemented(void); #define UNIMPLEMENTED (void *) Unimplemented extern GSM_Error NotSupported(void); #define NOTSUPPORTED (void *) NotSupported -#endif /* UCLINUX */ - /* Define the structure used to hold pointers to the various API functions. This is in effect the master list of functions provided by the gnokii API. Modules containing the model specific code each contain one of these @@ -231,19 +227,14 @@ typedef struct { typedef struct { - char *FBUSModels; /* Models covered by this type, pipe '|' delimited. */ - - char *MBUSModels; /* Models covered by this type, pipe '|' delimited. */ - - char *InfraredModels; /* Models covered by this type, pipe '|' delimited. */ - - char *DLR3Models; /* Models covered by this type, pipe '|' delimited. */ - - char *ATModels; /* Models covered by this type, pipe '|' delimited. */ - - char *IrdaModels; /* Models covered by this type, pipe '|' delimited. */ - - char *TekramModels; /* Models covered by this type, pipe '|' delimited. */ + char *FBUSModels; /* Models covered by this type, pipe '|' delimited. */ + char *MBUSModels; /* Models covered by this type, pipe '|' delimited. */ + char *InfraredModels; /* Models covered by this type, pipe '|' delimited. */ + char *DLR3Models; /* Models covered by this type, pipe '|' delimited. */ + char *ATModels; /* Models covered by this type, pipe '|' delimited. */ + char *IrdaModels; /* Models covered by this type, pipe '|' delimited. */ + char *TekramModels; /* Models covered by this type, pipe '|' delimited. */ + char *FBUS3110Models; /* Models covered by this type, pipe '|' delimited. */ /* Minimum and maximum levels for RF signal strength. Units are as per the setting of RFLevelUnits. The setting of RFLevelUnits indicates the @@ -292,204 +283,190 @@ extern GSM_Information *GSM_Info; extern GSM_Functions *GSM; extern GSM_Protocol *Protocol; -extern GSM_PhonebookEntry *CurrentPhonebookEntry; -extern GSM_Error CurrentPhonebookError; +GSM_PhonebookEntry *CurrentPhonebookEntry; +GSM_Error CurrentPhonebookError; -extern GSM_SpeedDial *CurrentSpeedDialEntry; -extern GSM_Error CurrentSpeedDialError; +GSM_SpeedDial *CurrentSpeedDialEntry; +GSM_Error CurrentSpeedDialError; -extern unsigned char Current_IMEI[GSM_MAX_IMEI_LENGTH]; -extern unsigned char Current_Revision[GSM_MAX_REVISION_LENGTH]; -extern unsigned char Current_Model[GSM_MAX_MODEL_LENGTH]; +unsigned char Current_IMEI[GSM_MAX_IMEI_LENGTH]; +unsigned char Current_Revision[GSM_MAX_REVISION_LENGTH]; +unsigned char Current_Model[GSM_MAX_MODEL_LENGTH]; -#ifndef UCLINUX -extern GSM_SMSMessage *CurrentSMSMessage; -extern GSM_Error CurrentSMSMessageError; -extern int CurrentSMSPointer; +GSM_SMSMessage *CurrentSMSMessage; +GSM_Error CurrentSMSMessageError; +int CurrentSMSPointer; -extern GSM_SMSFolders *CurrentSMSFolders; -extern GSM_Error CurrentSMSFoldersError; -extern int CurrentSMSFoldersCount; +GSM_SMSFolders *CurrentSMSFolders; +GSM_Error CurrentSMSFoldersError; +int CurrentSMSFoldersCount; -extern GSM_OneSMSFolder CurrentSMSFolder; -extern GSM_Error CurrentSMSFolderError; -extern int CurrentSMSFolderID; -#endif /* UCLINUX */ +GSM_OneSMSFolder CurrentSMSFolder; +GSM_Error CurrentSMSFolderError; +int CurrentSMSFolderID; -extern GSM_MemoryStatus *CurrentMemoryStatus; -extern GSM_Error CurrentMemoryStatusError; +GSM_MemoryStatus *CurrentMemoryStatus; +GSM_Error CurrentMemoryStatusError; -#ifndef UCLINUX -extern GSM_NetworkInfo *CurrentNetworkInfo; -extern GSM_Error CurrentNetworkInfoError; +GSM_NetworkInfo *CurrentNetworkInfo; +GSM_Error CurrentNetworkInfoError; -extern GSM_SMSStatus *CurrentSMSStatus; -extern GSM_Error CurrentSMSStatusError; +GSM_SMSStatus *CurrentSMSStatus; +GSM_Error CurrentSMSStatusError; -extern GSM_MessageCenter *CurrentMessageCenter; -extern GSM_Error CurrentMessageCenterError; +GSM_MessageCenter *CurrentMessageCenter; +GSM_Error CurrentMessageCenterError; -extern int *CurrentSecurityCodeStatus; -extern GSM_Error CurrentSecurityCodeError; -extern GSM_SecurityCode *CurrentSecurityCode; +int *CurrentSecurityCodeStatus; +GSM_Error CurrentSecurityCodeError; +GSM_SecurityCode *CurrentSecurityCode; -extern GSM_DateTime *CurrentDateTime; -extern GSM_Error CurrentDateTimeError; +GSM_DateTime *CurrentDateTime; +GSM_Error CurrentDateTimeError; -extern GSM_Error CurrentResetPhoneSettingsError; +GSM_Error CurrentResetPhoneSettingsError; -extern GSM_DateTime *CurrentAlarm; -extern GSM_Error CurrentAlarmError; +GSM_DateTime *CurrentAlarm; +GSM_Error CurrentAlarmError; -extern GSM_CalendarNote *CurrentCalendarNote; -extern GSM_Error CurrentCalendarNoteError; +GSM_CalendarNote *CurrentCalendarNote; +GSM_Error CurrentCalendarNoteError; -extern GSM_NotesInfo CurrentCalendarNotesInfo,*CurrentCalendarNotesInfo2; -extern GSM_Error CurrentCalendarNotesInfoError; +GSM_NotesInfo CurrentCalendarNotesInfo,*CurrentCalendarNotesInfo2; +GSM_Error CurrentCalendarNotesInfoError; -extern GSM_Error CurrentSetDateTimeError; -extern GSM_Error CurrentSetAlarmError; +int *CurrentFirstCalendarFreePos; +GSM_Error CurrentFirstCalendarFreePosError; -extern int *CurrentFirstCalendarFreePos; -extern GSM_Error CurrentFirstCalendarFreePosError; -#endif /* UCLINUX */ +GSM_Error CurrentSetDateTimeError; +GSM_Error CurrentSetAlarmError; -extern GSM_Error CurrentEnableExtendedCommandsError; +GSM_Error CurrentEnableExtendedCommandsError; -extern int CurrentRFLevel, +int CurrentRFLevel, CurrentBatteryLevel, CurrentPowerSource; -#ifndef UCLINUX -extern int CurrentDisplayStatus; -extern GSM_Error CurrentDisplayStatusError; +int CurrentDisplayStatus; +GSM_Error CurrentDisplayStatusError; -extern char *CurrentNetmonitor; -extern GSM_Error CurrentNetmonitorError; +char *CurrentNetmonitor; +GSM_Error CurrentNetmonitorError; -extern GSM_Bitmap *CurrentGetBitmap; -extern GSM_Error CurrentGetBitmapError; +GSM_Bitmap *CurrentGetBitmap; +GSM_Error CurrentGetBitmapError; -extern GSM_Error CurrentSetBitmapError; +GSM_Error CurrentSetBitmapError; -extern GSM_Error CurrentSendDTMFError; +GSM_Error CurrentSendDTMFError; -extern GSM_Profile *CurrentProfile; -extern GSM_Error CurrentProfileError; +GSM_Profile *CurrentProfile; +GSM_Error CurrentProfileError; -extern GSM_Error CurrentDisplayOutputError; +GSM_Error CurrentDisplayOutputError; -extern GSM_CBMessage *CurrentCBMessage; -extern GSM_Error CurrentCBError; +GSM_CBMessage *CurrentCBMessage; +GSM_Error CurrentCBError; -extern int CurrentPressKeyEvent; -extern GSM_Error CurrentPressKeyError; +int CurrentPressKeyEvent; +GSM_Error CurrentPressKeyError; -extern GSM_Error CurrentPlayToneError; -#endif /* UCLINUX */ +GSM_Error CurrentPlayToneError; -extern GSM_Error CurrentDialVoiceError; +GSM_Error CurrentDialVoiceError; -#ifndef UCLINUX -extern GSM_Error CurrentGetOperatorNameError; -extern GSM_Network *CurrentGetOperatorNameNetwork; -extern GSM_Error CurrentSetOperatorNameError; -#endif /* UCLINUX */ +GSM_Error CurrentGetOperatorNameError; +GSM_Network *CurrentGetOperatorNameNetwork; +GSM_Error CurrentSetOperatorNameError; -extern GSM_Error CurrentGetIMEIError; +GSM_Error CurrentGetIMEIError; -extern GSM_Error CurrentGetHWError; +GSM_Error CurrentGetHWError; -#ifndef UCLINUX -extern unsigned char CurrentPPS[4]; -extern GSM_Error CurrentProductProfileSettingsError; +unsigned char CurrentPPS[4]; +GSM_Error CurrentProductProfileSettingsError; -extern char CurrentIncomingCall[20]; +char CurrentIncomingCall[20]; -extern GSM_Error CurrentBinRingtoneError; -extern GSM_BinRingtone *CurrentGetBinRingtone; +GSM_Error CurrentBinRingtoneError; +GSM_BinRingtone *CurrentGetBinRingtone; -extern GSM_Error CurrentRingtoneError; -#endif /* UCLINUX */ +GSM_Error CurrentRingtoneError; -extern GSM_Error CurrentMagicError; +GSM_Error CurrentMagicError; -#ifndef UCLINUX -extern GSM_Error CurrentSimlockInfoError; -extern GSM_AllSimlocks *CurrentSimLock; +GSM_Error CurrentSimlockInfoError; +GSM_AllSimlocks *CurrentSimLock; -extern GSM_Error CurrentGetWAPBookmarkError; -extern GSM_Error CurrentSetWAPBookmarkError; -extern GSM_WAPBookmark *WAPBookmark; +GSM_Error CurrentGetWAPBookmarkError; +GSM_Error CurrentSetWAPBookmarkError; +GSM_WAPBookmark *WAPBookmark; -extern GSM_Error CurrentGetWAPSettingsError; -extern GSM_WAPSettings *WAPSettings; +GSM_Error CurrentGetWAPSettingsError; +GSM_WAPSettings *WAPSettings; -extern GSM_Error CurrentCallDivertError; -extern GSM_CallDivert *CurrentCallDivert; +GSM_Error CurrentCallDivertError; +GSM_CallDivert *CurrentCallDivert; -extern char *CurrentManufacturer; -#endif /* UCLINUX */ +char *CurrentManufacturer; /* This is the connection type used in gnokii. */ -extern GSM_ConnectionType CurrentConnectionType; +GSM_ConnectionType CurrentConnectionType; /* Pointer to a callback function used to return changes to a calls status */ /* This saves unreliable polling */ -extern void (*CurrentCallPassup)(char c); +void (*CurrentCallPassup)(char c); /* Pointer to callback function in user code to be called when RLP frames are received. */ -extern void (*CurrentRLP_RXCallback)(RLP_F96Frame *frame); +void (*CurrentRLP_RXCallback)(RLP_F96Frame *frame); /* Used to disconnect the call */ -extern u8 CurrentCallSequenceNumber; +u8 CurrentCallSequenceNumber; -extern bool CurrentLinkOK; +bool CurrentLinkOK; -extern bool CurrentRequestTerminate; +bool CurrentRequestTerminate; -#ifndef UCLINUX -extern bool CurrentDisableKeepAlive; -#endif /* UCLINUX */ +bool CurrentDisableKeepAlive; /* Prototype for the functions actually provided by gsm-api.c. */ -extern GSM_Error GSM_Initialise(char *model, char *device, char *initlength, GSM_ConnectionType connection, void (*rlp_callback)(RLP_F96Frame *frame), char* SynchronizeTime); +GSM_Error GSM_Initialise(char *model, char *device, char *initlength, GSM_ConnectionType connection, void (*rlp_callback)(RLP_F96Frame *frame), char* SynchronizeTime); -#ifndef UCLINUX -extern bool CheckModel (GSM_Information InfoToCheck, char *model, GSM_ConnectionType connection); -#endif /* UCLINUX */ +bool CheckModel (GSM_Information InfoToCheck, char *model, GSM_ConnectionType connection); -extern char *GetMygnokiiVersion(); +char *GetMygnokiiVersion(); typedef enum { - F_CAL61=0,/*Calendar in 6110 style - 4 types,...*/ + F_CAL61=1,/*Calendar in 6110 style - 4 types,...*/ F_CAL33, /*Calendar in 3310 style - 10 reminders, Unicode, 3 coding types*/ F_CAL71, /*Calendar in 7110 style - 4 types, recurrance, etc.*/ - F_PBK33, /*Phonebook in Unicode. 3310 style - name and entry*/ - F_PBK71, /*Extended phonebook - multiple numbers,Unicode.Like in 7110*/ + F_PBK33SIM,/*Phonebook in Unicode(3310 style).Name and number.No internal*/ + F_PBK33INT,/*Phonebook in Unicode(3310 style).Name and number.Internal available*/ + F_PBK71INT,/*Extended phonebook-multiple numbers,Unicode(7110 style).Internal available*/ + F_PBK61INT,/*Name and number,no Unicode(6110 style).Internal available*/ F_DATA61, /*We can make data calls using gnokiid. Like in 6110*/ F_DATA71, /*Datacalls using AT commands*/ - F_SMS, /*SMS with Inbox, Outbox*/ - F_SMS71, /*SMS with SMS folders like in 7110*/ + F_SMS, /*SMS with Inbox, Outbox*/ /*10*/ + F_SMS71, /*SMS with SMS folders like in 7110*/ F_AUTH, /*We can make authentication and have "Accessory connected" like in 6110*/ - F_NETMON, /*Netmonitor available*/ /*10*/ + F_NETMON, /*Netmonitor available*/ F_CALER61,/*Caller groups in 6110 style - 5 groups with members*/ F_KEYB, /*We can press keys*/ F_SMSCDEF,/*SMSC can have default recipient*/ F_SPEED, /*We can handle speed dials*/ F_SCRSAV, /*We have screen savers*/ F_DTMF, /*We can handle DTMF sequences*/ - F_NOPOWER,/*We must get power/battery info from netmonitor*/ + F_NOPOWER,/*We must get power/battery info from netmonitor*/ /*20*/ - F_STANIM, /*Startup logo animated or static*/ + F_STANIM, /*Startup logo animated or static*/ F_STA , /*Startup logo static*/ - F_STA62 , /*Startup logo static size 6210*/ /*20*/ + F_STA62 , /*Startup logo static size 6210*/ F_STA71 , /*Startup logo static size 7110*/ F_PROF61, /*Profiles numbered like in N6110*/ @@ -499,7 +476,7 @@ typedef enum { F_RING_SM,/*Binary ringtone in Smart Messaging*/ F_RINGBIN,/*Binary ringtone in binary format*/ - F_WAP /*WAP functions available*/ + F_WAP /*WAP functions available*/ /*30*/ } feat_index; typedef enum { @@ -519,26 +496,22 @@ typedef enum { FN_STARTUP, FN_PROFILES, FN_RINGTONES, - FN_WAP + FN_WAP, + FN_RINGNUMBER } featnum_index; /* For models table */ typedef struct { char *model; char *number; - feat_index features[17]; + feat_index features[18]; } OnePhoneModel; extern char *GetModelName (); -extern int GetModelFeature (featnum_index num); +int GetModelFeature (featnum_index num); -#ifndef UCLINUX extern bool AppendLog(u8 *buffer, int length,bool format); extern bool AppendLogText(u8 *buffer,bool format); -#else /* UCLINUX */ -#define AppendLog(buffer,length,format) -#define AppendLogText(buffer,format) -#endif /* UCLINUX */ typedef struct { int SIMPhonebookUsed;