aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/presence.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-09-24 20:08:07 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2006-09-24 20:08:07 +0200
commitcfbb3a6e5e11a8d2d162d80958d6ce997104e9d3 (patch)
tree2f6d7e89fa70833e64575fe809e998c0c0e7a7f2 /protocols/jabber/presence.c
parente101506a3e660d3165a89aab0898293b367e2b5b (diff)
Added add_buddy/remove_buddy functions. Removing a contact doesn't seem
to work perfectly though.
Diffstat (limited to 'protocols/jabber/presence.c')
-rw-r--r--protocols/jabber/presence.c16
1 files changed, 16 insertions, 0 deletions
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;
+}