summaryrefslogtreecommitdiffstats
path: root/gatchat/gatserver.h
diff options
context:
space:
mode:
authorZhenhua Zhang <zhenhua.zhang@intel.com>2010-03-19 17:44:42 +0800
committerDenis Kenzior <denkenz@gmail.com>2010-03-22 12:59:04 -0500
commit8850d3dc9ef5ee1cb6aaa5b6291e879d98dc56d2 (patch)
tree07479638799f27f928a56646b677f2ab88581770 /gatchat/gatserver.h
parentc7828602d4a743159143623e7f10152f6090ff90 (diff)
downloadofono-8850d3dc9ef5ee1cb6aaa5b6291e879d98dc56d2.tar.bz2
Add server at command data structure
Diffstat (limited to 'gatchat/gatserver.h')
-rw-r--r--gatchat/gatserver.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/gatchat/gatserver.h b/gatchat/gatserver.h
index 698f7e0a..1c12a0df 100644
--- a/gatchat/gatserver.h
+++ b/gatchat/gatserver.h
@@ -26,6 +26,7 @@
extern "C" {
#endif
+#include "gatresult.h"
#include "gatutil.h"
struct _GAtServer;
@@ -46,6 +47,27 @@ enum _GAtServerResult {
typedef enum _GAtServerResult GAtServerResult;
+/* Types of AT command:
+ * COMMAND_ONLY: command without any sub-parameters, e.g. ATA, AT+CLCC
+ * QUERY: command followed by '?', e.g. AT+CPIN?
+ * SUPPORT: command followed by '=?', e.g. AT+CSMS=?
+ * SET: command followed by '=', e.g. AT+CLIP=1
+ * or, basic command followed with sub-parameters, e.g. ATD12345;
+ */
+enum _GAtServerRequestType {
+ G_AT_SERVER_REQUEST_TYPE_ERROR,
+ G_AT_SERVER_REQUEST_TYPE_COMMAND_ONLY,
+ G_AT_SERVER_REQUEST_TYPE_QUERY,
+ G_AT_SERVER_REQUEST_TYPE_SUPPORT,
+ G_AT_SERVER_REQUEST_TYPE_SET,
+};
+
+typedef enum _GAtServerRequestType GAtServerRequestType;
+
+typedef GAtServerResult (*GAtServerNotifyFunc)(GAtServerRequestType type,
+ GAtResult *result,
+ gpointer user_data);
+
GAtServer *g_at_server_new(GIOChannel *io);
GAtServer *g_at_server_ref(GAtServer *server);