diff options
author | James Booth <boothj5@gmail.com> | 2014-11-26 21:59:36 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-11-26 21:59:36 +0000 |
commit | e263e00a85428e08f84e002a56456201a450811c (patch) | |
tree | 480a679749acf09332d208451d9d0a67fac5db5a /src/xmpp/stanza.h | |
parent | 508bfeb2bf3f7f665f934a8b5132499e0437d334 (diff) | |
download | profani-tty-e263e00a85428e08f84e002a56456201a450811c.tar.gz |
Refactored parsing caps
Diffstat (limited to 'src/xmpp/stanza.h')
-rw-r--r-- | src/xmpp/stanza.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/xmpp/stanza.h b/src/xmpp/stanza.h index d6a3b042..e60e9fe1 100644 --- a/src/xmpp/stanza.h +++ b/src/xmpp/stanza.h @@ -157,6 +157,12 @@ #define STANZA_DATAFORM_SOFTWARE "urn:xmpp:dataforms:softwareinfo" +typedef struct caps_stanza_t { + char *hash; + char *node; + char *ver; +} XMPPCaps; + typedef struct presence_stanza_t { Jid *jid; char *show; @@ -233,10 +239,6 @@ xmpp_stanza_t* stanza_create_room_kick_iq(xmpp_ctx_t * const ctx, const char * c int stanza_get_idle_time(xmpp_stanza_t * const stanza); char * stanza_get_caps_str(xmpp_stanza_t * const stanza); -gboolean stanza_contains_caps(xmpp_stanza_t * const stanza); -char * stanza_caps_get_hash(xmpp_stanza_t * const stanza); -char * stanza_get_caps_ver(xmpp_stanza_t * const stanza); -char * stanza_caps_get_node(xmpp_stanza_t * const stanza); DataForm * stanza_create_form(xmpp_stanza_t * const stanza); void stanza_destroy_form(DataForm *form); @@ -278,4 +280,7 @@ Resource* stanza_resource_from_presence(XMPPPresence *presence); XMPPPresence* stanza_parse_presence(xmpp_stanza_t *stanza, int *err); void stanza_free_presence(XMPPPresence *presence); +XMPPCaps* stanza_parse_caps(xmpp_stanza_t * const stanza); +void stanza_free_caps(XMPPCaps *caps); + #endif |