summaryrefslogtreecommitdiff
path: root/gatchat/gatchat.h
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-08-06 17:53:30 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-08-06 17:53:30 -0700
commit473c3c902bd74a59c78b4053eaf3202089ae5b1f (patch)
treeace187755cd3e292efd14e82128d4fc928819c7e /gatchat/gatchat.h
parenta2a370c17591bef196be6dd4a9f6ee43ff5ac59d (diff)
downloadconnman-473c3c902bd74a59c78b4053eaf3202089ae5b1f.tar.gz
connman-473c3c902bd74a59c78b4053eaf3202089ae5b1f.tar.bz2
connman-473c3c902bd74a59c78b4053eaf3202089ae5b1f.zip
Sync up with oFono's GAtChat version
Diffstat (limited to 'gatchat/gatchat.h')
-rw-r--r--gatchat/gatchat.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/gatchat/gatchat.h b/gatchat/gatchat.h
index d0a59b83..97cf4610 100644
--- a/gatchat/gatchat.h
+++ b/gatchat/gatchat.h
@@ -37,13 +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);
-
-enum _GAtChatFlags {
- G_AT_CHAT_FLAG_NO_LEADING_CRLF = 1, /* Some emulators are broken */
- G_AT_CHAT_FLAG_EXTRA_PDU_CRLF = 2,
-};
-
-typedef enum _GAtChatFlags GAtChatFlags;
+typedef void (*GAtDebugFunc)(const char *str, gpointer user_data);
GAtChat *g_at_chat_new(GIOChannel *channel, GAtSyntax *syntax);
GAtChat *g_at_chat_new_from_tty(const char *device, GAtSyntax *syntax);
@@ -57,6 +51,13 @@ gboolean g_at_chat_set_disconnect_function(GAtChat *chat,
GAtDisconnectFunc disconnect, gpointer user_data);
/*!
+ * If the function is not NULL, then on every read/write from the GIOChannel
+ * provided to GAtChat the logging function will be called with the
+ * input/output string and user data
+ */
+gboolean g_at_chat_set_debug(GAtChat *chat, GAtDebugFunc func, gpointer user);
+
+/*!
* Queue an AT command for execution. The command contents are given
* in cmd. Once the command executes, the callback function given by
* func is called with user provided data in user_data.