citadel
About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
  Fossies Dox: citadel.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Loading...
Searching...
No Matches
serv_xmpp.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007-2019 by the citadel.org team
3 *
4 * This program is open source software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13typedef struct _citxmpp { /* Information about the current session */
14 XML_Parser xp; /* XML parser instance for incoming client stream */
15 char server_name[256]; /* who they think we are */
16 char *chardata;
19 char client_jid[256]; /* "full JID" of the client */
21
22 char iq_type[256]; /* for <iq> stanzas */
23 char iq_id[256];
24 char iq_from[256];
25 char iq_to[256];
26 char iq_client_username[256]; /* username requested by the client (NON SASL ONLY) */
27 char iq_client_password[256]; /* password requested by the client (NON SASL ONLY) */
28 char iq_client_resource[256]; /* resource name requested by the client */
29 int iq_session; /* nonzero == client is requesting a session */
30 int iq_vcard; /* nonzero == client is requesting its vCard */
31 char iq_query_xmlns[256]; /* Namespace of <query> */
32
33 char sasl_auth_mech[32]; /* SASL auth mechanism requested by the client */
34
35 char message_to[256];
36 char *message_body; /* Message body in transit */
37 int html_tag_level; /* <html> tag nesting level */
38
39 int bind_requested; /* In this stanza, client is asking server to bind a resource. */
40 int ping_requested; /* In this stanza, client is pinging the server. */
42
43#define XMPP ((citxmpp *)CC->session_specific_data)
44
45struct xmpp_event {
48 time_t event_time;
50 char event_jid[256];
52};
53
54extern struct xmpp_event *xmpp_queue;
55extern int queue_event_seq;
56
57enum {
60};
61
62void xmpp_cleanup_function(void);
63void xmpp_greeting(void);
64void xmpp_command_loop(void);
65void xmpp_async_loop(void);
66void xmpp_sasl_auth(char *, char *);
67void xmpp_output_auth_mechs(void);
68void xmpp_query_namespace(char *, char *, char *, char *);
71void xmpp_queue_event(int, char *);
72void xmpp_process_events(void);
73void xmpp_presence_notify(char *, int);
74void xmpp_roster_item(struct CitContext *);
75void xmpp_send_message(char *, char *);
76void xmpp_non_sasl_authenticate(char *, char *, char *);
77void xmpp_massacre_roster(void);
79int xmpp_is_visible(struct CitContext *from, struct CitContext *to_whom);
80char *xmlesc(char *buf, char *str, int bufsiz);
int xmpp_is_visible(struct CitContext *from, struct CitContext *to_whom)
Definition: xmpp_presence.c:66
void xmpp_cleanup_function(void)
Definition: serv_xmpp.c:551
void xmpp_output_incoming_messages(void)
Definition: xmpp_messages.c:46
void xmpp_async_loop(void)
Definition: serv_xmpp.c:631
struct _citxmpp citxmpp
struct xmpp_event * xmpp_queue
Definition: serv_xmpp.c:56
void xmpp_output_auth_mechs(void)
void xmpp_process_events(void)
Definition: xmpp_queue.c:105
void xmpp_command_loop(void)
Definition: serv_xmpp.c:611
void xmpp_non_sasl_authenticate(char *, char *, char *)
void xmpp_delete_old_buddies_who_no_longer_exist_from_the_client_roster(void)
@ XMPP_EVT_LOGOUT
Definition: serv_xmpp.h:59
@ XMPP_EVT_LOGIN
Definition: serv_xmpp.h:58
void xmpp_send_message(char *, char *)
Definition: xmpp_messages.c:77
int queue_event_seq
Definition: xmpp_queue.c:40
void xmpp_sasl_auth(char *, char *)
void xmpp_wholist_presence_dump(void)
Definition: xmpp_presence.c:85
void xmpp_massacre_roster(void)
void xmpp_queue_event(int, char *)
Definition: xmpp_queue.c:42
void xmpp_greeting(void)
Definition: serv_xmpp.c:573
void xmpp_presence_notify(char *, int)
void xmpp_query_namespace(char *, char *, char *, char *)
char * xmlesc(char *buf, char *str, int bufsiz)
Definition: serv_xmpp.c:100
void xmpp_roster_item(struct CitContext *)
char message_to[256]
Definition: serv_xmpp.h:35
char server_name[256]
Definition: serv_xmpp.h:15
int bind_requested
Definition: serv_xmpp.h:39
char iq_type[256]
Definition: serv_xmpp.h:22
char iq_from[256]
Definition: serv_xmpp.h:24
int last_event_processed
Definition: serv_xmpp.h:20
int chardata_alloc
Definition: serv_xmpp.h:18
char iq_client_resource[256]
Definition: serv_xmpp.h:28
char * chardata
Definition: serv_xmpp.h:16
char iq_to[256]
Definition: serv_xmpp.h:25
char sasl_auth_mech[32]
Definition: serv_xmpp.h:33
int chardata_len
Definition: serv_xmpp.h:17
char iq_client_username[256]
Definition: serv_xmpp.h:26
char * message_body
Definition: serv_xmpp.h:36
XML_Parser xp
Definition: serv_xmpp.h:14
int iq_vcard
Definition: serv_xmpp.h:30
int html_tag_level
Definition: serv_xmpp.h:37
char iq_id[256]
Definition: serv_xmpp.h:23
char iq_client_password[256]
Definition: serv_xmpp.h:27
int iq_session
Definition: serv_xmpp.h:29
char client_jid[256]
Definition: serv_xmpp.h:19
int ping_requested
Definition: serv_xmpp.h:40
char iq_query_xmlns[256]
Definition: serv_xmpp.h:31
char event_jid[256]
Definition: serv_xmpp.h:50
int session_which_generated_this_event
Definition: serv_xmpp.h:51
int event_type
Definition: serv_xmpp.h:49
time_t event_time
Definition: serv_xmpp.h:48
int event_seq
Definition: serv_xmpp.h:47
struct xmpp_event * next
Definition: serv_xmpp.h:46