diff options
Diffstat (limited to 'gatchat/gatserver.h')
-rw-r--r-- | gatchat/gatserver.h | 22 |
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); |