diff options
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-individual-manager.c | 34 | ||||
-rw-r--r-- | libempathy/empathy-individual-manager.h | 3 |
2 files changed, 37 insertions, 0 deletions
diff --git a/libempathy/empathy-individual-manager.c b/libempathy/empathy-individual-manager.c index 32f972608..3fbaab408 100644 --- a/libempathy/empathy-individual-manager.c +++ b/libempathy/empathy-individual-manager.c @@ -534,3 +534,37 @@ empathy_individual_manager_get_flags_for_connection ( return flags; } + +static void +link_personas_cb (FolksIndividualAggregator *aggregator, + GAsyncResult *async_result, + gpointer user_data) +{ + GError *error = NULL; + + folks_individual_aggregator_link_personas_finish (aggregator, async_result, + &error); + + if (error != NULL) + { + g_warning ("Failed to link personas: %s", error->message); + g_clear_error (&error); + } +} + +void +empathy_individual_manager_link_personas (EmpathyIndividualManager *self, + GList *personas) +{ + EmpathyIndividualManagerPriv *priv; + + g_return_if_fail (EMPATHY_IS_INDIVIDUAL_MANAGER (self)); + g_return_if_fail (personas != NULL); + + priv = GET_PRIV (self); + + DEBUG ("Linking %u personas", g_list_length (personas)); + + folks_individual_aggregator_link_personas (priv->aggregator, personas, + (GAsyncReadyCallback) link_personas_cb, NULL); +} diff --git a/libempathy/empathy-individual-manager.h b/libempathy/empathy-individual-manager.h index 66014bcbb..0fe639d0c 100644 --- a/libempathy/empathy-individual-manager.h +++ b/libempathy/empathy-individual-manager.h @@ -87,5 +87,8 @@ empathy_individual_manager_get_flags_for_connection ( EmpathyIndividualManager *manager, TpConnection *connection); +void empathy_individual_manager_link_personas (EmpathyIndividualManager *self, + GList *personas); + G_END_DECLS #endif /* __EMPATHY_INDIVIDUAL_MANAGER_H__ */ |