Add support for switching to a different GAtSyntax at runtime

This commit is contained in:
Marcel Holtmann 2009-10-02 12:29:02 +02:00
parent 7e11615ac3
commit cfbc902287
2 changed files with 14 additions and 0 deletions

View File

@ -1003,6 +1003,18 @@ gboolean g_at_chat_shutdown(GAtChat *chat)
return TRUE;
}
gboolean g_at_chat_set_syntax(GAtChat *chat, GAtSyntax *syntax)
{
if (chat == NULL)
return FALSE;
g_at_syntax_unref(chat->syntax);
chat->syntax = g_at_syntax_ref(syntax);
return TRUE;
}
gboolean g_at_chat_set_disconnect_function(GAtChat *chat,
GAtDisconnectFunc disconnect, gpointer user_data)
{

View File

@ -47,6 +47,8 @@ void g_at_chat_unref(GAtChat *chat);
gboolean g_at_chat_shutdown(GAtChat *chat);
gboolean g_at_chat_set_syntax(GAtChat *chat, GAtSyntax *syntax);
gboolean g_at_chat_set_disconnect_function(GAtChat *chat,
GAtDisconnectFunc disconnect, gpointer user_data);