Data Structures | |
| struct | GSM_Config |
Typedefs | |
| typedef struct _GSM_StateMachine | GSM_StateMachine |
Functions | |
| GSM_Debug_Info * | GSM_GetDebug (GSM_StateMachine *s) |
| GSM_Error | GSM_InitConnection_Log (GSM_StateMachine *s, int ReplyNum, GSM_Log_Function log_function, void *user_data) |
| GSM_Error | GSM_InitConnection (GSM_StateMachine *s, int ReplyNum) |
| GSM_Error | GSM_TerminateConnection (GSM_StateMachine *s) |
| int | GSM_ReadDevice (GSM_StateMachine *s, bool waitforreply) |
| bool | GSM_IsConnected (GSM_StateMachine *s) |
| GSM_Error | GSM_FindGammuRC (INI_Section **result) |
| GSM_Error | GSM_ReadConfig (INI_Section *cfg_info, GSM_Config *cfg, int num) |
| GSM_Config * | GSM_GetConfig (GSM_StateMachine *s, int num) |
| int | GSM_GetConfigNum (const GSM_StateMachine *s) |
| void | GSM_SetConfigNum (GSM_StateMachine *s, int sections) |
| GSM_StateMachine * | GSM_AllocStateMachine (void) |
| void | GSM_FreeStateMachine (GSM_StateMachine *s) |
| GSM_ConnectionType | GSM_GetUsedConnection (GSM_StateMachine *s) |
| typedef struct _GSM_StateMachine GSM_StateMachine |
Private structure holding information about phone connection. Should be allocated by GSM_AllocStateMachine and freed by GSM_FreeStateMachine.
Definition at line 34 of file gammu-statemachine.h.
| GSM_StateMachine* GSM_AllocStateMachine | ( | void | ) |
Allocates new clean state machine structure. You should free it then by GSM_FreeStateMachine.
| GSM_Error GSM_FindGammuRC | ( | INI_Section ** | result | ) |
Finds and reads gammu configuration file. The search order depends on platform. On POSIX systems it looks for ~/.gammurc and then for /etc/gammurc, on Windows for gammurc in Application data folder, then in home and last fallback is in current driectory.
| result | Ini file representation |
| void GSM_FreeStateMachine | ( | GSM_StateMachine * | s | ) |
Frees state machine structure allocated by GSM_AllocStateMachine.
| s | Pointer to state machine structure. |
| GSM_Config* GSM_GetConfig | ( | GSM_StateMachine * | s, | |
| int | num | |||
| ) |
Gets gammu configuration from state machine.
| s | State machine data | |
| num | Number of section to read, -1 for currently used. |
| int GSM_GetConfigNum | ( | const GSM_StateMachine * | s | ) |
Gets number of active gammu configurations.
| s | State machine data |
| GSM_Debug_Info* GSM_GetDebug | ( | GSM_StateMachine * | s | ) |
Gets debug information for state machine.
| s | State machine data |
| GSM_ConnectionType GSM_GetUsedConnection | ( | GSM_StateMachine * | s | ) |
Gets number of active gammu configurations.
| s | State machine data |
| GSM_Error GSM_InitConnection | ( | GSM_StateMachine * | s, | |
| int | ReplyNum | |||
| ) |
Initiates connection.
| s | State machine data | |
| ReplyNum | Number of replies to await (usually 3). |
| GSM_Error GSM_InitConnection_Log | ( | GSM_StateMachine * | s, | |
| int | ReplyNum, | |||
| GSM_Log_Function | log_function, | |||
| void * | user_data | |||
| ) |
Initiates connection with custom logging callback.
| s | State machine data | |
| ReplyNum | Number of replies to await (usually 3). | |
| log_function | Logging function, see GSM_SetDebugFunction. | |
| user_data | User data for logging function, see GSM_SetDebugFunction. |
| bool GSM_IsConnected | ( | GSM_StateMachine * | s | ) |
Detects whether state machine is connected.
| s | State machine data |
| GSM_Error GSM_ReadConfig | ( | INI_Section * | cfg_info, | |
| GSM_Config * | cfg, | |||
| int | num | |||
| ) |
Processes gammu configuration.
| cfg_info | Ini file representation. | |
| cfg | Where to store configuration. | |
| num | Number of section to read. |
| int GSM_ReadDevice | ( | GSM_StateMachine * | s, | |
| bool | waitforreply | |||
| ) |
Attempts to read data from phone. This can be used for getting status of incoming events, which would not be found out without polling device.
| s | State machine data | |
| waitforreply | Whether to wait for some event |
| void GSM_SetConfigNum | ( | GSM_StateMachine * | s, | |
| int | sections | |||
| ) |
Gets number of active gammu configurations.
| s | State machine data | |
| sections | Number of sections. |
| GSM_Error GSM_TerminateConnection | ( | GSM_StateMachine * | s | ) |
Terminates connection.
| s | State machine data |
1.5.6