diff options
author | Andres Salomon <dilinger@collabora.co.uk> | 2009-08-05 17:18:34 -0400 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-08-06 16:38:45 -0500 |
commit | d66fd48bf962079e13a3e3a7a97174e79c582c4f (patch) | |
tree | a569d9230524e3b64c22a207245acdeae21f0f49 /gatchat/gatchat.h | |
parent | 1418c2aec18ec81b3ce4806bae46614cc1fe672c (diff) | |
download | ofono-d66fd48bf962079e13a3e3a7a97174e79c582c4f.tar.bz2 |
gatchat: add debugging infrastructure
This patch adds debugging support to GAtChat (specifically of what's going
across the serial line). Callbacks can be set via g_at_chat_set_debugging,
and that callback is called after any channel reads or writes.
Diffstat (limited to 'gatchat/gatchat.h')
-rw-r--r-- | gatchat/gatchat.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gatchat/gatchat.h b/gatchat/gatchat.h index d0a59b83..9bfcab1d 100644 --- a/gatchat/gatchat.h +++ b/gatchat/gatchat.h @@ -37,6 +37,7 @@ typedef void (*GAtResultFunc)(gboolean success, GAtResult *result, gpointer user_data); typedef void (*GAtNotifyFunc)(GAtResult *result, gpointer user_data); typedef void (*GAtDisconnectFunc)(gpointer user_data); +typedef void (*GAtDebugFunc)(const char *str, gpointer user_data); enum _GAtChatFlags { G_AT_CHAT_FLAG_NO_LEADING_CRLF = 1, /* Some emulators are broken */ @@ -56,6 +57,9 @@ gboolean g_at_chat_shutdown(GAtChat *chat); gboolean g_at_chat_set_disconnect_function(GAtChat *chat, GAtDisconnectFunc disconnect, gpointer user_data); +gboolean g_at_chat_set_debugging(GAtChat *chat, GAtDebugFunc func, + gpointer user_data); + /*! * Queue an AT command for execution. The command contents are given * in cmd. Once the command executes, the callback function given by |