soc.2008.yahoo: 52973f91: Better naming convention, prefix YAHOO_P...
sulabh at soc.pidgin.im
sulabh at soc.pidgin.im
Sat Jul 12 15:50:55 EDT 2008
-----------------------------------------------------------------
Revision: 52973f914c2894837803289d33288506e90460e7
Ancestor: 8f561d358761734ed0187f46d667edf52098d708
Author: sulabh at soc.pidgin.im
Date: 2008-07-12T18:55:29
Branch: im.pidgin.soc.2008.yahoo
URL: http://d.pidgin.im/viewmtn/revision/info/52973f914c2894837803289d33288506e90460e7
Modified files:
libpurple/protocols/yahoo/yahoo.c
libpurple/protocols/yahoo/yahoo_friend.h
ChangeLog:
Better naming convention, prefix YAHOO_P2PSTATUS_ to values in the enum YahooP2PStatus
-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/yahoo.c d1998709672296ae8ac6a08c97c9c7be34a374ac
+++ libpurple/protocols/yahoo/yahoo.c 53fd035ccd30edcdde88dc958f58dbeeebf94b1a
@@ -520,7 +520,7 @@ static void yahoo_process_list_15(Purple
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 @@ static void yahoo_process_list(PurpleCon
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 @@ static void yahoo_process_addbuddy(Purpl
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 @@ static void yahoo_p2p_disconnect_destroy
/*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 @@ static void yahoo_p2p_server_send_connec
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 @@ static void yahoo_send_p2p_pkt(PurpleCon
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 @@ static void yahoo_p2p_init_cb(gpointer d
/*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);
============================================================
--- libpurple/protocols/yahoo/yahoo_friend.h b51369c45511adb0be2f0f6b39da33fddfe56865
+++ libpurple/protocols/yahoo/yahoo_friend.h 3794f5104b05e3e3f0fb67be00f5d15bd6d5850a
@@ -35,10 +35,10 @@ typedef enum {
} 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
More information about the Commits
mailing list