diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-10-09 17:15:58 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-10-15 16:15:16 -0500 |
commit | 4734ebcb46100e623994c00a95c9cebd4d04784b (patch) | |
tree | e6baf79f117b7ae2225a62314224fca30174b8c8 /gatchat/gatmux.h | |
parent | 9aa218226122daba8e3d9bddbca11ea92a764b93 (diff) | |
download | ofono-4734ebcb46100e623994c00a95c9cebd4d04784b.tar.bz2 |
Refactor: Add convenience method to start 0710 MUX
Use an existing GAtChat that has been setup appropriately to conver the
channel into a MUX
Diffstat (limited to 'gatchat/gatmux.h')
-rw-r--r-- | gatchat/gatmux.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gatchat/gatmux.h b/gatchat/gatmux.h index 5f9f5e7d..cbb35bfe 100644 --- a/gatchat/gatmux.h +++ b/gatchat/gatmux.h @@ -32,7 +32,10 @@ struct _GAtMux; typedef struct _GAtMux GAtMux; -GAtMux *g_at_mux_new(GIOChannel *channel); +typedef void (*GAtMuxSetupFunc)(GAtMux *mux, gpointer user_data); + +GAtMux *g_at_mux_new_gsm0710_basic(GIOChannel *channel, int framesize); +GAtMux *g_at_mux_new_gsm0710_advanced(GIOChannel *channel, int framesize); GAtMux *g_at_mux_ref(GAtMux *mux); void g_at_mux_unref(GAtMux *mux); @@ -46,7 +49,18 @@ gboolean g_at_mux_set_disconnect_function(GAtMux *mux, gboolean g_at_mux_set_debug(GAtMux *mux, GAtDebugFunc func, gpointer user); GIOChannel *g_at_mux_create_channel(GAtMux *mux); -GAtChat *g_at_mux_create_chat(GAtMux *mux, GAtSyntax *syntax); + +/*! + * Uses the passed in GAtChat to setup a GSM 07.10 style multiplexer on the + * channel used by GAtChat. This function queries the multiplexer capability, + * preferring advanced mode over basic. If supported, the best available + * multiplexer mode is entered. If this is successful, the chat is + * shutdown and unrefed. The chat's channel will be transferred to the + * resulting multiplexer object. + */ +gboolean g_at_mux_setup_gsm0710(GAtChat *chat, + GAtMuxSetupFunc notify, gpointer user_data, + GDestroyNotify destroy); #ifdef __cplusplus } |