summaryrefslogtreecommitdiff
path: root/src/rexmpp.h
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2020-03-25 18:54:06 +0300
committerdefanor <defanor@uberspace.net>2020-03-25 19:13:31 +0300
commit6e1b2af71d8b281042481c8b32e03bb13538f446 (patch)
treecb5a37522543fb2b55c7c9b7957ee5ccbe6b7813 /src/rexmpp.h
parent7b3d46b995bc7cc8ac02533822cadaa3e3b4458b (diff)
Add initial roster management functionality
Diffstat (limited to 'src/rexmpp.h')
-rw-r--r--src/rexmpp.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/rexmpp.h b/src/rexmpp.h
index 5156142..43c715c 100644
--- a/src/rexmpp.h
+++ b/src/rexmpp.h
@@ -29,7 +29,10 @@ typedef struct rexmpp rexmpp_t;
A callback must not free the request or the response, but merely
inspect those and react.
*/
-typedef void (*rexmpp_iq_callback_t) (rexmpp_t *s, xmlNodePtr request, xmlNodePtr response);
+typedef void (*rexmpp_iq_callback_t) (rexmpp_t *s,
+ xmlNodePtr request,
+ xmlNodePtr response,
+ int success);
typedef struct rexmpp_iq rexmpp_iq_t;
@@ -185,7 +188,13 @@ enum rexmpp_err {
/** JID-related error. */
REXMPP_E_JID,
/** Failure to allocate memory. */
- REXMPP_E_MALLOC
+ REXMPP_E_MALLOC,
+ /** Roster-related error. */
+ REXMPP_E_ROSTER,
+ /** A roster item is not found. */
+ REXMPP_E_ROSTER_ITEM_NOT_FOUND,
+ /** An erroneous parameter is supplied. */
+ REXMPP_E_PARAM
};
typedef enum rexmpp_err rexmpp_err_t;
@@ -223,6 +232,7 @@ struct rexmpp
/* Various knobs (these are used instead of loadable modules). */
int enable_carbons;
int enable_service_discovery;
+ int manage_roster;
/* Resource limits. */
uint32_t stanza_queue_size;
@@ -238,6 +248,8 @@ struct rexmpp
/* Stream-related state. */
char *assigned_jid;
xmlNodePtr stream_features;
+ xmlNodePtr roster_items;
+ char *roster_ver;
/* IQs we're waiting for responses to. */
rexmpp_iq_t *active_iq;