aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/jabber.h
diff options
context:
space:
mode:
authorSven Moritz Hallberg <sm@khjk.org>2008-02-16 18:15:31 +0100
committerSven Moritz Hallberg <sm@khjk.org>2008-02-16 18:15:31 +0100
commit4eb4c0f4beeb87e07bd6b10daed8fe8e48fb4206 (patch)
treea54ec7b6b4622aa35ef7bd1efc58ab8ec45749ae /protocols/jabber/jabber.h
parent896195002cc903ec4b1ef7e1468f73c1dc08df9e (diff)
parentca605509d0b49e6012d10ae5d1553ced007e6ce7 (diff)
merge in upstream changes
Diffstat (limited to 'protocols/jabber/jabber.h')
-rw-r--r--protocols/jabber/jabber.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/protocols/jabber/jabber.h b/protocols/jabber/jabber.h
index cf0f8e6a..1ff0e8dd 100644
--- a/protocols/jabber/jabber.h
+++ b/protocols/jabber/jabber.h
@@ -48,16 +48,22 @@ typedef enum
typedef enum
{
- JBFLAG_PROBED_XEP85 = 1, /* Set this when we sent our probe packet to make
+ JBFLAG_PROBED_XEP85 = 1, /* Set this when we sent our probe packet to make
sure it gets sent only once. */
- JBFLAG_DOES_XEP85 = 2, /* Set this when the resource seems to support
+ JBFLAG_DOES_XEP85 = 2, /* Set this when the resource seems to support
XEP85 (typing notification shite). */
- JBFLAG_IS_CHATROOM = 4, /* It's convenient to use this JID thingy for
+ JBFLAG_IS_CHATROOM = 4, /* It's convenient to use this JID thingy for
groupchat state info too. */
- JBFLAG_IS_ANONYMOUS = 8, /* For anonymous chatrooms, when we don't have
+ JBFLAG_IS_ANONYMOUS = 8, /* For anonymous chatrooms, when we don't have
have a real JID. */
} jabber_buddy_flags_t;
+typedef enum
+{
+ JCFLAG_MESSAGE_SENT = 1, /* Set this after sending the first message, so
+ we can detect echoes/backlogs. */
+} jabber_chat_flags_t;
+
struct jabber_data
{
struct im_connection *ic;
@@ -94,6 +100,7 @@ typedef xt_status (*jabber_cache_event) ( struct im_connection *ic, struct xt_no
struct jabber_cache_entry
{
+ time_t saved_at;
struct xt_node *node;
jabber_cache_event func;
};
@@ -140,6 +147,10 @@ struct jabber_chat
#define JABBER_PACKET_ID "BeeP"
#define JABBER_CACHED_ID "BeeC"
+/* The number of seconds to keep cached packets before garbage collecting
+ them. This gc is done on every keepalive (every minute). */
+#define JABBER_CACHE_MAX_AGE 600
+
/* RFC 392[01] stuff */
#define XMLNS_TLS "urn:ietf:params:xml:ns:xmpp-tls"
#define XMLNS_SASL "urn:ietf:params:xml:ns:xmpp-sasl"
@@ -160,6 +171,7 @@ struct jabber_chat
#define XMLNS_DISCOVER "http://jabber.org/protocol/disco#info" /* 0030 */
#define XMLNS_MUC "http://jabber.org/protocol/muc" /* XEP-0045 */
#define XMLNS_MUC_USER "http://jabber.org/protocol/muc#user"/* XEP-0045 */
+#define XMLNS_CAPS "http://jabber.org/protocol/caps" /* XEP-0115 */
/* iq.c */
xt_status jabber_pkt_iq( struct xt_node *node, gpointer data );