diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2013-11-17 01:11:12 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2014-02-13 13:40:21 +0100 |
commit | d4dfd661b9bcfdad5a79e2a3f28374f0d0982c23 (patch) | |
tree | c6bf095648969ac35fc93a81922575deb228c392 /src/mm-port-serial-at.h | |
parent | 81ee07832d3ab733f59f869ad17d1d5577aef3ff (diff) |
port-serial-at: use GIO Async API like methods
Diffstat (limited to 'src/mm-port-serial-at.h')
-rw-r--r-- | src/mm-port-serial-at.h | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/src/mm-port-serial-at.h b/src/mm-port-serial-at.h index 58cf51c1..52e6c604 100644 --- a/src/mm-port-serial-at.h +++ b/src/mm-port-serial-at.h @@ -60,11 +60,6 @@ typedef void (*MMPortSerialAtUnsolicitedMsgFn) (MMPortSerialAt *port, GMatchInfo *match_info, gpointer user_data); -typedef void (*MMPortSerialAtResponseFn) (MMPortSerialAt *port, - GString *response, - GError *error, - gpointer user_data); - #define MM_PORT_SERIAL_AT_REMOVE_ECHO "remove-echo" #define MM_PORT_SERIAL_AT_INIT_SEQUENCE_ENABLED "init-sequence-enabled" #define MM_PORT_SERIAL_AT_INIT_SEQUENCE "init-sequence" @@ -97,21 +92,17 @@ void mm_port_serial_at_set_response_parser (MMPortSerialAt *self, gpointer user_data, GDestroyNotify notify); -void mm_port_serial_at_queue_command (MMPortSerialAt *self, - const char *command, - guint32 timeout_seconds, - gboolean is_raw, - GCancellable *cancellable, - MMPortSerialAtResponseFn callback, - gpointer user_data); - -void mm_port_serial_at_queue_command_cached (MMPortSerialAt *self, - const char *command, - guint32 timeout_seconds, - gboolean is_raw, - GCancellable *cancellable, - MMPortSerialAtResponseFn callback, - gpointer user_data); +void mm_port_serial_at_command (MMPortSerialAt *self, + const char *command, + guint32 timeout_seconds, + gboolean is_raw, + gboolean allow_cached, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +const gchar *mm_port_serial_at_command_finish (MMPortSerialAt *self, + GAsyncResult *res, + GError **error); /* * Convert a string into a quoted and escaped string. Returns a new |