gobjectification: 403b1543: Fix libpurple core compile.
qulogic at pidgin.im
qulogic at pidgin.im
Tue Jun 9 01:01:05 EDT 2009
-----------------------------------------------------------------
Revision: 403b15430706e2ebfbc9bb83b7b1294ff7bce67e
Ancestor: 1b99af2fcfc54c034749c7a737530dd390101de5
Author: qulogic at pidgin.im
Date: 2009-06-09T04:20:41
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/403b15430706e2ebfbc9bb83b7b1294ff7bce67e
Modified files:
libpurple/account.c libpurple/blist.c libpurple/connection.c
libpurple/connection.h libpurple/server.c
ChangeLog:
Fix libpurple core compile.
-------------- next part --------------
============================================================
--- libpurple/account.c d5042839dfc06ded88a52c183de00ba09403c9a8
+++ libpurple/account.c f7dbc8f3e8becd072b218a156b5540cd06f16a05
@@ -118,7 +118,7 @@ schedule_accounts_save(void)
static void
schedule_accounts_save(void)
{
-#warning Remove this when it's no longer needed
+#warning Remove this when it is no longer needed
}
static void
@@ -2765,7 +2765,5 @@ purple_accounts_uninit(void)
purple_signals_disconnect_by_handle(handle);
purple_signals_unregister_by_instance(handle);
-
- for (; accounts; accounts = g_list_delete_link(accounts, accounts))
- purple_account_destroy(accounts->data);
}
+
============================================================
--- libpurple/blist.c f3daff2827d2931c0b992af12d79d6976ca56c2c
+++ libpurple/blist.c e38e665fd6379dc890709cd58b31f4741cc51855
@@ -136,20 +136,30 @@ value_to_xmlnode(gpointer key, gpointer
child = xmlnode_new_child(node, "setting");
xmlnode_set_attrib(child, "name", name);
- if (purple_value_get_type(value) == PURPLE_TYPE_INT) {
- xmlnode_set_attrib(child, "type", "int");
- g_snprintf(buf, sizeof(buf), "%d", purple_value_get_int(value));
- xmlnode_insert_data(child, buf, -1);
+ switch (G_VALUE_TYPE(value)) {
+ case G_TYPE_INT: {
+ gint i = g_value_get_int(value);
+ xmlnode_set_attrib(child, "type", "int");
+ g_snprintf(buf, sizeof(buf), "%d", i);
+ xmlnode_insert_data(child, buf, -1);
+ break;
+ }
+ case G_TYPE_STRING: {
+ const gchar *s = g_value_get_string(value);
+ xmlnode_set_attrib(child, "type", "string");
+ xmlnode_insert_data(child, s, -1);
+ break;
+ }
+ case G_TYPE_BOOLEAN: {
+ gboolean b = g_value_get_boolean(value);
+ xmlnode_set_attrib(child, "type", "bool");
+ g_snprintf(buf, sizeof(buf), "%d", b);
+ xmlnode_insert_data(child, buf, -1);
+ break;
+ }
+ default:
+ g_assert_not_reached();
}
- else if (purple_value_get_type(value) == PURPLE_TYPE_STRING) {
- xmlnode_set_attrib(child, "type", "string");
- xmlnode_insert_data(child, purple_value_get_string(value), -1);
- }
- else if (purple_value_get_type(value) == PURPLE_TYPE_BOOLEAN) {
- xmlnode_set_attrib(child, "type", "bool");
- g_snprintf(buf, sizeof(buf), "%d", purple_value_get_boolean(value));
- xmlnode_insert_data(child, buf, -1);
- }
}
static void
============================================================
--- libpurple/connection.c fd7c7da2fe53d62205f542feff5433e9b84715b4
+++ libpurple/connection.c f91eb0bf62c3e09d8fbc1be7114947028a3aabfe
@@ -99,7 +99,9 @@ static GList *connections = NULL;
#warning Do we want to use a ConnectionManager for these?
static GList *connections = NULL;
+#if 0
static GList *connections_connecting = NULL;
+#endif
/******************************************************************************
* Globals
@@ -322,7 +324,9 @@ purple_connection_set_state(PurpleConnec
void
purple_connection_set_state(PurpleConnection *gc, PurpleConnectionState state)
{
+#if 0
PurpleConnectionUiOps *ops;
+#endif
g_return_if_fail(PURPLE_IS_CONNECTION(gc));
@@ -439,13 +443,6 @@ purple_connection_set_display_name(Purpl
gc->priv->display_name = g_strdup(name);
}
-void
-purple_connection_set_protocol_data(PurpleConnection *connection, void *proto_data) {
- g_return_if_fail(connection != NULL);
-
- connection->proto_data = proto_data;
-}
-
PurpleConnectionState
purple_connection_get_state(const PurpleConnection *gc)
{
@@ -498,7 +495,9 @@ purple_connection_update_progress(Purple
purple_connection_update_progress(PurpleConnection *gc, const char *text,
size_t step, size_t count)
{
+#if 0
PurpleConnectionUiOps *ops;
+#endif
g_return_if_fail(PURPLE_IS_CONNECTION(gc));
g_return_if_fail(text != NULL);
@@ -522,7 +521,9 @@ purple_connection_notice(PurpleConnectio
void
purple_connection_notice(PurpleConnection *gc, const char *text)
{
+#if 0
PurpleConnectionUiOps *ops;
+#endif
g_return_if_fail(PURPLE_IS_CONNECTION(gc));
g_return_if_fail(text != NULL);
@@ -566,7 +567,9 @@ purple_connection_error_reason (PurpleCo
PurpleConnectionError reason,
const char *description)
{
+#if 0
PurpleConnectionUiOps *ops;
+#endif
g_return_if_fail(PURPLE_IS_CONNECTION(gc));
/* This sanity check relies on PURPLE_CONNECTION_ERROR_OTHER_ERROR
@@ -783,9 +786,9 @@ purple_connection_dispose(GObject *obj)
/* Clear out the proto data that was freed in the prpl close method*/
buddies = purple_find_buddies(account, NULL);
while (buddies != NULL) {
- PurpleBuddy *buddy = buddies->data;
#warning Uncomment when PurpleBuddy is a GObject
#if 0
+ PurpleBuddy *buddy = buddies->data;
purple_object_set_protocol_data(PURPLE_OBJECT(buddy),NULL);
#endif
buddies = g_slist_delete_link(buddies, buddies);
@@ -880,7 +883,7 @@ purple_connection_class_init(PurpleConne
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(obj_class, PROP_ACCOUNT, pspec);
-#warning These probably doesn't need any exposing
+#warning These probably do not need any exposing
pspec = g_param_spec_int("inpa", "inpa",
"The input watcher's fd for this connection.",
G_MININT, G_MAXINT, -1,
============================================================
--- libpurple/connection.h b093726989a237e1c173faf80591276c52705fb8
+++ libpurple/connection.h 1d653e0e52422206c589505d2f9d51837149d589
@@ -384,16 +384,6 @@ void purple_connection_set_display_name(
void purple_connection_set_display_name(PurpleConnection *gc, const char *name);
/**
- * Sets the protocol data for a connection.
- *
- * @param connection The PurpleConnection.
- * @param proto_data The protocol data to set for the connection.
- *
- * @since 2.6.0
- */
-void purple_connection_set_protocol_data(PurpleConnection *connection, void *proto_data);
-
-/**
* Returns the connection state.
*
* @param gc The connection.
@@ -451,17 +441,6 @@ const char *purple_connection_get_displa
const char *purple_connection_get_display_name(const PurpleConnection *gc);
/**
- * Gets the protocol data from a connection.
- *
- * @param connection The PurpleConnection.
- *
- * @return The protocol data for the connection.
- *
- * @since 2.6.0
- */
-void *purple_connection_get_protocol_data(const PurpleConnection *connection);
-
-/**
* Updates the connection progress.
*
* @param gc The connection.
============================================================
--- libpurple/server.c 5c5da5028b55c9c18e17da780cacaf0cbd0c347b
+++ libpurple/server.c c0befb04dfd7e25dca3c48672712945623d99d14
@@ -880,11 +880,11 @@ void serv_got_chat_left(PurpleConnection
void serv_got_chat_left(PurpleConnection *g, int id)
{
- GSList *bcs;
PurpleConversation *conv = NULL;
+#if 0
+ GSList *bcs;
PurpleConvChat *chat = NULL;
-#if 0
for (bcs = g->buddy_chats; bcs != NULL; bcs = bcs->next) {
conv = (PurpleConversation *)bcs->data;
@@ -919,7 +919,9 @@ void serv_got_chat_in(PurpleConnection *
void serv_got_chat_in(PurpleConnection *g, int id, const char *who,
PurpleMessageFlags flags, const char *message, time_t mtime)
{
+#if 0
GSList *bcs;
+#endif
PurpleConversation *conv = NULL;
PurpleConvChat *chat = NULL;
char *buffy, *angel;
More information about the Commits
mailing list