soc.2009.privacy_rewrite: cad34ab4: changes to aim, icq

sulabh at soc.pidgin.im sulabh at soc.pidgin.im
Sat Aug 1 03:50:45 EDT 2009


-----------------------------------------------------------------
Revision: cad34ab464d5914f58e6813f015bf89b0d4bed73
Ancestor: a01627c9769e13e9d25d0d2690efd47c13604b64
Author: sulabh at soc.pidgin.im
Date: 2009-07-28T08:53:20
Branch: im.pidgin.soc.2009.privacy_rewrite
URL: http://d.pidgin.im/viewmtn/revision/info/cad34ab464d5914f58e6813f015bf89b0d4bed73

Modified files:
        libpurple/protocols/oscar/libaim.c
        libpurple/protocols/oscar/libicq.c
        libpurple/protocols/oscar/oscar.c
        libpurple/protocols/oscar/oscarcommon.h

ChangeLog: 

changes to aim, icq

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/libaim.c	0b2fdf644a5cdacfd8eb654a22e2c0306a9dcd78
+++ libpurple/protocols/oscar/libaim.c	139d2b3170081b94cb7ced171e9c3183506b6f40
@@ -55,10 +55,8 @@ static PurplePluginProtocolInfo prpl_inf
 	NULL,					/* add_buddies */
 	oscar_remove_buddy,		/* remove_buddy */
 	NULL,					/* remove_buddies */
-	oscar_add_permit,		/* add_permit */
-	oscar_add_deny,			/* add_deny */
-	oscar_rem_permit,		/* rem_permit */
-	oscar_rem_deny,			/* rem_deny */
+	oscar_privacy_list_add,		/* privacy_list_add */
+	oscar_privacy_list_remove,	/* privcay_list_remove */
 	oscar_set_permit_deny,	/* set_permit_deny */
 	oscar_join_chat,		/* join_chat */
 	NULL,					/* reject_chat */
============================================================
--- libpurple/protocols/oscar/libicq.c	e85c0d573140cb77cd6e94c9c497f10d406ce5b4
+++ libpurple/protocols/oscar/libicq.c	45d608a39cb7bbee6f17d90caf9fa350c1a8a9dc
@@ -64,10 +64,8 @@ static PurplePluginProtocolInfo prpl_inf
 	NULL,					/* add_buddies */
 	oscar_remove_buddy,		/* remove_buddy */
 	NULL,					/* remove_buddies */
-	oscar_add_permit,		/* add_permit */
-	oscar_add_deny,			/* add_deny */
-	oscar_rem_permit,		/* rem_permit */
-	oscar_rem_deny,			/* rem_deny */
+	oscar_privacy_list_add,		/* privacy_list_add */
+	oscar_privacy_list_remove,	/* privacy_list_remove */
 	oscar_set_permit_deny,	/* set_permit_deny */
 	oscar_join_chat,		/* join_chat */
 	NULL,					/* reject_chat */
============================================================
--- libpurple/protocols/oscar/oscar.c	be334390d7eedea3be392bf6bde61b702c6c95bc
+++ libpurple/protocols/oscar/oscar.c	2fdd2801dd838e273e8ddca613e50f450d6935df
@@ -6112,34 +6112,80 @@ void oscar_set_permit_deny(PurpleConnect
 		aim_ssi_setpermdeny(od, perm_deny, 0xffffffff);
 }
 
-void oscar_add_permit(PurpleConnection *gc, const char *who) {
+static void oscar_add_permit(PurpleConnection *gc, const char *who) {
 	OscarData *od = purple_connection_get_protocol_data(gc);
 	purple_debug_info("oscar", "ssi: About to add a permit\n");
 	if (od->ssi.received_data)
 		aim_ssi_addpermit(od, who);
 }
 
-void oscar_add_deny(PurpleConnection *gc, const char *who) {
+static void oscar_add_deny(PurpleConnection *gc, const char *who) {
 	OscarData *od = purple_connection_get_protocol_data(gc);
 	purple_debug_info("oscar", "ssi: About to add a deny\n");
 	if (od->ssi.received_data)
 		aim_ssi_adddeny(od, who);
 }
 
-void oscar_rem_permit(PurpleConnection *gc, const char *who) {
+static void oscar_rem_permit(PurpleConnection *gc, const char *who) {
 	OscarData *od = purple_connection_get_protocol_data(gc);
 	purple_debug_info("oscar", "ssi: About to delete a permit\n");
 	if (od->ssi.received_data)
 		aim_ssi_delpermit(od, who);
 }
 
-void oscar_rem_deny(PurpleConnection *gc, const char *who) {
+static void oscar_rem_deny(PurpleConnection *gc, const char *who) {
 	OscarData *od = purple_connection_get_protocol_data(gc);
 	purple_debug_info("oscar", "ssi: About to delete a deny\n");
 	if (od->ssi.received_data)
 		aim_ssi_deldeny(od, who);
 }
 
+void oscar_privacy_list_add(PurpleConnection *gc, PurplePrivacyListType list_type, const char *who)
+{
+	if (!who || who[0] == '\0')
+		return;
+
+	switch(list_type)
+	{
+		case PURPLE_PRIVACY_BLOCK_MESSAGE_LIST:
+		case PURPLE_PRIVACY_BUDDY_LIST:
+		case PURPLE_PRIVACY_VISIBLE_LIST:
+		case PURPLE_PRIVACY_INVISIBLE_LIST:
+			/* either not supported or not the right place to edit the list */
+			break;
+		case PURPLE_PRIVACY_ALLOW_LIST:
+			oscar_add_permit(gc, who);
+			break;
+		case PURPLE_PRIVACY_BLOCK_BOTH_LIST:
+			oscar_add_deny(gc, who);
+			break;
+	}
+	return;
+}
+
+void oscar_privacy_list_remove(PurpleConnection *gc, PurplePrivacyListType list_type, const char *who)
+{
+	if (!who || who[0] == '\0')
+		return;
+
+	switch(list_type)
+	{
+		case PURPLE_PRIVACY_BLOCK_MESSAGE_LIST:
+		case PURPLE_PRIVACY_BUDDY_LIST:
+		case PURPLE_PRIVACY_VISIBLE_LIST:
+		case PURPLE_PRIVACY_INVISIBLE_LIST:
+			/* either not supported or not the right place to edit the list */
+			break;
+		case PURPLE_PRIVACY_ALLOW_LIST:
+			oscar_rem_permit(gc, who);
+			break;
+		case PURPLE_PRIVACY_BLOCK_BOTH_LIST:
+			oscar_rem_deny(gc, who);
+			break;
+	}
+	return;
+}
+
 GList *
 oscar_status_types(PurpleAccount *account)
 {
============================================================
--- libpurple/protocols/oscar/oscarcommon.h	da93543ff4c988806b672a7a5ab103d6ecb22afa
+++ libpurple/protocols/oscar/oscarcommon.h	8071d72702a52041932473b241c6c88626bdf587
@@ -70,10 +70,8 @@ void oscar_remove_buddy(PurpleConnection
 void oscar_change_passwd(PurpleConnection *gc, const char *old, const char *new);
 void oscar_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group);
 void oscar_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group);
-void oscar_add_permit(PurpleConnection *gc, const char *who);
-void oscar_add_deny(PurpleConnection *gc, const char *who);
-void oscar_rem_permit(PurpleConnection *gc, const char *who);
-void oscar_rem_deny(PurpleConnection *gc, const char *who);
+void oscar_privacy_list_add(PurpleConnection *gc, PurplePrivacyListType list_type, const char *who);
+void oscar_privacy_list_remove(PurpleConnection *gc, PurplePrivacyListType list_type, const char *who);
 void oscar_set_permit_deny(PurpleConnection *gc);
 void oscar_join_chat(PurpleConnection *gc, GHashTable *data);
 char *oscar_get_chat_name(GHashTable *data);


More information about the Commits mailing list