soc.2009.telepathy: be43110f: Camel cased all prpl specific structs. Q...
sttwister at gmail.com
sttwister at gmail.com
Tue Sep 8 09:21:28 EDT 2009
-----------------------------------------------------------------
Revision: be43110f0ed485fe372f619c128512915322e242
Ancestor: 26baf7d9a524b1e05f6e829867e08b63425e3ed4
Author: sttwister at gmail.com
Date: 2009-09-08T13:17:45
Branch: im.pidgin.soc.2009.telepathy
URL: http://d.pidgin.im/viewmtn/revision/info/be43110f0ed485fe372f619c128512915322e242
Modified files:
libpurple/protocols/telepathy/telepathy.c
libpurple/protocols/telepathy/telepathy.h
libpurple/protocols/telepathy/telepathy_account.c
libpurple/protocols/telepathy/telepathy_account.h
libpurple/protocols/telepathy/telepathy_avatar.c
libpurple/protocols/telepathy/telepathy_channel.c
libpurple/protocols/telepathy/telepathy_channel.h
libpurple/protocols/telepathy/telepathy_channel_list.c
libpurple/protocols/telepathy/telepathy_channel_list.h
libpurple/protocols/telepathy/telepathy_channel_text.c
libpurple/protocols/telepathy/telepathy_channel_text.h
libpurple/protocols/telepathy/telepathy_client.c
libpurple/protocols/telepathy/telepathy_connection.c
libpurple/protocols/telepathy/telepathy_connection.h
libpurple/protocols/telepathy/telepathy_contact.c
libpurple/protocols/telepathy/telepathy_contact.h
ChangeLog:
Camel cased all prpl specific structs. Quite a lot of s//
-------------- next part --------------
============================================================
--- libpurple/protocols/telepathy/telepathy.c 4ae89ac4bdbbf6026b941f2fc4d3014169147fbb
+++ libpurple/protocols/telepathy/telepathy.c 6d905a3d90cfc5bda30ca055116e1d791db1f9e1
@@ -198,7 +198,7 @@ telepathy_login(PurpleAccount *acct)
{
GValueArray *initial_presence;
- telepathy_account *account_data = (telepathy_account*)purple_account_get_int(
+ PrplTpAccount *account_data = (PrplTpAccount*)purple_account_get_int(
acct, "tp_account_data", 0);
purple_debug_info("telepathy", "Connecting to account %s\n",
@@ -233,7 +233,7 @@ telepathy_close(PurpleConnection *gc)
{
PurpleAccount *acct = purple_connection_get_account(gc);
- telepathy_account *account_data = (telepathy_account*)purple_account_get_int(
+ PrplTpAccount *account_data = (PrplTpAccount*)purple_account_get_int(
acct, "tp_account_data", 0);
purple_debug_info("telepathy", "Disabling account %s\n",
@@ -257,10 +257,10 @@ telepathy_send_im (PurpleConnection *gc,
const char *message,
PurpleMessageFlags flags)
{
- telepathy_connection *data = purple_connection_get_protocol_data(gc);
+ PrplTpConnection *data = purple_connection_get_protocol_data(gc);
/* check if the channel was already created */
- telepathy_text_channel *tp_channel = g_hash_table_lookup(data->text_Channels, who);
+ PrplTpTextChannel *tp_channel = g_hash_table_lookup(data->text_Channels, who);
TpChannel *channel = NULL;
/* strip HTML */
@@ -272,7 +272,7 @@ telepathy_send_im (PurpleConnection *gc,
}
else
{
- telepathy_account *tp_account = data->account_data;
+ PrplTpAccount *tp_account = data->account_data;
/* if this is the first message, we need to create the channel */
GHashTable *map = tp_asv_new (
@@ -281,7 +281,7 @@ telepathy_send_im (PurpleConnection *gc,
TP_IFACE_CHANNEL ".TargetID", G_TYPE_STRING, who,
NULL);
- tp_channel = g_new0(telepathy_text_channel, 1);
+ tp_channel = g_new0(PrplTpTextChannel, 1);
g_hash_table_insert(data->text_Channels, g_strdup(who), tp_channel);
purple_debug_info("telepathy", "Requesting text channel for %s\n", who);
@@ -312,10 +312,10 @@ telepathy_send_typing (PurpleConnection
static unsigned int
telepathy_send_typing (PurpleConnection *gc, const char *name, PurpleTypingState state)
{
- telepathy_connection *data = purple_connection_get_protocol_data(gc);
+ PrplTpConnection *data = purple_connection_get_protocol_data(gc);
TpChannel *channel = NULL;
TpChannelChatState tp_state;
- telepathy_text_channel *tp_channel;
+ PrplTpTextChannel *tp_channel;
if (data == NULL)
{
@@ -400,7 +400,7 @@ telepathy_set_status (PurpleAccount *acc
static void
telepathy_set_status (PurpleAccount *account, PurpleStatus *status)
{
- telepathy_account *account_data = (telepathy_account*)purple_account_get_int(
+ PrplTpAccount *account_data = (PrplTpAccount*)purple_account_get_int(
account, "tp_account_data", 0);
GValueArray *initial_presence;
@@ -432,8 +432,8 @@ telepathy_add_buddy (PurpleConnection *g
* but we still have to check if there's an equivalent Telepathy channel.
*/
- telepathy_connection *connection_data = purple_connection_get_protocol_data(gc);
- telepathy_group *tp_group = g_hash_table_lookup(connection_data->groups, group_name);
+ PrplTpConnection *connection_data = purple_connection_get_protocol_data(gc);
+ PrplTpGroup *tp_group = g_hash_table_lookup(connection_data->groups, group_name);
purple_debug_info("telepathy", "Adding buddy %s to group %s\n",
buddy_name, group_name);
@@ -443,7 +443,7 @@ telepathy_add_buddy (PurpleConnection *g
*/
if (tp_group == NULL)
{
- telepathy_connection *data = purple_connection_get_protocol_data(gc);
+ PrplTpConnection *data = purple_connection_get_protocol_data(gc);
/* Request a contact list channel representing a group witht the specified name */
GHashTable *request = tp_asv_new (
@@ -488,7 +488,7 @@ telepathy_remove_buddy (PurpleConnection
telepathy_remove_buddy (PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
{
const gchar* buddy_name = purple_buddy_get_name(buddy);
- telepathy_connection *connection_data = purple_connection_get_protocol_data(gc);
+ PrplTpConnection *connection_data = purple_connection_get_protocol_data(gc);
gchar const *ids[] = { buddy_name, NULL };
@@ -503,15 +503,15 @@ telepathy_join_chat (PurpleConnection *g
static void
telepathy_join_chat (PurpleConnection *gc, GHashTable *components)
{
- telepathy_connection *data = purple_connection_get_protocol_data(gc);
+ PrplTpConnection *data = purple_connection_get_protocol_data(gc);
const gchar *name = g_hash_table_lookup(components, "room");
- telepathy_room_channel *tp_channel = g_hash_table_lookup(components, "tp_channel");
+ PrplTpRoomChannel *tp_channel = g_hash_table_lookup(components, "tp_channel");
/* Is this a channel the user requested? */
if (tp_channel == NULL)
{
- telepathy_account *account_data = data->account_data;
+ PrplTpAccount *account_data = data->account_data;
/* Request a room text channel */
GHashTable *map = tp_asv_new (
@@ -554,8 +554,8 @@ invite_contact_to_chatroom_cb (TpConnect
gpointer user_data,
GObject *weak_object)
{
- telepathy_chat_invitation *invitation = user_data;
- telepathy_room_channel *tp_channel = invitation->tp_channel;
+ PrplTpChatInvitation *invitation = user_data;
+ PrplTpRoomChannel *tp_channel = invitation->tp_channel;
GArray *arr;
if (error != NULL)
@@ -587,7 +587,7 @@ telepathy_reject_chat (PurpleConnection
static void
telepathy_reject_chat (PurpleConnection *gc, GHashTable *components)
{
- telepathy_room_channel *tp_channel = g_hash_table_lookup(components, "tp_channel");
+ PrplTpRoomChannel *tp_channel = g_hash_table_lookup(components, "tp_channel");
if (tp_channel != NULL)
{
@@ -598,25 +598,25 @@ telepathy_chat_invite (PurpleConnection
static void
telepathy_chat_invite (PurpleConnection *gc, int id, const char *message, const char *who)
{
- telepathy_connection *data = purple_connection_get_protocol_data(gc);
+ PrplTpConnection *data = purple_connection_get_protocol_data(gc);
- telepathy_room_channel *tp_channel = g_hash_table_lookup(
+ PrplTpRoomChannel *tp_channel = g_hash_table_lookup(
data->room_Channels, (gpointer)(TpHandle)id);
gchar const *ids[] = { who, NULL };
- telepathy_chat_invitation *invitation;
+ PrplTpChatInvitation *invitation;
if (tp_channel == NULL)
{
- purple_debug_error("telepathy", "No telepathy_room_channel struct cached"
+ purple_debug_error("telepathy", "No PrplTpRoomChannel struct cached"
" for %d\n", id);
return;
}
purple_debug_info("telepathy", "Inviting %s to chatroom\n", who);
- invitation = g_new(telepathy_chat_invitation, 1);
+ invitation = g_new(PrplTpChatInvitation, 1);
invitation->tp_channel = tp_channel;
invitation->msg = g_strdup(message);
@@ -629,14 +629,14 @@ telepathy_chat_leave (PurpleConnection *
static void
telepathy_chat_leave (PurpleConnection *gc, int id)
{
- telepathy_connection *data = purple_connection_get_protocol_data(gc);
+ PrplTpConnection *data = purple_connection_get_protocol_data(gc);
- telepathy_room_channel *tp_channel = g_hash_table_lookup(
+ PrplTpRoomChannel *tp_channel = g_hash_table_lookup(
data->room_Channels, (gpointer)(TpHandle)id);
if (tp_channel == NULL)
{
- purple_debug_error("telepathy", "No telepathy_room_channel struct cached"
+ purple_debug_error("telepathy", "No PrplTpRoomChannel struct cached"
" for %d\n", id);
return;
}
@@ -647,9 +647,9 @@ telepathy_chat_send (PurpleConnection *g
static int
telepathy_chat_send (PurpleConnection *gc, int id, const char *message, PurpleMessageFlags flags)
{
- telepathy_connection *data = purple_connection_get_protocol_data(gc);
+ PrplTpConnection *data = purple_connection_get_protocol_data(gc);
- telepathy_room_channel *tp_channel = g_hash_table_lookup(
+ PrplTpRoomChannel *tp_channel = g_hash_table_lookup(
data->room_Channels, (gpointer)(TpHandle)id);
TpChannel *channel;
@@ -658,7 +658,7 @@ telepathy_chat_send (PurpleConnection *g
if (tp_channel == NULL)
{
- purple_debug_error("telepathy", "No telepathy_room_channel struct cached"
+ purple_debug_error("telepathy", "No PrplTpRoomChannel struct cached"
" for %d\n", id);
return 0;
}
@@ -691,7 +691,7 @@ telepathy_set_buddy_icon (PurpleConnecti
static void
telepathy_set_buddy_icon (PurpleConnection *gc, PurpleStoredImage *img)
{
- telepathy_connection *data = purple_connection_get_protocol_data(gc);
+ PrplTpConnection *data = purple_connection_get_protocol_data(gc);
guint size = purple_imgstore_get_size(img);
gchar *mime_type = g_strdup_printf("images/%s", purple_imgstore_get_extension(img));
@@ -726,10 +726,10 @@ telepathy_set_chat_topic (PurpleConnecti
static void
telepathy_set_chat_topic (PurpleConnection *gc, int id, const char *topic)
{
- telepathy_connection *data = purple_connection_get_protocol_data(gc);
- telepathy_room_channel *tp_channel = g_hash_table_lookup(data->room_Channels, (gpointer)id);
+ PrplTpConnection *data = purple_connection_get_protocol_data(gc);
+ PrplTpRoomChannel *tp_channel = g_hash_table_lookup(data->room_Channels, (gpointer)id);
- telepathy_property *tp_property;
+ PrplTpProperty *tp_property;
GPtrArray *arr;
@@ -741,7 +741,7 @@ telepathy_set_chat_topic (PurpleConnecti
if (tp_channel == NULL)
{
- purple_debug_error("telepathy", "There is no cached telepathy_room_channel for"
+ purple_debug_error("telepathy", "There is no cached PrplTpRoomChannel for"
" updating status!\n");
return;
}
@@ -797,7 +797,7 @@ telepathy_destroy(PurplePlugin *plugin)
/* free everything that we created */
if (g_strcmp0(plugin->info->id, "prpl-telepathy") != 0) {
- telepathy_data *data;
+ PrplTpData *data;
g_free(plugin->info->extra_info);
g_free(plugin->info);
data = plugin->extra;
@@ -1088,7 +1088,7 @@ export_prpl(TpConnectionManager *cm,
/* create a plugin struct and copy all the information from the template */
PurplePlugin *plugin = purple_plugin_new(TRUE, NULL);
- telepathy_data *data = g_new0(telepathy_data, 1);
+ PrplTpData *data = g_new0(PrplTpData, 1);
plugin->info = g_memdup(&telepathy_info, sizeof(telepathy_info));
plugin->info->extra_info = g_memdup(&telepathy_prpl_info, sizeof(telepathy_prpl_info));
============================================================
--- libpurple/protocols/telepathy/telepathy.h 889858bd29f636de14311dd12a4dc577b4176f0b
+++ libpurple/protocols/telepathy/telepathy.h 73f0807ac43ec278788bf46933d603a0a4641dd1
@@ -46,6 +46,6 @@ typedef struct
TpConnectionManagerProtocol *protocol;
PurplePlugin *plugin;
-} telepathy_data;
+} PrplTpData;
#endif /* _TELEPATHY_H_ */
============================================================
--- libpurple/protocols/telepathy/telepathy_account.c 86f6c83115195170cb5d1d028f442360cc7b3984
+++ libpurple/protocols/telepathy/telepathy_account.c e2010cc36257c387e6f34880da64e82364dfc3b8
@@ -35,7 +35,7 @@ void
#include "../../../pidgin/gtkaccount.h"
void
-account_properties_changed (telepathy_account *account_data,
+account_properties_changed (PrplTpAccount *account_data,
GHashTable *properties,
gboolean first_time)
{
@@ -187,7 +187,7 @@ static void
}
static void
-save_account_parameters (telepathy_account *account_data,
+save_account_parameters (PrplTpAccount *account_data,
TpConnectionManagerParam *params)
{
PurpleAccount *account = account_data->account;
@@ -269,7 +269,7 @@ get_account_properties_cb (TpProxy *prox
gpointer user_data,
GObject *weak_object)
{
- telepathy_account *account_data = user_data;
+ PrplTpAccount *account_data = user_data;
GHashTable *parameters;
const gchar *display_name;
@@ -367,11 +367,11 @@ purple_account_modified_cb (PurpleAccoun
purple_account_modified_cb (PurpleAccount *account,
gpointer user_data)
{
- telepathy_account *account_data = (telepathy_account*)purple_account_get_int(
+ PrplTpAccount *account_data = (PrplTpAccount*)purple_account_get_int(
account, "tp_account_data", 0);
PurplePlugin *plugin;
- telepathy_data *data;
+ PrplTpData *data;
if (account_data == NULL)
{
@@ -403,12 +403,12 @@ purple_account_destroying_cb (PurpleAcco
purple_account_destroying_cb (PurpleAccount *account,
gpointer user_data)
{
- telepathy_account *account_data;
+ PrplTpAccount *account_data;
/* Save the changes to AccountManager and destroy the alocated struct */
purple_account_modified_cb(account, user_data);
- account_data = (telepathy_account*)purple_account_get_int(
+ account_data = (PrplTpAccount*)purple_account_get_int(
account, "tp_account_data", 0);
if (account_data != NULL)
@@ -427,7 +427,7 @@ account_removed_cb (TpAccount *proxy,
gpointer user_data,
GObject *weak_object)
{
- telepathy_account *account_data = user_data;
+ PrplTpAccount *account_data = user_data;
purple_debug_info("telepathy", "Account %s removed!\n",
purple_account_get_username(account_data->account));
@@ -443,7 +443,7 @@ account_get_all_cb (TpProxy *proxy,
gpointer user_data,
GObject *weak_object)
{
- telepathy_account *account_data = user_data;
+ PrplTpAccount *account_data = user_data;
if (error != NULL)
{
@@ -464,7 +464,7 @@ account_property_changed_cb (TpAccount *
gpointer user_data,
GObject *weak_object)
{
- telepathy_account *account_data = user_data;
+ PrplTpAccount *account_data = user_data;
GHashTableIter iter;
gpointer key, value;
@@ -491,7 +491,7 @@ create_account_cb (TpAccountManager *pro
gpointer user_data,
GObject *weak_object)
{
- telepathy_account *account_data = user_data;
+ PrplTpAccount *account_data = user_data;
TpAccount *tp_account;
TpDBusDaemon *daemon;
GError *err = NULL;
@@ -566,10 +566,10 @@ purple_account_added_cb (PurpleAccount *
strlen(TELEPATHY_ID));
PurplePlugin *plugin;
- telepathy_data *data;
+ PrplTpData *data;
GHashTable *params_hash;
GPtrArray *unset;
- telepathy_account *account_data;
+ PrplTpAccount *account_data;
if (g_strcmp0(protocol_id, TELEPATHY_ID) != 0)
{
@@ -604,7 +604,7 @@ purple_account_added_cb (PurpleAccount *
build_parameters_from_purple_account(account, data->protocol->params,
¶ms_hash, &unset);
- account_data = g_new0(telepathy_account, 1);
+ account_data = g_new0(PrplTpAccount, 1);
account_data->account = account;
account_data->cm = g_strdup((gchar *)tp_connection_manager_get_name(data->cm));
@@ -645,7 +645,7 @@ purple_account_removed_cb (PurpleAccount
purple_account_removed_cb (PurpleAccount *account,
gpointer user_data)
{
- telepathy_account *account_data;
+ PrplTpAccount *account_data;
gint account_data_int = purple_account_get_int(account, "tp_account_data", 0);
@@ -654,7 +654,7 @@ purple_account_removed_cb (PurpleAccount
return;
}
- account_data = (telepathy_account*)account_data_int;
+ account_data = (PrplTpAccount*)account_data_int;
purple_debug_info("telepathy", "PurpleAccount removed!\n");
@@ -709,7 +709,7 @@ get_valid_accounts_cb (TpProxy *proxy,
{
gchar *obj_Path = g_ptr_array_index(accounts, i);
TpAccount *account;
- telepathy_account *account_data;
+ PrplTpAccount *account_data;
purple_debug_info("telepathy", " %s\n", obj_Path);
@@ -724,7 +724,7 @@ get_valid_accounts_cb (TpProxy *proxy,
continue;
}
- account_data = g_new0(telepathy_account, 1);
+ account_data = g_new0(PrplTpAccount, 1);
account_data->tp_account = account;
account_data->obj_Path = g_strdup(obj_Path);
============================================================
--- libpurple/protocols/telepathy/telepathy_account.h 842b74463d8921742f00d1f67e62ef0c7b256453
+++ libpurple/protocols/telepathy/telepathy_account.h 96f1e14bbef395f552356f5575727f1873b4ed62
@@ -32,17 +32,17 @@ typedef struct
TpAccount *tp_account;
PurpleAccount *account;
- telepathy_connection *connection_data;
+ PrplTpConnection *connection_data;
gchar *obj_Path;
gchar *cm, *protocol;
GHashTable *properties;
-} telepathy_account;
+} PrplTpAccount;
void
-account_properties_changed (telepathy_account *account_data,
+account_properties_changed (PrplTpAccount *account_data,
GHashTable *properties,
gboolean first_time);
============================================================
--- libpurple/protocols/telepathy/telepathy_avatar.c f3119de41d699e0ddb8878ed4df74d0b0d3eb055
+++ libpurple/protocols/telepathy/telepathy_avatar.c 6a08d5a4223a085f8ea5d498c8bc3feba5f37835
@@ -46,7 +46,7 @@ get_known_avatar_tokens_cb (TpConnection
gpointer user_data,
GObject *weak_object)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
GHashTableIter iter;
guint handle;
gchar *token;
@@ -62,7 +62,7 @@ get_known_avatar_tokens_cb (TpConnection
/* got throught all known tokens */
while (g_hash_table_iter_next(&iter, (gpointer)&handle, (gpointer)&token))
{
- telepathy_contact *contact_data = g_hash_table_lookup(
+ PrplTpContact *contact_data = g_hash_table_lookup(
data->contacts, (gpointer)handle);
purple_debug_info("telepathy", "Known token: %u -> (%s)\n", handle, (gchar *)token);
@@ -124,9 +124,9 @@ avatar_retrieved_cb (TpConnection *proxy
gpointer user_data,
GObject *weak_object)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
PurpleBuddyIcon *icon;
- telepathy_contact *contact_data = g_hash_table_lookup(data->contacts, (gpointer)arg_Contact);
+ PrplTpContact *contact_data = g_hash_table_lookup(data->contacts, (gpointer)arg_Contact);
TpContact *contact;
gpointer avatar;
@@ -158,8 +158,8 @@ avatar_updated_cb (TpConnection *proxy,
gpointer user_data,
GObject *weak_object)
{
- telepathy_connection *data = user_data;
- telepathy_contact *contact_data = g_hash_table_lookup(data->contacts, (gpointer)arg_Contact);
+ PrplTpConnection *data = user_data;
+ PrplTpContact *contact_data = g_hash_table_lookup(data->contacts, (gpointer)arg_Contact);
TpContact *contact;
PurpleBuddy *buddy;
PurpleBuddyIcon *icon;
@@ -225,7 +225,7 @@ get_avatar_properties_cb (TpProxy *proxy
gpointer user_data,
GObject *weak_object)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
PurplePlugin *plugin = purple_connection_get_prpl(data->gc);
PurplePluginProtocolInfo *prpl_info = plugin->info->extra_info;
============================================================
--- libpurple/protocols/telepathy/telepathy_channel.c 263e5a41751e203866c160ac492e8c5912e2efcc
+++ libpurple/protocols/telepathy/telepathy_channel.c c2ccf61c678b00721ce06788698184c231775eda
@@ -132,7 +132,7 @@ void
}
void
-handle_new_channel (telepathy_connection *data,
+handle_new_channel (PrplTpConnection *data,
const GValueArray *channel_Properties)
{
char *object_Path = g_value_get_boxed(g_value_array_get_nth((GValueArray *)channel_Properties, 0));
@@ -182,7 +182,7 @@ new_channels_cb (TpConnection *proxy,
GObject *weak_object)
{
int i;
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
if (data->listing_channels)
return;
@@ -208,7 +208,7 @@ get_channels_cb (TpProxy *proxy,
}
else
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
/* unpack the a(oa{sv}) struct */
const GPtrArray *channels = g_value_get_boxed(out_Value);
============================================================
--- libpurple/protocols/telepathy/telepathy_channel.h f58e52d4e535e193c34e9e07ccadce36e3a209b3
+++ libpurple/protocols/telepathy/telepathy_channel.h 570239286a30824ced924971617e215db01c7750
@@ -48,7 +48,7 @@ void
gpointer user_data);
void
-handle_new_channel (telepathy_connection *data,
+handle_new_channel (PrplTpConnection *data,
const GValueArray *channel_Properties);
void
============================================================
--- libpurple/protocols/telepathy/telepathy_channel_list.c a7700f37aa5fccf730d4e640b099574d52e8bf05
+++ libpurple/protocols/telepathy/telepathy_channel_list.c e5bd6f75d2fa12a96876dc15df0f4be3052252c4
@@ -28,7 +28,7 @@ void
#include "telepathy_contact.h"
void
-destroy_group(telepathy_group *tp_group)
+destroy_group(PrplTpGroup *tp_group)
{
g_free(tp_group);
}
@@ -69,7 +69,7 @@ request_authorization_auth_cb (gpointer
static void
request_authorization_auth_cb (gpointer user_data)
{
- telepathy_authorization_request *request = user_data;
+ PrplTpAuthorizationRequest *request = user_data;
GArray *arr = g_array_new(FALSE, FALSE, sizeof(guint));
purple_debug_info("telepathy", "Accepting request from %u\n", request->handle);
@@ -104,7 +104,7 @@ request_authorization_deny_cb (gpointer
static void
request_authorization_deny_cb (gpointer user_data)
{
- telepathy_authorization_request *request = user_data;
+ PrplTpAuthorizationRequest *request = user_data;
GArray *arr = g_array_new(FALSE, FALSE, sizeof(guint));
purple_debug_info("telepathy", "Denying request from %u\n", request->handle);
@@ -133,7 +133,7 @@ request_authorization_cb (TpConnection *
gpointer user_data,
GObject *weak_object)
{
- telepathy_authorization_request *data = user_data;
+ PrplTpAuthorizationRequest *data = user_data;
int i;
if (error != NULL)
@@ -151,8 +151,8 @@ request_authorization_cb (TpConnection *
/* Prompt the user for authorization for each contact */
for (i = 0; i<n_contacts; ++i)
{
- telepathy_authorization_request *request = g_new0(
- telepathy_authorization_request, 1);
+ PrplTpAuthorizationRequest *request = g_new0(
+ PrplTpAuthorizationRequest, 1);
*request = *data;
request->handle = tp_contact_get_handle(contacts[i]);
@@ -205,8 +205,8 @@ members_changed_cb (TpChannel *proxy,
if (arg_Local_Pending->len > 0)
{
- telepathy_connection *data = user_data;
- telepathy_authorization_request *request;
+ PrplTpConnection *data = user_data;
+ PrplTpAuthorizationRequest *request;
const TpContactFeature features[] = {
TP_CONTACT_FEATURE_ALIAS,
@@ -220,7 +220,7 @@ members_changed_cb (TpChannel *proxy,
* First, we request a TpContact for that handle and the promp the user.
*/
- request = g_new0(telepathy_authorization_request, 1);
+ request = g_new0(PrplTpAuthorizationRequest, 1);
request->connection_data = data;
request->channel = proxy;
@@ -240,7 +240,7 @@ get_local_pending_members_with_info_cb (
gpointer user_data,
GObject *weak_object)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
int i;
if (error != NULL)
@@ -262,7 +262,7 @@ get_local_pending_members_with_info_cb (
guint handle;
const gchar *message;
- telepathy_authorization_request *request;
+ PrplTpAuthorizationRequest *request;
const TpContactFeature features[] = {
TP_CONTACT_FEATURE_ALIAS,
@@ -284,7 +284,7 @@ get_local_pending_members_with_info_cb (
* First, we request a TpContact for that handle and the prompt the user.
*/
- request = g_new0(telepathy_authorization_request, 1);
+ request = g_new0(PrplTpAuthorizationRequest, 1);
request->connection_data = data;
request->channel = proxy;
@@ -299,7 +299,7 @@ handle_list_channel (TpChannel *channel,
void
handle_list_channel (TpChannel *channel,
- telepathy_connection *data)
+ PrplTpConnection *data)
{
TpConnection *connection = data->connection;
const TpIntSet *members;
@@ -314,7 +314,7 @@ handle_list_channel (TpChannel *channel,
guint handle;
guint handle_type;
- telepathy_group *group;
+ PrplTpGroup *group;
gchar *buddy_name;
const gchar *group_name;
@@ -336,7 +336,7 @@ handle_list_channel (TpChannel *channel,
handles = tp_intset_to_array (members);
/* this struct is needed to pass both the connection data and the channel proxy */
- group = g_new0(telepathy_group, 1);
+ group = g_new0(PrplTpGroup, 1);
group->channel = channel;
group->connection_data = data;
============================================================
--- libpurple/protocols/telepathy/telepathy_channel_list.h 0690f27c3f2865a95c691c94942fe2c8ee454c95
+++ libpurple/protocols/telepathy/telepathy_channel_list.h 34185c1c4052cc2fbc5b6afeec2b5154a194432b
@@ -27,22 +27,22 @@ typedef struct
typedef struct
{
- telepathy_connection *connection_data;
+ PrplTpConnection *connection_data;
TpChannel *channel;
TpHandle handle;
const gchar *message;
-} telepathy_authorization_request;
+} PrplTpAuthorizationRequest;
typedef struct
{
- telepathy_connection *connection_data;
+ PrplTpConnection *connection_data;
TpChannel *channel;
-} telepathy_group;
+} PrplTpGroup;
void
-destroy_group(telepathy_group *tp_group);
+destroy_group(PrplTpGroup *tp_group);
void
create_group_channel_cb (TpConnection *proxy,
@@ -60,6 +60,6 @@ handle_list_channel (TpChannel *channel,
void
handle_list_channel (TpChannel *channel,
- telepathy_connection *data);
+ PrplTpConnection *data);
#endif /* _TELEPATHY_CHANNEL_LIST_H_ */
============================================================
--- libpurple/protocols/telepathy/telepathy_channel_text.c 3c5a5deb0a83d5b47b5e1e620f4a73f98dfcdae3
+++ libpurple/protocols/telepathy/telepathy_channel_text.c 1328f0c1425b65dabc97f32c77c058c7d72f2ca4
@@ -31,7 +31,7 @@ void
#include "telepathy_contact.h"
void
-destroy_property(telepathy_property *tp_property)
+destroy_property(PrplTpProperty *tp_property)
{
g_free(tp_property->name);
g_free(tp_property->signature);
@@ -42,13 +42,13 @@ void
}
void
-destroy_room_channel(telepathy_room_channel *tp_channel)
+destroy_room_channel(PrplTpRoomChannel *tp_channel)
{
g_free(tp_channel);
}
void
-destroy_text_channel(telepathy_text_channel *tp_channel)
+destroy_text_channel(PrplTpTextChannel *tp_channel)
{
g_free(tp_channel);
}
@@ -60,7 +60,7 @@ write_message_to_chatroom (int id,
const gchar *msg,
gpointer user_data)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
/* escape HTML special characters */
gchar *escaped_message = g_markup_escape_text(msg, -1);
@@ -79,7 +79,7 @@ static void
}
static void
-chat_got_message (telepathy_room_channel *tp_channel,
+chat_got_message (PrplTpRoomChannel *tp_channel,
guint arg_ID,
guint arg_Timestamp,
guint arg_Sender,
@@ -132,8 +132,8 @@ get_contacts_for_scrollback_cb (TpConnec
gpointer user_data,
GObject *weak_object)
{
- telepathy_scrollback_messages *tp_messages = user_data;
- telepathy_room_channel *tp_channel = tp_messages->channel_data;
+ PrplTpScrollbackMessages *tp_messages = user_data;
+ PrplTpRoomChannel *tp_channel = tp_messages->channel_data;
if (error != NULL)
{
@@ -162,8 +162,8 @@ get_contacts_for_scrollback_cb (TpConnec
/* We are now ready to print the messages */
for (i = 0; i<tp_messages->messages->len; ++i)
{
- telepathy_message tp_message = g_array_index(tp_messages->messages,
- telepathy_message, i);
+ PrplTpMessage tp_message = g_array_index(tp_messages->messages,
+ PrplTpMessage, i);
chat_got_message(tp_channel,
tp_message.msg_id,
@@ -195,8 +195,8 @@ static void
}
static void
-chat_got_scrollback_messages (telepathy_connection *data,
- telepathy_scrollback_messages *tp_messages)
+chat_got_scrollback_messages (PrplTpConnection *data,
+ PrplTpScrollbackMessages *tp_messages)
{
GArray *handles = tp_messages->handles;
@@ -234,7 +234,7 @@ chat_list_pending_messages_cb (TpChanne
}
else
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
int i;
@@ -244,10 +244,10 @@ chat_list_pending_messages_cb (TpChanne
/* Get the channel struct by channel handle
* (which is the same with the libpurple chat id)
*/
- telepathy_room_channel *tp_channel = g_hash_table_lookup(
+ PrplTpRoomChannel *tp_channel = g_hash_table_lookup(
data->room_Channels, (gpointer)handle);
- telepathy_scrollback_messages *tp_messages;
+ PrplTpScrollbackMessages *tp_messages;
if (tp_channel == NULL)
{
@@ -266,10 +266,10 @@ chat_list_pending_messages_cb (TpChanne
/* This struct will keep all the messages and the handles we need to query */
- tp_messages = g_new(telepathy_scrollback_messages, 1);
+ tp_messages = g_new(PrplTpScrollbackMessages, 1);
/* This will keep the messages, including all information */
- tp_messages->messages = g_array_new(FALSE, FALSE, sizeof(telepathy_message));
+ tp_messages->messages = g_array_new(FALSE, FALSE, sizeof(PrplTpMessage));
/* This will keep the handles of the contacts that we need to query */
tp_messages->handles = g_array_new(TRUE, FALSE, sizeof(TpHandle));
@@ -281,7 +281,7 @@ chat_list_pending_messages_cb (TpChanne
/* unpack the relevant info from (uuuuus) */
GValueArray *arr = g_ptr_array_index(out_Pending_Messages, i);
- telepathy_message tp_message;
+ PrplTpMessage tp_message;
TpContact *contact;
tp_message.msg_id = g_value_get_uint(g_value_array_get_nth(arr, 0));
@@ -325,7 +325,7 @@ chat_received_cb (TpChannel *proxy,
gpointer user_data,
GObject *weak_object)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
GHashTable *properties = tp_channel_borrow_immutable_properties(proxy);
gchar *who = (gchar *)tp_asv_get_string(properties, TP_IFACE_CHANNEL ".TargetID");
@@ -334,7 +334,7 @@ chat_received_cb (TpChannel *proxy,
/* Get the channel struct by channel handle
* (which is the same with the libpurple chat id)
*/
- telepathy_room_channel *tp_channel = g_hash_table_lookup(
+ PrplTpRoomChannel *tp_channel = g_hash_table_lookup(
data->room_Channels, (gpointer)handle);
if (tp_channel == NULL)
@@ -364,7 +364,7 @@ chat_send_error_cb (TpChannel *proxy,
gpointer user_data,
GObject *weak_object)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
const gchar *who = tp_channel_get_identifier(proxy);
@@ -430,7 +430,7 @@ chat_send_cb (TpChannel *proxy,
{
if (error != NULL)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
const gchar *who = tp_channel_get_identifier(proxy);
@@ -471,7 +471,7 @@ chat_get_contacts_cb (TpConnection *conn
{
int i;
PurpleConversation *conv;
- telepathy_room_channel *tp_channel = user_data;
+ PrplTpRoomChannel *tp_channel = user_data;
if (error != NULL)
{
@@ -522,7 +522,7 @@ chat_get_all_members_cb (TpChannel *prox
gpointer user_data,
GObject *weak_object)
{
- telepathy_room_channel *data = user_data;
+ PrplTpRoomChannel *data = user_data;
int i;
const TpContactFeature features[] = {
@@ -583,8 +583,8 @@ room_channel_invalidated_cb (TpProxy *se
gchar *message,
gpointer user_data)
{
- telepathy_room_channel *data = user_data;
- telepathy_connection *connection_data = data->connection_data;
+ PrplTpRoomChannel *data = user_data;
+ PrplTpConnection *connection_data = data->connection_data;
GHashTableIter iter;
gpointer key, value;
@@ -622,8 +622,8 @@ chat_members_joined (TpConnection *conne
gpointer user_data,
GObject *weak_object)
{
- telepathy_room_channel *tp_channel = user_data;
- telepathy_connection *connection_data = tp_channel->connection_data;
+ PrplTpRoomChannel *tp_channel = user_data;
+ PrplTpConnection *connection_data = tp_channel->connection_data;
PurpleConversation *conv;
int i;
@@ -678,8 +678,8 @@ chat_members_changed_cb (TpChannel *prox
gpointer user_data,
GObject *weak_object)
{
- telepathy_room_channel *tp_channel = user_data;
- telepathy_connection *connection_data = tp_channel->connection_data;
+ PrplTpRoomChannel *tp_channel = user_data;
+ PrplTpConnection *connection_data = tp_channel->connection_data;
/* Members joined the charoom */
if (arg_Added->len > 0)
@@ -738,17 +738,17 @@ static void
}
static void
-room_property_updated (telepathy_room_channel *tp_channel,
- telepathy_property *tp_property)
+room_property_updated (PrplTpRoomChannel *tp_channel,
+ PrplTpProperty *tp_property)
{
- telepathy_connection *connection_data = tp_channel->connection_data;
+ PrplTpConnection *connection_data = tp_channel->connection_data;
/* The chat subject or topic has changed */
if (g_strcmp0(tp_property->name, "subject") == 0)
{
PurpleConnection *gc = connection_data->gc;
- telepathy_property *tp_property2;
+ PrplTpProperty *tp_property2;
guint timestamp = 0;
const gchar *contact_alias = NULL;
gchar *msg;
@@ -832,7 +832,7 @@ get_properties_cb (TpProxy *proxy,
gpointer user_data,
GObject *weak_object)
{
- telepathy_room_channel *tp_channel = user_data;
+ PrplTpRoomChannel *tp_channel = user_data;
int i;
@@ -852,7 +852,7 @@ get_properties_cb (TpProxy *proxy,
guint id = g_value_get_uint(g_value_array_get_nth(arr, 0));
GValue *val = g_value_dup_boxed(g_value_array_get_nth(arr, 1));
- telepathy_property *tp_property = g_hash_table_lookup(tp_channel->properties,
+ PrplTpProperty *tp_property = g_hash_table_lookup(tp_channel->properties,
(gpointer)id);
if (tp_property != NULL)
@@ -873,7 +873,7 @@ list_properties_cb (TpProxy *proxy,
gpointer user_data,
GObject *weak_object)
{
- telepathy_room_channel *tp_channel = user_data;
+ PrplTpRoomChannel *tp_channel = user_data;
int i;
GArray *properties;
@@ -901,7 +901,7 @@ list_properties_cb (TpProxy *proxy,
{
GValueArray *arr = g_ptr_array_index(out_Available_Properties, i);
- telepathy_property *tp_property = g_new0(telepathy_property, 1);
+ PrplTpProperty *tp_property = g_new0(PrplTpProperty, 1);
/* Each property is packed as a (ussu) */
tp_property->id = g_value_get_uint(g_value_array_get_nth(arr, 0));
@@ -938,7 +938,7 @@ property_flags_changed_cb (TpProxy *prox
gpointer user_data,
GObject *weak_object)
{
- telepathy_room_channel *tp_channel = user_data;
+ PrplTpRoomChannel *tp_channel = user_data;
int i;
@@ -949,7 +949,7 @@ property_flags_changed_cb (TpProxy *prox
guint id = g_value_get_uint(g_value_array_get_nth(arr, 0));
guint flags = g_value_get_uint(g_value_array_get_nth(arr, 1));
- telepathy_property *tp_property = g_hash_table_lookup(tp_channel->properties,
+ PrplTpProperty *tp_property = g_hash_table_lookup(tp_channel->properties,
(gpointer)id);
if (tp_property != NULL)
@@ -967,7 +967,7 @@ properties_changed_cb (TpProxy *proxy,
gpointer user_data,
GObject *weak_object)
{
- telepathy_room_channel *tp_channel = user_data;
+ PrplTpRoomChannel *tp_channel = user_data;
int i;
@@ -982,7 +982,7 @@ properties_changed_cb (TpProxy *proxy,
guint id = g_value_get_uint(g_value_array_get_nth(arr, 0));
GValue *val = g_value_get_boxed(g_value_array_get_nth(arr, 1));
- telepathy_property *tp_property = g_hash_table_lookup(tp_channel->properties,
+ PrplTpProperty *tp_property = g_hash_table_lookup(tp_channel->properties,
(gpointer)id);
if (tp_property != NULL)
@@ -1003,7 +1003,7 @@ properties_changed_cb (TpProxy *proxy,
guint id = g_value_get_uint(g_value_array_get_nth(arr, 0));
- telepathy_property *tp_property = g_hash_table_lookup(tp_channel->properties,
+ PrplTpProperty *tp_property = g_hash_table_lookup(tp_channel->properties,
(gpointer)id);
if (tp_property != NULL)
@@ -1015,7 +1015,7 @@ handle_room_text_channel (TpChannel *cha
void
handle_room_text_channel (TpChannel *channel,
- telepathy_connection *data,
+ PrplTpConnection *data,
gboolean invitation)
{
GError *error = NULL;
@@ -1029,7 +1029,7 @@ handle_room_text_channel (TpChannel *cha
TpHandle handle = tp_channel_get_handle(channel, NULL);
- telepathy_room_channel *tp_channel;
+ PrplTpRoomChannel *tp_channel;
tp_channel = g_hash_table_lookup(data->room_Channels, (gpointer)handle);
@@ -1051,7 +1051,7 @@ handle_room_text_channel (TpChannel *cha
initiator_id);
/* Include information about the channel */
- tp_channel = g_new0(telepathy_room_channel, 1);
+ tp_channel = g_new0(PrplTpRoomChannel, 1);
tp_channel->channel = channel;
tp_channel->connection_data = data;
@@ -1086,7 +1086,7 @@ handle_room_text_channel (TpChannel *cha
purple_debug_info("telepathy", "Saving TpChannel proxy for \"%s\" chatroom (%u)\n",
who, handle);
- tp_channel = g_new0(telepathy_room_channel, 1);
+ tp_channel = g_new0(PrplTpRoomChannel, 1);
tp_channel->channel = channel;
tp_channel->connection_data = data;
@@ -1172,7 +1172,7 @@ write_message_to_conversation (const gch
const gchar *msg,
gpointer user_data)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
/* escape HTML special characters */
gchar *escaped_message = g_markup_escape_text(msg, -1);
@@ -1214,7 +1214,7 @@ list_pending_messages_cb (TpChannel *pr
}
else
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
GArray *message_IDs;
int i;
@@ -1222,7 +1222,7 @@ list_pending_messages_cb (TpChannel *pr
GHashTable *properties = tp_channel_borrow_immutable_properties(proxy);
gchar *who = (gchar *)tp_asv_get_string(properties, TP_IFACE_CHANNEL ".TargetID");
- telepathy_text_channel *tp_channel = g_hash_table_lookup(data->text_Channels, who);
+ PrplTpTextChannel *tp_channel = g_hash_table_lookup(data->text_Channels, who);
if (tp_channel == NULL)
{
@@ -1277,12 +1277,12 @@ received_cb (TpChannel *proxy,
gpointer user_data,
GObject *weak_object)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
GHashTable *properties = tp_channel_borrow_immutable_properties(proxy);
gchar *who = (gchar *)tp_asv_get_string(properties, TP_IFACE_CHANNEL ".TargetID");
- telepathy_text_channel *tp_channel = g_hash_table_lookup(data->text_Channels, who);
+ PrplTpTextChannel *tp_channel = g_hash_table_lookup(data->text_Channels, who);
if (tp_channel == NULL)
{
@@ -1322,7 +1322,7 @@ send_error_cb (TpChannel *proxy,
gpointer user_data,
GObject *weak_object)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
const gchar *who = tp_channel_get_identifier(proxy);
@@ -1384,7 +1384,7 @@ send_cb (TpChannel *proxy,
{
if (error != NULL)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
const gchar *who = tp_channel_get_identifier(proxy);
@@ -1415,12 +1415,12 @@ text_channel_invalidated_cb (TpProxy *se
gchar *message,
gpointer user_data)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
/* remove the cached TpChannel proxy when the channel closes */
const gchar *who = tp_channel_get_identifier((TpChannel *)self);
- telepathy_text_channel *tp_channel = NULL;
+ PrplTpTextChannel *tp_channel = NULL;
if (data->text_Channels)
tp_channel = g_hash_table_lookup(data->text_Channels, who);
@@ -1440,9 +1440,9 @@ chat_state_changed_cb (TpChannel *proxy,
gpointer user_data,
GObject *weak_object)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
- telepathy_contact *contact_data = g_hash_table_lookup(data->contacts, (gpointer)arg_Contact);
+ PrplTpContact *contact_data = g_hash_table_lookup(data->contacts, (gpointer)arg_Contact);
PurpleTypingState state;
const gchar *name;
@@ -1484,14 +1484,14 @@ handle_im_text_channel (TpChannel *chann
static void
handle_im_text_channel (TpChannel *channel,
- telepathy_connection *data)
+ PrplTpConnection *data)
{
GError *error = NULL;
GHashTable *properties = tp_channel_borrow_immutable_properties(channel);
gchar *who = (gchar *)tp_asv_get_string(properties, TP_IFACE_CHANNEL ".TargetID");
- telepathy_text_channel *tp_channel;
+ PrplTpTextChannel *tp_channel;
purple_debug_info("telepathy", "Saving TpChannel proxy for %s\n", who);
@@ -1500,7 +1500,7 @@ handle_im_text_channel (TpChannel *chann
/* if tp_channel exists, then we requested this channel, else it's an incoming request so we must cache it */
if (tp_channel == NULL)
{
- tp_channel = g_new0(telepathy_text_channel, 1);
+ tp_channel = g_new0(PrplTpTextChannel, 1);
g_hash_table_insert(data->text_Channels, who, tp_channel);
}
@@ -1551,7 +1551,7 @@ handle_text_channel (TpChannel *channel,
void
handle_text_channel (TpChannel *channel,
- telepathy_connection *data)
+ PrplTpConnection *data)
{
TpHandle handle;
TpHandleType handleType;
============================================================
--- libpurple/protocols/telepathy/telepathy_channel_text.h f62c1b48f17c87bc08a552692072a7a226e99950
+++ libpurple/protocols/telepathy/telepathy_channel_text.h d3baeb47caff0931e828cce74e0769b0f7a3de13
@@ -36,32 +36,32 @@ typedef struct
GValue *value;
-} telepathy_property;
+} PrplTpProperty;
void
-destroy_property(telepathy_property *tp_property);
+destroy_property(PrplTpProperty *tp_property);
typedef struct
{
TpChannel *channel;
- telepathy_connection *connection_data;
+ PrplTpConnection *connection_data;
GHashTable *contacts;
TpHandle self_handle;
- /* This will map property IDs to telepathy_property structs */
+ /* This will map property IDs to PrplTpProperty structs */
GHashTable *properties;
- /* This will map property names to telepathy_property structs */
+ /* This will map property names to PrplTpProperty structs */
GHashTable *properties_by_name;
-} telepathy_room_channel;
+} PrplTpRoomChannel;
void
-destroy_room_channel(telepathy_room_channel *tp_channel);
+destroy_room_channel(PrplTpRoomChannel *tp_channel);
typedef struct
{
@@ -72,23 +72,23 @@ typedef struct
guint flags;
gchar *msg;
-} telepathy_message;
+} PrplTpMessage;
typedef struct
{
GArray *messages;
GArray *handles;
- telepathy_room_channel *channel_data;
+ PrplTpRoomChannel *channel_data;
-} telepathy_scrollback_messages;
+} PrplTpScrollbackMessages;
typedef struct
{
- telepathy_room_channel *tp_channel;
+ PrplTpRoomChannel *tp_channel;
gchar *msg;
-} telepathy_chat_invitation;
+} PrplTpChatInvitation;
typedef struct
{
@@ -97,14 +97,14 @@ typedef struct
/* This flag avoids having a message processed twice via both Received signal and ListPendingMessages */
gboolean received_Pending_Messages;
-} telepathy_text_channel;
+} PrplTpTextChannel;
void
-destroy_text_channel(telepathy_text_channel *tp_channel);
+destroy_text_channel(PrplTpTextChannel *tp_channel);
void
handle_room_text_channel (TpChannel *channel,
- telepathy_connection *data,
+ PrplTpConnection *data,
gboolean invitation);
void
@@ -174,7 +174,7 @@ handle_text_channel (TpChannel *channel,
void
handle_text_channel (TpChannel *channel,
- telepathy_connection *data);
+ PrplTpConnection *data);
void
set_chat_state_cb (TpChannel *proxy,
============================================================
--- libpurple/protocols/telepathy/telepathy_client.c 2e45aa2414cdd7a8b891122ecbb7077838623dfb
+++ libpurple/protocols/telepathy/telepathy_client.c 9a3f55bded26b374892c8caba1e097630df14080
@@ -334,8 +334,8 @@ telepathy_client_handle_channels (TpSvcC
GValueArray *arr = g_ptr_array_index (channels, i);
const gchar *object_path;
GHashTable *properties;
- telepathy_account *account_data;
- telepathy_connection *connection_data;
+ PrplTpAccount *account_data;
+ PrplTpConnection *connection_data;
TpChannel *channel;
GError *error = NULL;
============================================================
--- libpurple/protocols/telepathy/telepathy_connection.c aea5434b16d85033eac5d82f0c99cd91e3b64e8a
+++ libpurple/protocols/telepathy/telepathy_connection.c 69e3991c310c08d210181c50cb76cc41880f99e7
@@ -39,8 +39,8 @@ connection_status_changed (gpointer data
guint arg_Status,
guint arg_Reason)
{
- telepathy_account *account_data = data;
- telepathy_connection *connection_data = account_data->connection_data;
+ PrplTpAccount *account_data = data;
+ PrplTpConnection *connection_data = account_data->connection_data;
PurpleConnection *gc = purple_account_get_connection(account_data->account);
if (arg_Status == TP_CONNECTION_STATUS_CONNECTED)
@@ -193,8 +193,8 @@ got_connection_object (gchar *connection
{
GError *error = NULL;
- telepathy_connection *connection_data;
- telepathy_account *account_data = data;
+ PrplTpConnection *connection_data;
+ PrplTpAccount *account_data = data;
PurpleAccount *acct = account_data->account;
PurpleConnection *gc = purple_account_get_connection(acct);
@@ -210,7 +210,7 @@ got_connection_object (gchar *connection
purple_debug_info("telepathy", "Got connection object!\n");
- connection_data = g_new0(telepathy_connection, 1);
+ connection_data = g_new0(PrplTpConnection, 1);
/* get the connection proxy straight out of the dbus interface */
connection_data->connection = tp_connection_new(daemon, NULL, connection_object, &error);
@@ -246,7 +246,7 @@ status_changed_cb (TpConnection *proxy,
gpointer user_data,
GObject *weak_object)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
if (arg_Status == TP_CONNECTION_STATUS_CONNECTED)
{
@@ -417,7 +417,7 @@ connection_ready_cb (TpConnection *conne
{
char **interfaces, **ptr;
GError *error = NULL;
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
purple_debug_info("telepathy", "Connection is ready. Interfaces implemented:\n");
============================================================
--- libpurple/protocols/telepathy/telepathy_connection.h a28ef59e3f6a0e6f6e723da33dbf0113f1dc05c8
+++ libpurple/protocols/telepathy/telepathy_connection.h ddfede10f813f9f86150b7950bfb0c41d2650d68
@@ -43,19 +43,19 @@ typedef struct
/* This flag avoids having a channel processed twice via both NewChannels and quering the Channels property */
gboolean listing_channels;
- /* This will hold pointers to telepathy_text_channel for buddies that have an active conversation */
+ /* This will hold pointers to PrplTpTextChannel for buddies that have an active conversation */
GHashTable *text_Channels;
- /* This will map room handles to telepathy_room_channel for active chat rooms */
+ /* This will map room handles to PrplTpRoomChannel for active chat rooms */
GHashTable *room_Channels;
- /* This will map contact handles to telepathy_contact */
+ /* This will map contact handles to PrplTpContact */
GHashTable *contacts;
- /* This will map group name to telepathy_group structs */
+ /* This will map group name to PrplTpGroup structs */
GHashTable *groups;
- /* This will map list name to telepathy_group structs */
+ /* This will map list name to PrplTpGroup structs */
GHashTable *lists;
/* This will map a group name to a buddy to be added to that group.
@@ -63,7 +63,7 @@ typedef struct
*/
GHashTable *buddy_to_be_added;
-} telepathy_connection;
+} PrplTpConnection;
void
connection_status_changed (gpointer account_data,
============================================================
--- libpurple/protocols/telepathy/telepathy_contact.c 9aaed1f2ca335b02616c9b149768726d62703ce8
+++ libpurple/protocols/telepathy/telepathy_contact.c c8190c945e7d9042f33f7d6636e5a120714e8b2f
@@ -26,7 +26,7 @@ void
#include "telepathy_channel_list.h"
void
-destroy_contact(telepathy_contact *contact_data)
+destroy_contact(PrplTpContact *contact_data)
{
g_object_unref(contact_data->contact);
g_free(contact_data);
@@ -58,8 +58,8 @@ remove_contact_cb (TpConnection *connect
gpointer user_data,
GObject *weak_object)
{
- telepathy_connection *data = user_data;
- telepathy_group *stored_list;
+ PrplTpConnection *data = user_data;
+ PrplTpGroup *stored_list;
GArray *arr;
int i;
@@ -133,8 +133,8 @@ add_contact_to_group_cb (TpConnection *c
}
else
{
- telepathy_group *group = user_data;
- telepathy_group *subscribe_list;
+ PrplTpGroup *group = user_data;
+ PrplTpGroup *subscribe_list;
const TpContactFeature features[] = {
TP_CONTACT_FEATURE_ALIAS,
@@ -195,7 +195,7 @@ contact_notify_alias_cb (TpContact *cont
GParamSpec *pspec,
gpointer user_data)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
const gchar *name = tp_contact_get_identifier(contact);
const gchar *alias = tp_contact_get_alias(contact);
@@ -219,7 +219,7 @@ contact_notify_presence_cb (TpContact *c
GParamSpec *pspec,
gpointer user_data)
{
- telepathy_connection *data = user_data;
+ PrplTpConnection *data = user_data;
const gchar *name = tp_contact_get_identifier(contact);
const gchar *presence_status = tp_contact_get_presence_status(contact);
@@ -241,7 +241,7 @@ void
}
void
-handle_contacts (telepathy_connection *connection_data,
+handle_contacts (PrplTpConnection *connection_data,
guint n_contacts,
TpContact * const *contacts,
guint n_failed,
@@ -256,7 +256,7 @@ handle_contacts (telepathy_connection *c
TpContact *contact = contacts[i];
PurpleBuddy *buddy;
guint handle;
- telepathy_contact *contact_data;
+ PrplTpContact *contact_data;
/* the buddy might already be stored locally */
buddy = purple_find_buddy(connection_data->acct, tp_contact_get_identifier(contact));
@@ -305,7 +305,7 @@ handle_contacts (telepathy_connection *c
if (contact_data == NULL)
{
- contact_data = g_new0(telepathy_contact, 1);
+ contact_data = g_new0(PrplTpContact, 1);
contact_data-> contact = contact;
g_hash_table_insert(connection_data->contacts, (gpointer)handle, contact_data);
@@ -344,7 +344,7 @@ group_contacts_ready_cb (TpConnection *c
gpointer user_data,
GObject *weak_object)
{
- telepathy_group *data = user_data;
+ PrplTpGroup *data = user_data;
if (error != NULL)
{
@@ -379,7 +379,7 @@ contacts_ready_cb (TpConnection *connect
gpointer user_data,
GObject *weak_object)
{
- telepathy_group *data = user_data;
+ PrplTpGroup *data = user_data;
if (error != NULL)
{
============================================================
--- libpurple/protocols/telepathy/telepathy_contact.h 7da7a66101912e8d7d046760a9732966ef385c92
+++ libpurple/protocols/telepathy/telepathy_contact.h 876bb8db6bd4b7dae7418fe1b780bee4db7c18d8
@@ -30,10 +30,10 @@ typedef struct
TpContact *contact;
gboolean requested_avatar;
-} telepathy_contact;
+} PrplTpContact;
void
-destroy_contact(telepathy_contact *contact_data);
+destroy_contact(PrplTpContact *contact_data);
void
remove_contact_cb (TpConnection *connection,
@@ -61,7 +61,7 @@ void
gpointer user_data);
void
-handle_contacts (telepathy_connection *connection_data,
+handle_contacts (PrplTpConnection *connection_data,
guint n_contacts,
TpContact * const *contacts,
guint n_failed,
More information about the Commits
mailing list