| 
    ekg2
    GIT master
    
   | 
 
#include "ekg2.h"#include <sys/types.h>#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>#include <sys/ioctl.h>#include <sys/utsname.h>#include <errno.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <stdarg.h>#include <unistd.h>#include <netdb.h>#include <expat.h>#include <time.h>#include "jabber.h"#include "jabber_dcc.h"#include "jabber_handlers_tlen.inc"#include "jabber_handlers_iq_error.inc"#include "jabber_handlers_iq_get.inc"#include "jabber_handlers_iq_result.inc"
Struktury danych | |
| struct | jabber_generic_handler | 
| struct | jabber_iq_generic_handler | 
Definicje | |
| #define | jabberfix(x, a) ((x) ? x : a) | 
| #define | JABBER_HANDLER(x) static void x(session_t *s, xmlnode_t *n) | 
| #define | CHECK_CONNECT(connecting_, connected_, func) | 
| #define | CHECK_XMLNS(n, _xmlns, func) | 
Funkcje | |
| int | jabber_handle_connect_ssl (int type, int fd, watch_type_t watch, session_t *s) | 
| static void | jabber_handle_message (session_t *s, xmlnode_t *n) | 
| static void | jabber_handle_iq (session_t *s, xmlnode_t *n) | 
| static void | jabber_handle_presence (session_t *s, xmlnode_t *n) | 
| static time_t | jabber_try_xdelay (const char *stamp) | 
| static void | jabber_session_connected (session_t *s) | 
| static void | newmail_common (session_t *s) | 
| static xmlnode_t * | xmlnode_find_child (xmlnode_t *n, const char *name) | 
| static xmlnode_t * | xmlnode_find_child_xmlns (xmlnode_t *n, const char *name, const char *xmlns) | 
| void | jabber_iq_auth_send (session_t *s, const char *username, const char *passwd, const char *stream_id) | 
| static void | jabber_handle_stream_features (session_t *s, xmlnode_t *n) | 
| static void | jabber_handle_compressed (session_t *s, xmlnode_t *n) | 
| static void | jabber_handle_challenge (session_t *s, xmlnode_t *n) | 
| static void | jabber_handle_proceed (session_t *s, xmlnode_t *n) | 
| static void | jabber_handle_stream_error (session_t *s, xmlnode_t *n) | 
| static void | jabber_handle_success (session_t *s, xmlnode_t *n) | 
| static void | jabber_handle_failure (session_t *s, xmlnode_t *n) | 
| void | jabber_handle (void *data, xmlnode_t *n) | 
| static void | jabber_handle_xmldata_form (session_t *s, const char *uid, const char *command, xmlnode_t *form, const char *param) | 
| static int | jabber_handle_xmldata_submit (session_t *s, xmlnode_t *form, const char *FORM_TYPE, int alloc,...) | 
| static void | jabber_handle_xmldata_result (session_t *s, xmlnode_t *form, const char *uid) | 
| static const struct jabber_iq_generic_handler * | jabber_iq_find_handler (const struct jabber_iq_generic_handler *items, const char *type, const char *xmlns) | 
| static int | jabber_status_int (int tlen, const char *text) | 
| static status_t | role_and_affiliation_to_ekg2_status (char *role, char *affiliation) | 
| const char * | jabber_iq_reg (session_t *s, const char *prefix, const char *to, const char *type, const char *xmlns) | 
| const char * | jabber_iq_send (session_t *s, const char *prefix, jabber_iq_type_t iqtype, const char *to, const char *type, const char *xmlns) | 
Zmienne | |
| static const struct jabber_generic_handler | jabber_handlers [] | 
| #define CHECK_CONNECT | ( | connecting_, | |
| connected_, | |||
| func | |||
| ) | 
| #define CHECK_XMLNS | ( | n, | |
| _xmlns, | |||
| func | |||
| ) | 
| #define jabberfix | ( | x, | |
| a | |||
| ) | ((x) ? x : a) | 
| void jabber_handle | ( | void * | data, | 
| xmlnode_t * | n | ||
| ) | 
| int jabber_handle_connect_ssl | ( | int | type, | 
| int | fd, | ||
| watch_type_t | watch, | ||
| session_t * | s | ||
| ) | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
| void jabber_iq_auth_send | ( | session_t * | s, | 
| const char * | username, | ||
| const char * | passwd, | ||
| const char * | stream_id | ||
| ) | 
Send jabber:iq:auth with <digest>DIGEST</digest> or <password>PLAINTEXT_PASSWORD</password>
 It support both tlen auth, and jabber NON-SASL Authentication [XEP-0078]
| s | - session to authenticate CANNOT BE NULL | 
| username | - username | 
| passwd | - password to hash or to escape | 
| stream_id | - id of stream. | 
      
  | 
  static | 
| const char* jabber_iq_reg | ( | session_t * | s, | 
| const char * | prefix, | ||
| const char * | to, | ||
| const char * | type, | ||
| const char * | xmlns | ||
| ) | 
| const char* jabber_iq_send | ( | session_t * | s, | 
| const char * | prefix, | ||
| jabber_iq_type_t | iqtype, | ||
| const char * | to, | ||
| const char * | type, | ||
| const char * | xmlns | ||
| ) | 
      
  | 
  static | 
      
  | 
  inlinestatic | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
Find child of node, with name
| n | - node | 
| name | - name | 
      
  | 
  static | 
Find child of node, with name, which has 'xmlns' atts equal xmlns
| n | - node | 
| name | - name | 
| xmlns | - xmlns | 
      
  | 
  static | 
 1.8.13