Mercurial > pidgin.yaz
comparison libpurple/connection.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 | f75041cb3fec |
children | 50cd80d3554e |
comparison
equal
deleted
inserted
replaced
32766:ea2b621fd3ba | 32767:2ec94166be43 |
---|---|
385 ops->disconnected(gc); | 385 ops->disconnected(gc); |
386 } | 386 } |
387 } | 387 } |
388 | 388 |
389 void | 389 void |
390 purple_connection_set_flags(PurpleConnection *gc, PurpleConnectionFlags flags) | |
391 { | |
392 g_return_if_fail(gc != NULL); | |
393 | |
394 gc->flags = flags; | |
395 } | |
396 | |
397 void | |
390 purple_connection_set_account(PurpleConnection *gc, PurpleAccount *account) | 398 purple_connection_set_account(PurpleConnection *gc, PurpleAccount *account) |
391 { | 399 { |
392 g_return_if_fail(gc != NULL); | 400 g_return_if_fail(gc != NULL); |
393 g_return_if_fail(account != NULL); | 401 g_return_if_fail(account != NULL); |
394 | 402 |
415 purple_connection_get_state(const PurpleConnection *gc) | 423 purple_connection_get_state(const PurpleConnection *gc) |
416 { | 424 { |
417 g_return_val_if_fail(gc != NULL, PURPLE_DISCONNECTED); | 425 g_return_val_if_fail(gc != NULL, PURPLE_DISCONNECTED); |
418 | 426 |
419 return gc->state; | 427 return gc->state; |
428 } | |
429 | |
430 PurpleConnectionFlags | |
431 purple_connection_get_flags(const PurpleConnection *gc) | |
432 { | |
433 g_return_val_if_fail(gc != NULL, 0); | |
434 | |
435 return gc->flags; | |
420 } | 436 } |
421 | 437 |
422 PurpleAccount * | 438 PurpleAccount * |
423 purple_connection_get_account(const PurpleConnection *gc) | 439 purple_connection_get_account(const PurpleConnection *gc) |
424 { | 440 { |