diff options
-rw-r--r-- | telepathy-logger/action-chain-internal.h | 5 | ||||
-rw-r--r-- | telepathy-logger/action-chain.c | 8 | ||||
-rw-r--r-- | telepathy-logger/channel-text.c | 4 | ||||
-rw-r--r-- | telepathy-logger/channel.c | 2 | ||||
-rw-r--r-- | telepathy-logger/dbus-service.c | 4 | ||||
-rw-r--r-- | telepathy-logger/observer.c | 2 | ||||
-rw-r--r-- | tests/tpl-channel-test.c | 4 |
7 files changed, 15 insertions, 14 deletions
diff --git a/telepathy-logger/action-chain-internal.h b/telepathy-logger/action-chain-internal.h index 32a0ff1a6..f0a75f49c 100644 --- a/telepathy-logger/action-chain-internal.h +++ b/telepathy-logger/action-chain-internal.h @@ -30,7 +30,8 @@ typedef struct { GSimpleAsyncResult *simple; } TplActionChain; -TplActionChain *_tpl_action_chain_new (GObject *obj, GAsyncReadyCallback cb, +TplActionChain *_tpl_action_chain_new_async (GObject *obj, + GAsyncReadyCallback cb, gpointer user_data); void _tpl_action_chain_free (TplActionChain *self); typedef void (*TplPendingAction) (TplActionChain *ctx, gpointer user_data); @@ -41,6 +42,6 @@ void _tpl_action_chain_prepend (TplActionChain *self, TplPendingAction func, void _tpl_action_chain_continue (TplActionChain *self); void _tpl_action_chain_terminate (TplActionChain *self); gpointer _tpl_action_chain_get_object (TplActionChain *self); -gboolean _tpl_action_chain_finish (GAsyncResult *result); +gboolean _tpl_action_chain_new_finish (GAsyncResult *result); #endif // __TPL_ACTION_CHAIN_H__ diff --git a/telepathy-logger/action-chain.c b/telepathy-logger/action-chain.c index ff7afc967..1411f570b 100644 --- a/telepathy-logger/action-chain.c +++ b/telepathy-logger/action-chain.c @@ -29,7 +29,7 @@ typedef struct { TplActionChain * -_tpl_action_chain_new (GObject *obj, +_tpl_action_chain_new_async (GObject *obj, GAsyncReadyCallback cb, gpointer user_data) { @@ -37,7 +37,7 @@ _tpl_action_chain_new (GObject *obj, ret->chain = g_queue_new (); ret->simple = g_simple_async_result_new (obj, cb, user_data, - _tpl_action_chain_finish); + _tpl_action_chain_new_async); g_object_set_data (G_OBJECT (ret->simple), "chain", ret); @@ -137,7 +137,7 @@ _tpl_action_chain_terminate (TplActionChain *self) /** - * _tpl_action_chain_finish: + * _tpl_action_chain_new_finish: * * Get the result from running the action chain (%TRUE if the chain completed * successfully, %FALSE if it was terminated). @@ -145,7 +145,7 @@ _tpl_action_chain_terminate (TplActionChain *self) * This function also frees the chain. */ gboolean -_tpl_action_chain_finish (GAsyncResult *result) +_tpl_action_chain_new_finish (GAsyncResult *result) { TplActionChain *chain; gboolean retval; diff --git a/telepathy-logger/channel-text.c b/telepathy-logger/channel-text.c index 9a1563f36..b472c5d86 100644 --- a/telepathy-logger/channel-text.c +++ b/telepathy-logger/channel-text.c @@ -477,7 +477,7 @@ tpl_channel_text_call_when_ready (TplChannelText *self, * If for any reason, the order is changed, it's needed to check what objects * are unreferenced by g_object_unref but used by a next action AND what object are actually not * prepared but used anyway */ - actions = _tpl_action_chain_new (G_OBJECT (self), cb, user_data); + actions = _tpl_action_chain_new_async (G_OBJECT (self), cb, user_data); _tpl_action_chain_append (actions, pendingproc_prepare_tpl_channel, NULL); _tpl_action_chain_append (actions, pendingproc_connect_signals, NULL); _tpl_action_chain_append (actions, pendingproc_get_my_contact, NULL); @@ -508,7 +508,7 @@ got_tpl_chan_ready_cb (GObject *obj, TplActionChain *ctx = user_data; /* if TplChannel preparation is OK, keep on with the TplChannelText */ - if (_tpl_action_chain_finish (tpl_chan_result)) + if (_tpl_action_chain_new_finish (tpl_chan_result)) _tpl_action_chain_continue (ctx); else _tpl_action_chain_terminate (ctx); diff --git a/telepathy-logger/channel.c b/telepathy-logger/channel.c index f8ef2a5d9..a33dbada2 100644 --- a/telepathy-logger/channel.c +++ b/telepathy-logger/channel.c @@ -227,7 +227,7 @@ call_when_ready_protected (TplChannel *self, { TplActionChain *actions; - actions = _tpl_action_chain_new (G_OBJECT (self), cb, user_data); + actions = _tpl_action_chain_new_async (G_OBJECT (self), cb, user_data); _tpl_action_chain_append (actions, pendingproc_get_ready_tp_connection, NULL); _tpl_action_chain_append (actions, pendingproc_get_ready_tp_channel, NULL); _tpl_action_chain_continue (actions); diff --git a/telepathy-logger/dbus-service.c b/telepathy-logger/dbus-service.c index ad8546a52..630c51a9c 100644 --- a/telepathy-logger/dbus-service.c +++ b/telepathy-logger/dbus-service.c @@ -308,7 +308,7 @@ favourite_contacts_file_parsed_cb (GObject *object, TplDBusService *self = TPL_DBUS_SERVICE (object); TplDBusServicePriv *priv = self->priv; - if (!_tpl_action_chain_finish (result)) + if (!_tpl_action_chain_new_finish (result)) { DEBUG ("Failed to parse the favourite contacts file and/or execute " "subsequent queued method calls"); @@ -323,7 +323,7 @@ tpl_dbus_service_constructed (GObject *object) { TplDBusServicePriv *priv = TPL_DBUS_SERVICE (object)->priv; - priv->favourite_contacts_actions = _tpl_action_chain_new (object, + priv->favourite_contacts_actions = _tpl_action_chain_new_async (object, favourite_contacts_file_parsed_cb, object); _tpl_action_chain_append (priv->favourite_contacts_actions, diff --git a/telepathy-logger/observer.c b/telepathy-logger/observer.c index 7bbae0fba..e6c9d5bf5 100644 --- a/telepathy-logger/observer.c +++ b/telepathy-logger/observer.c @@ -273,7 +273,7 @@ got_tpl_channel_text_ready_cb (GObject *obj, { ObservingContext *observing_ctx = user_data; DBusGMethodInvocation *dbus_ctx = observing_ctx->dbus_ctx; - gboolean success = _tpl_action_chain_finish (result); + gboolean success = _tpl_action_chain_new_finish (result); if (success) { diff --git a/tests/tpl-channel-test.c b/tests/tpl-channel-test.c index 4fa0721d6..f11980e25 100644 --- a/tests/tpl-channel-test.c +++ b/tests/tpl-channel-test.c @@ -132,7 +132,7 @@ tpl_channel_test_call_when_ready (TplChannelTest *self, * If for any reason, the order is changed, it's need to check what objects * are unreferenced by g_object_unref: after the order change, it might * happend that an object still has to be created after the change */ - actions = _tpl_action_chain_new (G_OBJECT (self), cb, user_data); + actions = _tpl_action_chain_new_async (G_OBJECT (self), cb, user_data); _tpl_action_chain_append (actions, pendingproc_prepare_tpl_channel, NULL); /* start the queue consuming */ _tpl_action_chain_continue (actions); @@ -159,7 +159,7 @@ got_tpl_chan_ready_cb (GObject *obj, TplActionChain *ctx = user_data; g_debug ("PREPARE"); - if (_tpl_action_chain_finish (result) == TRUE) + if (_tpl_action_chain_new_finish (result) == TRUE) _tpl_action_chain_continue (ctx); return; } |