#include "ekg2-config.h"
#include <ekg/win32.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <unistd.h>
#include <netdb.h>
#include <ekg/debug.h>
#include <ekg/dynstuff.h>
#include <ekg/net.h>
#include <ekg/protocol.h>
#include <ekg/recode.h>
#include <ekg/sessions.h>
#include <ekg/stuff.h>
#include <ekg/userlist.h>
#include <ekg/themes.h>
#include <ekg/vars.h>
#include <ekg/xmalloc.h>
#include <ekg/log.h>
#include <ekg/queries.h>
#include "jabber.h"
#include "jabber-ssl.h"
#include "jabber_dcc.h"
Definicje | |
#define | JABBER_EKG_CAPS "" |
#define | P(x) (x ? x : "") |
#define | BUFFER_LEN 4096 |
Funkcje | |
static int | jabber_theme_init () |
int | jabber_handle_connect_ssl (int type, int fd, watch_type_t watch, session_t *s) |
PLUGIN_DEFINE (jabber, PLUGIN_PROTOCOL, jabber_theme_init) | |
static int | jabber_session_init (void *data, va_list ap) |
static int | jabber_session_deinit (void *data, va_list ap) |
static | LIST_FREE_ITEM (list_jabber_stanza_free, jabber_stanza_t *) |
int | jabber_iq_stanza_free (jabber_private_t *j) |
int | jabber_stanza_freeone (jabber_private_t *j, jabber_stanza_t *stanza) |
int | jabber_privacy_add_compare (jabber_iq_privacy_t *data1, jabber_iq_privacy_t *data2) |
static | LIST_FREE_ITEM (list_jabber_privacy_free, jabber_iq_privacy_t *) |
int | jabber_privacy_free (jabber_private_t *j) |
int | jabber_privacy_freeone (jabber_private_t *j, jabber_iq_privacy_t *item) |
static | LIST_FREE_ITEM (list_jabber_bookmarks_free, jabber_bookmark_t *) |
int | jabber_bookmarks_free (jabber_private_t *j) |
static int | jabber_print_version (void *data, va_list ap) |
static int | jabber_validate_uid (void *data, va_list ap) |
static int | jabber_window_kill (void *data, va_list ap) |
int | jabber_write_status (session_t *s) |
void | jabber_handle_disconnect (session_t *s, const char *reason, int type) |
static void | xmlnode_handle_start (void *data, const char *name, const char **atts) |
static int | jabber_handle_stream (int type, int fd, watch_type_t watch, session_t *s) |
static int | jabber_ping_timer_handler (int type, session_t *s) |
static int | jabber_handle_connect_tlen_hub (int type, int fd, watch_type_t watch, void *data) |
int | jabber_handle_connect (int type, int fd, watch_type_t watch, void *data) |
int | jabber_handle_connect2 (int type, int fd, watch_type_t watch, void *data) |
XML_Parser | jabber_parser_recreate (XML_Parser parser, void *data) |
static const char * | jabber_ssl_cert_verify (const SSL_SESSION ssl) |
static int | jabber_protocol_ignore (void *data, va_list ap) |
static int | jabber_status_show_handle (void *data, va_list ap) |
void | jabber_gpg_changed (session_t *s, const char *name) |
static void | jabber_statusdescr_handler (session_t *s, const char *name) |
static int | jabber_pgp_postinit (void *data, va_list ap) |
static int | jabber_userlist_info (void *data, va_list ap) |
static int | jabber_userlist_priv_handler (void *data, va_list ap) |
static int | jabber_typing_out (void *data, va_list ap) |
EXPORT int | jabber_plugin_init (int prio) |
static int | jabber_plugin_destroy () |
Zmienne | |
char * | jabber_default_search_server = NULL |
char * | jabber_default_pubsub_server = NULL |
int | config_jabber_beep_mail = 0 |
int | config_jabber_disable_chatstates = 6 |
const char * | jabber_authtypes [] = { "none", "from", "to", "both" } |
static int | session_postinit |
static plugins_params_t | jabber_plugin_vars [] |
static const char * | jabber_protocols [] = { "xmpp:", "tlen:", NULL } |
static const status_t | jabber_statuses [] |
static struct protocol_plugin_priv | jabber_priv |
#define BUFFER_LEN 4096 |
#define JABBER_EKG_CAPS "" |
#define P | ( | x | ) | (x ? x : "") |
int jabber_bookmarks_free | ( | jabber_private_t * | j | ) |
void jabber_gpg_changed | ( | session_t * | s, | |
const char * | name | |||
) |
int jabber_handle_connect | ( | int | type, | |
int | fd, | |||
watch_type_t | watch, | |||
void * | data | |||
) |
int jabber_handle_connect2 | ( | int | type, | |
int | fd, | |||
watch_type_t | watch, | |||
void * | data | |||
) |
int jabber_handle_connect_ssl | ( | int | type, | |
int | fd, | |||
watch_type_t | watch, | |||
session_t * | s | |||
) |
static int jabber_handle_connect_tlen_hub | ( | int | type, | |
int | fd, | |||
watch_type_t | watch, | |||
void * | data | |||
) | [static] |
void jabber_handle_disconnect | ( | session_t * | s, | |
const char * | reason, | |||
int | type | |||
) |
static int jabber_handle_stream | ( | int | type, | |
int | fd, | |||
watch_type_t | watch, | |||
session_t * | s | |||
) | [static] |
int jabber_iq_stanza_free | ( | jabber_private_t * | j | ) |
XML_Parser jabber_parser_recreate | ( | XML_Parser | parser, | |
void * | data | |||
) |
static int jabber_pgp_postinit | ( | void * | data, | |
va_list | ap | |||
) | [static] |
Handler for: CONFIG_POSTINIT
Executed after ekg2 read sessions configuration.
Here we try to init gpg for all jabber sessions by calling jabber_gpg_changed()
static int jabber_ping_timer_handler | ( | int | type, | |
session_t * | s | |||
) | [static] |
static int jabber_plugin_destroy | ( | ) | [static] |
Call SSL_GLOBAL_DEINIT() if jabber is built with ssl support
and unregister jabber plugin.
EXPORT int jabber_plugin_init | ( | int | prio | ) |
static int jabber_print_version | ( | void * | data, | |
va_list | ap | |||
) | [static] |
int jabber_privacy_add_compare | ( | jabber_iq_privacy_t * | data1, | |
jabber_iq_privacy_t * | data2 | |||
) |
int jabber_privacy_free | ( | jabber_private_t * | j | ) |
int jabber_privacy_freeone | ( | jabber_private_t * | j, | |
jabber_iq_privacy_t * | item | |||
) |
static int jabber_protocol_ignore | ( | void * | data, | |
va_list | ap | |||
) | [static] |
static int jabber_session_deinit | ( | void * | data, | |
va_list | ap | |||
) | [static] |
Handler for: SESSION_REMOVED
Free memory allocated by jabber_private_t if session is jabber one.
ap | 1st param: (char *) session - uid of session | |
data | NULL |
static int jabber_session_init | ( | void * | data, | |
va_list | ap | |||
) | [static] |
Handler for: SESSION_ADDED
Init priv_data session struct jabber_private_t if session is jabber one.
ap | 1st param: (char *) session - uid of session | |
data | NULL |
static const char* jabber_ssl_cert_verify | ( | const SSL_SESSION | ssl | ) | [static] |
Initial version of routine to test if certificate used by SSL_SESSION is 100% correct. If not, return error why isn't ok.
ssl | - SSL_SESSION |
int jabber_stanza_freeone | ( | jabber_private_t * | j, | |
jabber_stanza_t * | stanza | |||
) |
static int jabber_status_show_handle | ( | void * | data, | |
va_list | ap | |||
) | [static] |
static void jabber_statusdescr_handler | ( | session_t * | s, | |
const char * | name | |||
) | [static] |
static int jabber_theme_init | ( | ) | [static] |
static int jabber_typing_out | ( | void * | data, | |
va_list | ap | |||
) | [static] |
static int jabber_userlist_info | ( | void * | data, | |
va_list | ap | |||
) | [static] |
static int jabber_userlist_priv_handler | ( | void * | data, | |
va_list | ap | |||
) | [static] |
static int jabber_validate_uid | ( | void * | data, | |
va_list | ap | |||
) | [static] |
handler for: PROTOCOL_VALIDATE_UID
checks, if uid is proper for jabber plugin.
ap | 1st param: (char *) uid - of user/session/command/whatever | |
ap | 2nd param: (int) valid - place to put 1 if uid is valid for jabber plugin. | |
data | NULL |
static int jabber_window_kill | ( | void * | data, | |
va_list | ap | |||
) | [static] |
int jabber_write_status | ( | session_t * | s | ) |
static LIST_FREE_ITEM | ( | list_jabber_bookmarks_free | , | |
jabber_bookmark_t * | ||||
) | [static] |
static LIST_FREE_ITEM | ( | list_jabber_stanza_free | , | |
jabber_stanza_t * | ||||
) | [static] |
static LIST_FREE_ITEM | ( | list_jabber_privacy_free | , | |
jabber_iq_privacy_t * | ||||
) | [static] |
PLUGIN_DEFINE | ( | jabber | , | |
PLUGIN_PROTOCOL | , | |||
jabber_theme_init | ||||
) |
static void xmlnode_handle_start | ( | void * | data, | |
const char * | name, | |||
const char ** | atts | |||
) | [static] |
int config_jabber_beep_mail = 0 |
int config_jabber_disable_chatstates = 6 |
const char* jabber_authtypes[] = { "none", "from", "to", "both" } |
char* jabber_default_pubsub_server = NULL |
char* jabber_default_search_server = NULL |
plugins_params_t jabber_plugin_vars[] [static] |
struct protocol_plugin_priv jabber_priv [static] |
{ .protocols = jabber_protocols, .statuses = jabber_statuses }
const char* jabber_protocols[] = { "xmpp:", "tlen:", NULL } [static] |
Register jabber plugin, assign plugin params [jabber_plugin_vars], connect to most important events
register global jabber variables, register commands with call to jabber_register_commands()
And call SSL_GLOBAL_INIT() if jabber is built with ssl support
const status_t jabber_statuses[] [static] |
{ EKG_STATUS_NA, EKG_STATUS_DND, EKG_STATUS_XA, EKG_STATUS_AWAY, EKG_STATUS_AVAIL, EKG_STATUS_FFC, EKG_STATUS_INVISIBLE, EKG_STATUS_ERROR, EKG_STATUS_UNKNOWN, EKG_STATUS_NULL }
int session_postinit [static] |