From cfbb3a6e5e11a8d2d162d80958d6ce997104e9d3 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 24 Sep 2006 20:08:07 +0200 Subject: Added add_buddy/remove_buddy functions. Removing a contact doesn't seem to work perfectly though. --- protocols/jabber/presence.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'protocols/jabber/presence.c') diff --git a/protocols/jabber/presence.c b/protocols/jabber/presence.c index d9053c5f..fa9c1248 100644 --- a/protocols/jabber/presence.c +++ b/protocols/jabber/presence.c @@ -77,3 +77,19 @@ int presence_send_update( struct gaim_connection *gc ) xt_free_node( node ); return st; } + +/* Send a subscribe/unsubscribe request to a buddy. */ +int presence_send_request( struct gaim_connection *gc, char *handle, char *request ) +{ + struct xt_node *node; + int st; + + node = jabber_make_packet( "presence", NULL, NULL, NULL ); + xt_add_attr( node, "to", handle ); + xt_add_attr( node, "type", request ); + + st = jabber_write_packet( gc, node ); + + xt_free_node( node ); + return st; +} -- cgit v1.2.3