Mercurial > pidgin.yaz
comparison libpurple/protocols/bonjour/bonjour.c @ 32767:2ec94166be43
On the way to hiding the PurpleConnection struct.
* Added purple_connection_get_flags() and purple_connection_set_flags()
* Use purple_connection_ accessor functions.
author | andrew.victor@mxit.com |
---|---|
date | Tue, 18 Oct 2011 18:47:48 +0000 |
parents | c6943fd38d44 |
children |
comparison
equal
deleted
inserted
replaced
32766:ea2b621fd3ba | 32767:2ec94166be43 |
---|---|
100 "http://d.pidgin.im/BonjourWindows for more information.")); | 100 "http://d.pidgin.im/BonjourWindows for more information.")); |
101 return; | 101 return; |
102 } | 102 } |
103 #endif /* _WIN32 */ | 103 #endif /* _WIN32 */ |
104 | 104 |
105 gc->flags |= PURPLE_CONNECTION_HTML; | 105 purple_connection_set_flags(gc, PURPLE_CONNECTION_HTML); |
106 bd = g_new0(BonjourData, 1); | 106 bd = g_new0(BonjourData, 1); |
107 purple_connection_set_protocol_data(gc, bd); | 107 purple_connection_set_protocol_data(gc, bd); |
108 | 108 |
109 /* Start waiting for jabber connections (iChat style) */ | 109 /* Start waiting for jabber connections (iChat style) */ |
110 bd->jabber_data = g_new0(BonjourJabber, 1); | 110 bd->jabber_data = g_new0(BonjourJabber, 1); |
307 } | 307 } |
308 | 308 |
309 static void | 309 static void |
310 bonjour_convo_closed(PurpleConnection *connection, const char *who) | 310 bonjour_convo_closed(PurpleConnection *connection, const char *who) |
311 { | 311 { |
312 PurpleBuddy *buddy = purple_find_buddy(connection->account, who); | 312 PurpleBuddy *buddy = purple_find_buddy(purple_connection_get_account(connection), who); |
313 BonjourBuddy *bb; | 313 BonjourBuddy *bb; |
314 | 314 |
315 if (buddy == NULL || (bb = purple_buddy_get_protocol_data(buddy)) == NULL) | 315 if (buddy == NULL || (bb = purple_buddy_get_protocol_data(buddy)) == NULL) |
316 { | 316 { |
317 /* | 317 /* |
437 } | 437 } |
438 | 438 |
439 static void | 439 static void |
440 bonjour_group_buddy(PurpleConnection *connection, const char *who, const char *old_group, const char *new_group) | 440 bonjour_group_buddy(PurpleConnection *connection, const char *who, const char *old_group, const char *new_group) |
441 { | 441 { |
442 PurpleBuddy *buddy = purple_find_buddy(connection->account, who); | 442 PurpleBuddy *buddy = purple_find_buddy(purple_connection_get_account(connection), who); |
443 | 443 |
444 bonjour_do_group_change(buddy, new_group); | 444 bonjour_do_group_change(buddy, new_group); |
445 | 445 |
446 } | 446 } |
447 | 447 |
462 } | 462 } |
463 | 463 |
464 static gboolean | 464 static gboolean |
465 bonjour_can_receive_file(PurpleConnection *connection, const char *who) | 465 bonjour_can_receive_file(PurpleConnection *connection, const char *who) |
466 { | 466 { |
467 PurpleBuddy *buddy = purple_find_buddy(connection->account, who); | 467 PurpleBuddy *buddy = purple_find_buddy(purple_connection_get_account(connection), who); |
468 | 468 |
469 return (buddy != NULL && purple_buddy_get_protocol_data(buddy) != NULL); | 469 return (buddy != NULL && purple_buddy_get_protocol_data(buddy) != NULL); |
470 } | 470 } |
471 | 471 |
472 static gboolean | 472 static gboolean |