/pidgin/main: f698fa20ea34: The MXit contact-flag indicating "hi...
Andrew Victor
andrew.victor at mxit.com
Sat Jul 28 18:48:58 EDT 2012
Changeset: f698fa20ea344de96e41d48ea8927b3767650038
Author: Andrew Victor <andrew.victor at mxit.com>
Date: 2012-07-28 18:22 +0200
Branch: mxit-2.x.y
URL: http://hg.pidgin.im/pidgin/main/rev/f698fa20ea34
Description:
The MXit contact-flag indicating "hidden" is now deprecated.,
Backported from 3.0.0-devel:
http://pidgin.im/pipermail/commits/2011-August/019650.html
http://pidgin.im/pipermail/commits/2011-August/019652.html
diffstat:
libpurple/protocols/mxit/actions.c | 7 -------
libpurple/protocols/mxit/mxit.c | 4 ----
libpurple/protocols/mxit/profile.c | 3 ---
libpurple/protocols/mxit/profile.h | 1 -
libpurple/protocols/mxit/protocol.c | 6 +-----
libpurple/protocols/mxit/protocol.h | 2 +-
libpurple/protocols/mxit/roster.h | 1 -
7 files changed, 2 insertions(+), 22 deletions(-)
diffs (101 lines):
diff --git a/libpurple/protocols/mxit/actions.c b/libpurple/protocols/mxit/actions.c
--- a/libpurple/protocols/mxit/actions.c
+++ b/libpurple/protocols/mxit/actions.c
@@ -85,13 +85,6 @@ out:
g_string_append( attributes, attrib );
acount++;
- /* force hidden if disabled */
- if ( profile->hidden == FALSE ) {
- g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_HIDENUMBER, CP_PROFILE_TYPE_BOOL, "1" );
- g_string_append( attributes, attrib );
- acount++;
- }
-
/* update birthday */
g_strlcpy( profile->birthday, bday, sizeof( profile->birthday ) );
g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_BIRTHDATE, CP_PROFILE_TYPE_UTF8, profile->birthday );
diff --git a/libpurple/protocols/mxit/mxit.c b/libpurple/protocols/mxit/mxit.c
--- a/libpurple/protocols/mxit/mxit.c
+++ b/libpurple/protocols/mxit/mxit.c
@@ -358,10 +358,6 @@ static void mxit_tooltip( PurpleBuddy* b
/* rejection message */
if ( ( contact->subtype == MXIT_SUBTYPE_REJECTED ) && ( contact->msg != NULL ) )
purple_notify_user_info_add_pair( info, _( "Rejection Message" ), contact->msg );
-
- /* hidden number */
- if ( contact->flags & MXIT_CFLAG_HIDDEN )
- purple_notify_user_info_add_pair( info, _( "Hidden Number" ), _( "Yes" ) );
}
diff --git a/libpurple/protocols/mxit/profile.c b/libpurple/protocols/mxit/profile.c
--- a/libpurple/protocols/mxit/profile.c
+++ b/libpurple/protocols/mxit/profile.c
@@ -251,9 +251,6 @@ void mxit_show_profile( struct MXitSessi
/* subscription type */
purple_notify_user_info_add_pair( info, _( "Subscription" ), mxit_convert_subtype_to_name( contact->subtype ) );
-
- /* hidden number */
- purple_notify_user_info_add_pair( info, _( "Hidden Number" ), ( contact->flags & MXIT_CFLAG_HIDDEN ) ? _( "Yes" ) : _( "No" ) );
}
else {
/* this is an invite */
diff --git a/libpurple/protocols/mxit/profile.h b/libpurple/protocols/mxit/profile.h
--- a/libpurple/protocols/mxit/profile.h
+++ b/libpurple/protocols/mxit/profile.h
@@ -63,7 +63,6 @@ struct MXitProfile {
int flags; /* user's profile flags */
gint64 lastonline; /* user's last-online timestamp */
- gboolean hidden; /* set if the user's mxitid should remain hidden */
};
struct MXitSession;
diff --git a/libpurple/protocols/mxit/protocol.c b/libpurple/protocols/mxit/protocol.c
--- a/libpurple/protocols/mxit/protocol.c
+++ b/libpurple/protocols/mxit/protocol.c
@@ -1448,7 +1448,7 @@ static void mxit_parse_cmd_login( struct
PurpleStatus* status;
int presence;
const char* statusmsg;
- const char* profilelist[] = { CP_PROFILE_BIRTHDATE, CP_PROFILE_GENDER, CP_PROFILE_HIDENUMBER, CP_PROFILE_FULLNAME,
+ const char* profilelist[] = { CP_PROFILE_BIRTHDATE, CP_PROFILE_GENDER, CP_PROFILE_FULLNAME,
CP_PROFILE_TITLE, CP_PROFILE_FIRSTNAME, CP_PROFILE_LASTNAME, CP_PROFILE_EMAIL,
CP_PROFILE_MOBILENR, CP_PROFILE_WHEREAMI, CP_PROFILE_ABOUTME, CP_PROFILE_RELATIONSHIP, CP_PROFILE_FLAGS };
@@ -1810,10 +1810,6 @@ static void mxit_parse_cmd_extprofile( s
/* gender */
profile->male = ( fvalue[0] == '1' );
}
- else if ( strcmp( CP_PROFILE_HIDENUMBER, fname ) == 0 ) {
- /* hide number */
- profile->hidden = ( fvalue[0] == '1' );
- }
else if ( strcmp( CP_PROFILE_FULLNAME, fname ) == 0 ) {
/* nickname */
g_strlcpy( profile->nickname, fvalue, sizeof( profile->nickname ) );
diff --git a/libpurple/protocols/mxit/protocol.h b/libpurple/protocols/mxit/protocol.h
--- a/libpurple/protocols/mxit/protocol.h
+++ b/libpurple/protocols/mxit/protocol.h
@@ -185,7 +185,7 @@
/* extended profile attribute fields */
#define CP_PROFILE_BIRTHDATE "birthdate" /* Birthdate (String - ISO 8601 format) */
#define CP_PROFILE_GENDER "gender" /* Gender (Boolean - 0=female, 1=male) */
-#define CP_PROFILE_HIDENUMBER "hidenumber" /* Hide Number (Boolean - 0=false, 1=true) */
+// #define CP_PROFILE_HIDENUMBER "hidenumber" /* Hide Number (Boolean - 0=false, 1=true) (DEPRECATED) */
#define CP_PROFILE_FULLNAME "fullname" /* Fullname (UTF8 String) */
#define CP_PROFILE_STATUS "statusmsg" /* Status Message (UTF8 String) */
#define CP_PROFILE_PREVSTATUS "prevstatusmsgs" /* Previous Status Messages (UTF8 String) */
diff --git a/libpurple/protocols/mxit/roster.h b/libpurple/protocols/mxit/roster.h
--- a/libpurple/protocols/mxit/roster.h
+++ b/libpurple/protocols/mxit/roster.h
@@ -74,7 +74,6 @@
/* MXit contact flags */
-#define MXIT_CFLAG_HIDDEN 0x02
#define MXIT_CFLAG_GATEWAY 0x04
#define MXIT_CFLAG_FOCUS_SEND_BLANK 0x20000
More information about the Commits
mailing list