diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-11-07 14:16:34 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-01-13 12:20:08 +0000 |
commit | e30ab9fde8252730519834488f574ab01741c09e (patch) | |
tree | bdedcdf498ac5f7b1d3ef0adc17c726e84bd258d | |
parent | e5758c81763f17dd70b547d7db02d00126b76721 (diff) |
roster: implement new is_blocked() vfunc
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=50093
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
-rw-r--r-- | src/roster.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/roster.c b/src/roster.c index 50b345464..11adfa599 100644 --- a/src/roster.c +++ b/src/roster.c @@ -3014,6 +3014,16 @@ gabble_roster_download_async (TpBaseContactList *base, g_clear_error (&error); } +static gboolean +gabble_roster_is_blocked (TpBaseContactList *base, + TpHandle contact) +{ + GabbleRoster *self = GABBLE_ROSTER (base); + GabbleRosterItem *item = _gabble_roster_item_lookup (self, contact); + + return (item != NULL && item->blocked); +} + static TpHandleSet * gabble_roster_dup_blocked_contacts (TpBaseContactList *base) { @@ -3484,6 +3494,7 @@ static void blockable_iface_init (TpBlockableContactListInterface *iface) { iface->can_block = gabble_roster_can_block; + iface->is_blocked = gabble_roster_is_blocked; iface->dup_blocked_contacts = gabble_roster_dup_blocked_contacts; iface->block_contacts_async = gabble_roster_block_contacts_async; iface->unblock_contacts_async = gabble_roster_unblock_contacts_async; |