Mercurial > pidgin
changeset 25069:262ae5f56a9a
Better naming convention, prefix YAHOO_P2PSTATUS_ to values in the enum YahooP2PStatus
author | Sulabh Mahajan <sulabh@soc.pidgin.im> |
---|---|
date | Sat, 12 Jul 2008 18:55:29 +0000 |
parents | 7bd420b3edb7 |
children | c3c5e79b4ecc |
files | libpurple/protocols/yahoo/yahoo.c libpurple/protocols/yahoo/yahoo_friend.h |
diffstat | 2 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo.c Sat Jul 12 18:33:15 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Sat Jul 12 18:55:29 2008 +0000 @@ -520,7 +520,7 @@ yahoo_do_group_check(account, ht, norm_bud, yd->current_list15_grp); /*set p2p status not connected and no p2p packet sent*/ - yahoo_friend_set_p2p_status(f, NOT_CONNECTED); + yahoo_friend_set_p2p_status(f, YAHOO_P2PSTATUS_NOT_CONNECTED); f->p2p_packet_sent = 0; } else { @@ -637,7 +637,7 @@ yahoo_do_group_check(account, ht, norm_bud, grp); /*set p2p status not connected and no p2p packet sent*/ - yahoo_friend_set_p2p_status(f, NOT_CONNECTED); + yahoo_friend_set_p2p_status(f, YAHOO_P2PSTATUS_NOT_CONNECTED); f->p2p_packet_sent = 0; g_free(norm_bud); @@ -2245,11 +2245,11 @@ if( !g_hash_table_lookup(yd->peers, who) ) { /*we are not connected as client, so set friend to not connected*/ - yahoo_friend_set_p2p_status(f, NOT_CONNECTED); + yahoo_friend_set_p2p_status(f, YAHOO_P2PSTATUS_NOT_CONNECTED); f->p2p_packet_sent = 0; } - else /*we are already connected. set friend to CONNECTED_AS_CLIENT*/ - yahoo_friend_set_p2p_status(f, CONNECTED_AS_CLIENT); + else /*we are already connected. set friend to YAHOO_P2PSTATUS_WE_ARE_CLIENT*/ + yahoo_friend_set_p2p_status(f, YAHOO_P2PSTATUS_WE_ARE_CLIENT); return; } @@ -2276,7 +2276,7 @@ /*If friend, set him not connected*/ f = yahoo_friend_find(p2p_data->gc, p2p_data->host_username); if (f) - yahoo_friend_set_p2p_status(f, NOT_CONNECTED); + yahoo_friend_set_p2p_status(f, YAHOO_P2PSTATUS_NOT_CONNECTED); if(p2p_data->source >= 0) close(p2p_data->source); @@ -2471,7 +2471,7 @@ if( (f = yahoo_friend_find(p2p_data->gc, p2p_data->host_username)) ) { p2p_data->session_id = f->session_id; - yahoo_friend_set_p2p_status(f, CONNECTED_AS_SERVER); + yahoo_friend_set_p2p_status(f, YAHOO_P2PSTATUS_WE_ARE_SERVER); } /*Add an Input Read event to the file descriptor*/ @@ -2528,7 +2528,7 @@ account = purple_connection_get_account(gc); /*send packet to only those friends who arent p2p connected and to whom we havent already sent. Do not send if this condition doesn't hold good*/ - if( !( f && (yahoo_friend_get_p2p_status(f) == NOT_CONNECTED) && (f->p2p_packet_sent == 0)) ) + if( !( f && (yahoo_friend_get_p2p_status(f) == YAHOO_P2PSTATUS_NOT_CONNECTED) && (f->p2p_packet_sent == 0)) ) return; pkt = yahoo_packet_new(YAHOO_SERVICE_PEERTOPEER, YAHOO_STATUS_AVAILABLE, 0); @@ -2587,7 +2587,7 @@ /*If the peer is a friend, set him connected*/ f = yahoo_friend_find(p2p_data->gc, p2p_data->host_username); if (f) - yahoo_friend_set_p2p_status(f, CONNECTED_AS_CLIENT); + yahoo_friend_set_p2p_status(f, YAHOO_P2PSTATUS_WE_ARE_CLIENT); account = purple_connection_get_account(p2p_data->gc);
--- a/libpurple/protocols/yahoo/yahoo_friend.h Sat Jul 12 18:33:15 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoo_friend.h Sat Jul 12 18:55:29 2008 +0000 @@ -35,10 +35,10 @@ } YahooPresenceVisibility; typedef enum { - NOT_CONNECTED = 0, - DO_NOT_CONNECT, - CONNECTED_AS_SERVER, /*We are server*/ - CONNECTED_AS_CLIENT /*We are client*/ + YAHOO_P2PSTATUS_NOT_CONNECTED = 0, + YAHOO_P2PSTATUS_DO_NOT_CONNECT, + YAHOO_P2PSTATUS_WE_ARE_SERVER, + YAHOO_P2PSTATUS_WE_ARE_CLIENT } YahooP2PStatus; /* these are called friends instead of buddies mainly so I can use variables