comparison libpurple/connection.c @ 25291:8b7ae3775a0b

propagate from branch 'im.pidgin.pidgin' (head 7821a3549d7d99473e999dc067afc4218addcc1e) to branch 'im.pidgin.pidgin.next.minor' (head f5288ef412711861bacd78dba56c4963826d86ed)
author Richard Laager <rlaager@wiktel.com>
date Fri, 31 Oct 2008 17:46:39 +0000
parents 9ded0fb57e1c 8282911d5e17
children 3d8c53f3108e
comparison
equal deleted inserted replaced
24293:18711b62ec27 25291:8b7ae3775a0b
283 283
284 /* Clear out the proto data that was freed in the prpl close method*/ 284 /* Clear out the proto data that was freed in the prpl close method*/
285 buddies = purple_find_buddies(account, NULL); 285 buddies = purple_find_buddies(account, NULL);
286 while (buddies != NULL) { 286 while (buddies != NULL) {
287 PurpleBuddy *buddy = buddies->data; 287 PurpleBuddy *buddy = buddies->data;
288 buddy->proto_data = NULL; 288 purple_buddy_set_protocol_data(buddy, NULL);
289 buddies = g_slist_delete_link(buddies, buddies); 289 buddies = g_slist_delete_link(buddies, buddies);
290 } 290 }
291 291
292 connections = g_list_remove(connections, gc); 292 connections = g_list_remove(connections, gc);
293 293
425 425
426 g_free(gc->display_name); 426 g_free(gc->display_name);
427 gc->display_name = g_strdup(name); 427 gc->display_name = g_strdup(name);
428 } 428 }
429 429
430 void
431 purple_connection_set_protocol_data(PurpleConnection *connection, void *proto_data) {
432 g_return_if_fail(connection != NULL);
433
434 connection->proto_data = proto_data;
435 }
436
430 PurpleConnectionState 437 PurpleConnectionState
431 purple_connection_get_state(const PurpleConnection *gc) 438 purple_connection_get_state(const PurpleConnection *gc)
432 { 439 {
433 g_return_val_if_fail(gc != NULL, PURPLE_DISCONNECTED); 440 g_return_val_if_fail(gc != NULL, PURPLE_DISCONNECTED);
434 441
463 purple_connection_get_display_name(const PurpleConnection *gc) 470 purple_connection_get_display_name(const PurpleConnection *gc)
464 { 471 {
465 g_return_val_if_fail(gc != NULL, NULL); 472 g_return_val_if_fail(gc != NULL, NULL);
466 473
467 return gc->display_name; 474 return gc->display_name;
475 }
476
477 void *
478 purple_connection_get_protocol_data(const PurpleConnection *connection) {
479 g_return_val_if_fail(connection != NULL, NULL);
480
481 return connection->proto_data;
468 } 482 }
469 483
470 void 484 void
471 purple_connection_update_progress(PurpleConnection *gc, const char *text, 485 purple_connection_update_progress(PurpleConnection *gc, const char *text,
472 size_t step, size_t count) 486 size_t step, size_t count)