gobjectification: bf37bbdc: compile novell

sadrul at pidgin.im sadrul at pidgin.im
Thu Mar 13 04:39:49 EDT 2008


-----------------------------------------------------------------
Revision: bf37bbdc71eac09f6d70c71e64c20eae697994c6
Ancestor: 1124e4519468c2955f33b5df2a74cbc11975b117
Author: sadrul at pidgin.im
Date: 2008-03-13T07:17:03
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/bf37bbdc71eac09f6d70c71e64c20eae697994c6

Modified files:
        libpurple/protocols/novell/novell.c

ChangeLog: 

compile novell

-------------- next part --------------
============================================================
--- libpurple/protocols/novell/novell.c	034fe2d8dabae8e6a46a0714de1317e353e3b760
+++ libpurple/protocols/novell/novell.c	89e32a7141656dee8a78e09f7f8404e5f3051677
@@ -1615,7 +1615,7 @@ _initiate_conference_cb(PurpleBlistNode 
 	buddy = (PurpleBuddy *) node;
 	gc = purple_account_get_connection(buddy->account);
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return;
 
@@ -1671,7 +1671,7 @@ novell_ssl_connect_error(PurpleSslConnec
 	NMUser *user;
 
 	gc = data;
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	user->conn->ssl_conn->data = NULL;
 
 	purple_connection_ssl_error (gc, error);
@@ -1688,7 +1688,7 @@ novell_ssl_recv_cb(gpointer data, Purple
 	if (gc == NULL)
 		return;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return;
 
@@ -1722,7 +1722,7 @@ novell_ssl_connected_cb(gpointer data, P
 	if (gc == NULL || gsc == NULL)
 		return;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if ((user == NULL) || (conn = user->conn) == NULL)
 		return;
 
@@ -2193,7 +2193,7 @@ novell_login(PurpleAccount * account)
 	user = nm_initialize_user(name, server, port, account, _event_callback);
 	if (user && user->conn) {
 		/* save user */
-		gc->proto_data = user;
+		purple_object_set_protocol_data(PURPLE_OBJECT(gc),user);
 
 		/* connect to the server */
 		purple_connection_update_progress(gc, _("Connecting"),
@@ -2225,7 +2225,7 @@ novell_close(PurpleConnection * gc)
 	if (gc == NULL)
 		return;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user) {
 		conn = user->conn;
 		if (conn && conn->ssl_conn) {
@@ -2233,7 +2233,7 @@ novell_close(PurpleConnection * gc)
 		}
 		nm_deinitialize_user(user);
 	}
-	gc->proto_data = NULL;
+	purple_object_set_protocol_data(PURPLE_OBJECT(gc),NULL);
 }
 
 static int
@@ -2253,7 +2253,7 @@ novell_send_im(PurpleConnection * gc, co
 		message_body == NULL || *message_body == '\0')
 		return 0;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return 0;
 
@@ -2339,7 +2339,7 @@ novell_send_typing(PurpleConnection * gc
 	if (gc == NULL || name == NULL)
 		return 0;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return 0;
 
@@ -2373,7 +2373,7 @@ novell_convo_closed(PurpleConnection * g
 	if (gc == NULL || who == NULL)
 		return;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user && (dn = nm_lookup_dn(user, who))) {
 		conf = nm_find_conversation(user, dn);
 		if (conf) {
@@ -2395,7 +2395,7 @@ novell_chat_leave(PurpleConnection * gc,
 	if (gc == NULL)
 		return;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return;
 
@@ -2427,7 +2427,7 @@ novell_chat_invite(PurpleConnection *gc,
 	if (gc == NULL)
 		return;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return;
 
@@ -2466,7 +2466,7 @@ novell_chat_send(PurpleConnection * gc, 
 	if (gc == NULL || text == NULL)
 		return -1;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return -1;
 
@@ -2543,7 +2543,7 @@ novell_add_buddy(PurpleConnection * gc, 
 	if (gc == NULL || buddy == NULL || group == NULL)
 		return;
 
-	user = (NMUser *) gc->proto_data;
+	user = (NMUser *) purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return;
 
@@ -2602,7 +2602,7 @@ novell_remove_buddy(PurpleConnection *gc
 	if (gc == NULL || buddy == NULL || group == NULL)
 		return;
 
-	user = (NMUser *) gc->proto_data;
+	user = (NMUser *) purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user && (dn = nm_lookup_dn(user, buddy->name))) {
 		if (strcmp(group->name, NM_ROOT_FOLDER_NAME) == 0) {
 			gname = "";
@@ -2635,7 +2635,7 @@ novell_remove_group(PurpleConnection * g
 	if (gc == NULL || group == NULL)
 		return;
 
-	user = (NMUser *) gc->proto_data;
+	user = (NMUser *) purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user) {
 		NMFolder *folder = nm_find_folder(user, group->name);
 
@@ -2660,7 +2660,7 @@ novell_alias_buddy(PurpleConnection * gc
 	if (gc == NULL || name == NULL || alias == NULL)
 		return;
 
-	user = (NMUser *) gc->proto_data;
+	user = (NMUser *) purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user && (dn = nm_lookup_dn(user, name))) {
 
 		/* Alias all of instances of the contact */
@@ -2717,7 +2717,7 @@ novell_group_buddy(PurpleConnection * gc
 		old_group_name == NULL || new_group_name == NULL)
 		return;
 
-	user = (NMUser *) gc->proto_data;
+	user = (NMUser *) purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user && (dn = nm_lookup_dn(user, name))) {
 
 		/* Find the old folder */
@@ -2775,7 +2775,7 @@ novell_rename_group(PurpleConnection * g
 		return;
 	}
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user) {
 		/* Does new folder exist already? */
 		if (nm_find_folder(user, group->name)) {
@@ -2820,7 +2820,7 @@ novell_tooltip_text(PurpleBuddy * buddy,
 		return;
 
 	gc = purple_account_get_connection(buddy->account);
-	if (gc == NULL || (user = gc->proto_data) == NULL)
+	if (gc == NULL || (user = purple_object_get_protocol_data(PURPLE_OBJECT(gc))) == NULL)
 		return;
 
 	if (PURPLE_BUDDY_IS_ONLINE(buddy)) {
@@ -2869,7 +2869,7 @@ novell_set_idle(PurpleConnection * gc, i
 	if (gc == NULL)
 		return;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return;
 
@@ -2898,7 +2898,7 @@ novell_get_info(PurpleConnection * gc, c
 	if (gc == NULL || name == NULL)
 		return;
 
-	user = (NMUser *) gc->proto_data;
+	user = (NMUser *) purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user) {
 
 		user_record = nm_find_user_record(user, name);
@@ -2927,8 +2927,8 @@ novell_status_text(PurpleBuddy * buddy)
 	if (buddy && buddy->account) {
 		PurpleConnection *gc = purple_account_get_connection(buddy->account);
 
-		if (gc && gc->proto_data) {
-			NMUser *user = gc->proto_data;
+		if (gc && purple_object_get_protocol_data(PURPLE_OBJECT(gc))) {
+			NMUser *user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 
 			dn = nm_lookup_dn(user, buddy->name);
 			if (dn) {
@@ -3013,7 +3013,7 @@ novell_set_status(PurpleAccount *account
 		return;
 
 	gc = purple_account_get_connection(account);
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return;
 
@@ -3060,7 +3060,7 @@ novell_add_permit(PurpleConnection *gc, 
 	if (gc == NULL || who == NULL)
 		return;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return;
 
@@ -3104,7 +3104,7 @@ novell_add_deny(PurpleConnection *gc, co
 	if (gc == NULL || who == NULL)
 		return;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return;
 
@@ -3148,7 +3148,7 @@ novell_rem_permit(PurpleConnection *gc, 
 	if (gc == NULL || who == NULL)
 		return;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return;
 
@@ -3178,7 +3178,7 @@ novell_rem_deny(PurpleConnection *gc, co
 	if (gc == NULL || who == NULL)
 		return;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return;
 
@@ -3213,7 +3213,7 @@ novell_set_permit_deny(PurpleConnection 
 	if (gc == NULL)
 		return;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return;
 
@@ -3441,7 +3441,7 @@ novell_keepalive(PurpleConnection *gc)
 	if (gc == NULL)
 		return;
 
-	user = gc->proto_data;
+	user = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	if (user == NULL)
 		return;
 


More information about the Commits mailing list