Mercurial > pidgin
comparison libpurple/plugins/signals-test.c @ 20178:8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 19 Sep 2007 06:19:19 +0000 |
parents | 44b4e8bd759b |
children | 6de09629f091 5a7202fa43a0 |
comparison
equal
deleted
inserted
replaced
20174:eb758ca32ea9 | 20178:8e3ef71c4362 |
---|---|
74 purple_debug_misc("signals test", "account-alias-changed (%s, %s, %s)\n", | 74 purple_debug_misc("signals test", "account-alias-changed (%s, %s, %s)\n", |
75 purple_account_get_username(account), | 75 purple_account_get_username(account), |
76 old, purple_account_get_alias(account)); | 76 old, purple_account_get_alias(account)); |
77 } | 77 } |
78 | 78 |
79 static int | |
80 account_authorization_requested_cb(PurpleAccount *account, const char *user, gpointer data) | |
81 { | |
82 purple_debug_misc("signals test", "account-authorization-requested (%s, %s)\n", | |
83 purple_account_get_username(account), user); | |
84 return 0; | |
85 } | |
86 | |
87 static void | |
88 account_authorization_granted_cb(PurpleAccount *account, const char *user, gpointer data) | |
89 { | |
90 purple_debug_misc("signals test", "account-authorization-granted (%s, %s)\n", | |
91 purple_account_get_username(account), user); | |
92 } | |
93 | |
94 static void | |
95 account_authorization_denied_cb(PurpleAccount *account, const char *user, gpointer data) | |
96 { | |
97 purple_debug_misc("signals test", "account-authorization-denied (%s, %s)\n", | |
98 purple_account_get_username(account), user); | |
99 } | |
100 | |
79 /************************************************************************** | 101 /************************************************************************** |
80 * Buddy Icons signal callbacks | 102 * Buddy Icons signal callbacks |
81 **************************************************************************/ | 103 **************************************************************************/ |
82 static void | 104 static void |
83 buddy_icon_changed_cb(PurpleBuddy *buddy) | 105 buddy_icon_changed_cb(PurpleBuddy *buddy) |
566 plugin, PURPLE_CALLBACK(account_set_info_cb), NULL); | 588 plugin, PURPLE_CALLBACK(account_set_info_cb), NULL); |
567 purple_signal_connect(accounts_handle, "account-status-changed", | 589 purple_signal_connect(accounts_handle, "account-status-changed", |
568 plugin, PURPLE_CALLBACK(account_status_changed), NULL); | 590 plugin, PURPLE_CALLBACK(account_status_changed), NULL); |
569 purple_signal_connect(accounts_handle, "account-alias-changed", | 591 purple_signal_connect(accounts_handle, "account-alias-changed", |
570 plugin, PURPLE_CALLBACK(account_alias_changed), NULL); | 592 plugin, PURPLE_CALLBACK(account_alias_changed), NULL); |
593 purple_signal_connect(accounts_handle, "account-authorization-requested", | |
594 plugin, PURPLE_CALLBACK(account_authorization_requested_cb), NULL); | |
595 purple_signal_connect(accounts_handle, "account-authorization-denied", | |
596 plugin, PURPLE_CALLBACK(account_authorization_denied_cb), NULL); | |
597 purple_signal_connect(accounts_handle, "account-authorization-granted", | |
598 plugin, PURPLE_CALLBACK(account_authorization_granted_cb), NULL); | |
571 | 599 |
572 /* Buddy List subsystem signals */ | 600 /* Buddy List subsystem signals */ |
573 purple_signal_connect(blist_handle, "buddy-status-changed", | 601 purple_signal_connect(blist_handle, "buddy-status-changed", |
574 plugin, PURPLE_CALLBACK(buddy_status_changed_cb), NULL); | 602 plugin, PURPLE_CALLBACK(buddy_status_changed_cb), NULL); |
575 purple_signal_connect(blist_handle, "buddy-idle-changed", | 603 purple_signal_connect(blist_handle, "buddy-idle-changed", |