Gammu internals
1.38.0
|
Macros | |
#define | dbgprintf |
Typedefs | |
typedef struct _GSM_Debug_Info | GSM_Debug_Info |
Functions | |
int | smprintf_level (GSM_StateMachine *s, GSM_DebugSeverity severity, const char *format,...) |
GSM_Error | GSM_SetDebugFunction (GSM_Log_Function info, void *data, GSM_Debug_Info *privdi) |
GSM_Error | GSM_SetDebugFile (const char *info, GSM_Debug_Info *privdi) |
GSM_Error | GSM_SetDebugFileDescriptor (FILE *fd, gboolean closable, GSM_Debug_Info *privdi) |
GSM_Debug_Info * | GSM_GetGlobalDebug (void) |
gboolean | GSM_SetDebugLevel (const char *info, GSM_Debug_Info *privdi) |
gboolean | GSM_SetDebugCoding (const char *info, GSM_Debug_Info *privdi) |
gboolean | GSM_SetDebugGlobal (gboolean info, GSM_Debug_Info *privdi) |
void | GSM_LogError (GSM_StateMachine *s, const char *message, const GSM_Error err) |
int | smprintf (GSM_StateMachine *s, const char *format,...) |
Debuging handling.
#define dbgprintf |
Prints string to global debug log.
format | Format string as for printf. |
Definition at line 72 of file debug.h.
Referenced by Binary2RTTL(), Bitmap2BMP(), BMP2Bitmap(), DecodeXMLUTF8(), Fill_Time_T(), GetLineString(), GetTimeDifference(), GSM_DecodeMMSIndication(), GSM_DecodeNokiaRTTLRingtone(), GSM_DecodeVCARD(), GSM_EncodeEMSSound(), GSM_JADFindData(), GSM_ReadFile(), GSM_ReadRingtoneFile(), GSM_SaveRingtoneRttl(), GSM_SetDebugFile(), GSM_TryReadGammuRC(), loadbin(), loadgif(), loadmmf(), loadnlm(), loadnolngg(), loadnsl(), loadpuremidi(), loadre(), loadrttl(), proxy_connect(), ReadVCALDate(), ReadVCALDateTime(), ReadVCALInt(), and ReadVCALText().
typedef struct _GSM_Debug_Info GSM_Debug_Info |
Debugging configuration.
Definition at line 28 of file gammu-debug.h.
GSM_Debug_Info* GSM_GetGlobalDebug | ( | void | ) |
Returns global debug settings.
Definition at line 216 of file gsmcomon.c.
References GSM_global_debug.
void GSM_LogError | ( | GSM_StateMachine * | s, |
const char * | message, | ||
const GSM_Error | err | ||
) |
Logs error to debug log with additional message.
s | State machine structure pointer. |
message | String to be show in message. |
err | Error code. |
Definition at line 221 of file gsmcomon.c.
References ERR_NONE, GSM_ErrorName(), GSM_ErrorString(), and smprintf().
Referenced by GSM_InitConnection_Log().
gboolean GSM_SetDebugCoding | ( | const char * | info, |
GSM_Debug_Info * | privdi | ||
) |
Sets debug encoding.
info | Encoding to set. |
privdi | Pointer to debug information data. |
Definition at line 227 of file debug.c.
References _GSM_Debug_Info::coding, and TRUE.
GSM_Error GSM_SetDebugFile | ( | const char * | info, |
GSM_Debug_Info * | privdi | ||
) |
Sets debug file.
info | File path. |
privdi | Pointer to debug information data. |
Definition at line 144 of file debug.c.
References COMMIT_FLAG, dbgprintf, _GSM_Debug_Info::dl, DL_BINARY, DL_TEXTERROR, DL_TEXTERRORDATE, ERR_CANTOPENFILE, FALSE, GSM_SetDebugFileDescriptor(), and TRUE.
Referenced by GSM_InitConnection_Log().
GSM_Error GSM_SetDebugFileDescriptor | ( | FILE * | fd, |
gboolean | closable, | ||
GSM_Debug_Info * | privdi | ||
) |
Sets debug file.
fd | File descriptor. |
privdi | Pointer to debug information data. |
closable | Whether Gammu can close the file when it is no longer needed for debug output. Please note that stderr or stdout are never closed. |
Definition at line 127 of file debug.c.
References _GSM_Debug_Info::closable, _GSM_Debug_Info::df, ERR_NONE, TRUE, and _GSM_Debug_Info::was_lf.
Referenced by GSM_SetDebugFile(), and GSM_TerminateConnection().
GSM_Error GSM_SetDebugFunction | ( | GSM_Log_Function | info, |
void * | data, | ||
GSM_Debug_Info * | privdi | ||
) |
Sets logging function.
info | Function to call. |
data | User data to pass as a second parameter to callback. |
privdi | Pointer to debug information data. |
Definition at line 179 of file debug.c.
References ERR_NONE, _GSM_Debug_Info::log_function, and _GSM_Debug_Info::user_data.
Referenced by GSM_InitConnection_Log().
gboolean GSM_SetDebugGlobal | ( | gboolean | info, |
GSM_Debug_Info * | privdi | ||
) |
Enables using of global debugging configuration. Makes no effect on global debug configuration.
info | Enable global debug usage.. |
privdi | Pointer to debug information data. |
Definition at line 233 of file debug.c.
References PRINTF_STYLE, TRUE, and _GSM_Debug_Info::use_global.
gboolean GSM_SetDebugLevel | ( | const char * | info, |
GSM_Debug_Info * | privdi | ||
) |
Sets debug level.
info | Level as text. |
privdi | Pointer to debug information data. |
Definition at line 186 of file debug.c.
References _GSM_Debug_Info::dl, DL_BINARY, DL_NONE, DL_TEXT, DL_TEXTALL, DL_TEXTALLDATE, DL_TEXTDATE, DL_TEXTERROR, DL_TEXTERRORDATE, FALSE, and TRUE.
Referenced by GSM_InitConnection_Log().
int smprintf | ( | GSM_StateMachine * | s, |
const char * | format, | ||
... | |||
) |
Prints string to defined debug log.
s | State machine, where to print. |
format | Format string as for printf. |
Definition at line 261 of file debug.c.
References dbg_vprintf(), GSM_GetDI(), and PRINTF_STYLE.
Referenced by DUMMY_DeleteFolder(), DUMMY_Error(), DUMMY_GetFolderListing(), DUMMY_GetNextFileFolder(), DUMMY_Initialise(), DUMMY_PreAPICall(), DUMMY_SendSMS(), GSM_CloseConnection(), GSM_CreateFirmwareNumber(), GSM_DispatchMessage(), GSM_DumpMessageBinary_Custom(), GSM_DumpMessageText_Custom(), GSM_InitConnection_Log(), GSM_LogError(), GSM_OSErrorInfo(), GSM_RegisterAllConnections(), GSM_RegisterAllPhoneModules(), GSM_RegisterModule(), GSM_SendSavedSMS(), GSM_TerminateConnection(), GSM_TryGetModel(), lock_device(), N71_65_DecodePhonebook(), N71_65_EncodePhonebookFrame(), N71_65_PackPBKBlock(), N71_65_PB_CopyString(), NOKIA_DecodeDateTime(), NOKIA_EncodeDateTime(), NoneReply(), PHONE_EncodeSMSFrame(), PHONE_FindDataFile(), proxy_write(), and unlock_device().
int smprintf_level | ( | GSM_StateMachine * | s, |
GSM_DebugSeverity | severity, | ||
const char * | format, | ||
... | |||
) |
Prints string to defined debug log.
s | State machine, where to print. |
severity | Severity of printed message. |
format | Format string as for printf. |
Definition at line 278 of file debug.c.
References D_ERROR, D_TEXT, dbg_vprintf(), _GSM_Debug_Info::dl, DL_TEXT, DL_TEXTALL, DL_TEXTALLDATE, DL_TEXTDATE, DL_TEXTERROR, DL_TEXTERRORDATE, and GSM_GetDI().
Referenced by GSM_DispatchMessage(), GSM_InitConnection_Log(), GSM_WaitFor(), and NOKIA_EncodeDateTime().