#include "ekg2-config.h"#include "dynstuff.h"#include "sessions.h"#include <stdarg.h>#include <stdint.h>#include <time.h>#include <stdlib.h>#include <sys/types.h>Go to the source code of this file.
Data Structures | |
| struct | dcc_s |
Defines | |
| #define | EKG_FORMAT_RGB_MASK 0x00ffffffL |
| #define | EKG_FORMAT_R_MASK 0x00ff0000L |
| #define | EKG_FORMAT_G_MASK 0x0000ff00L |
| #define | EKG_FORMAT_B_MASK 0x000000ffL |
| #define | EKG_FORMAT_COLOR 0x01000000L |
| #define | EKG_FORMAT_BOLD 0x02000000L |
| #define | EKG_FORMAT_ITALIC 0x04000000L |
| #define | EKG_FORMAT_UNDERLINE 0x08000000L |
| #define | EKG_FORMAT_REVERSE 0x10000000L |
| #define | EKG_NO_THEMEBIT 256 |
| #define | EKG_NO_BEEP 0 |
| #define | EKG_TRY_BEEP 1 |
Typedefs | |
| typedef void(*) | dcc_close_handler_t (struct dcc_s *) |
| typedef dcc_s | dcc_t |
Enumerations | |
| enum | msgack_t { EKG_ACK_DELIVERED = 0, EKG_ACK_QUEUED, EKG_ACK_DROPPED, EKG_ACK_TEMPFAIL, EKG_ACK_UNKNOWN, EKG_ACK_MAX } |
| enum | disconnect_t { EKG_DISCONNECT_USER = 0, EKG_DISCONNECT_NETWORK, EKG_DISCONNECT_FORCED, EKG_DISCONNECT_FAILURE, EKG_DISCONNECT_STOPPED } |
| enum | msgclass_t { EKG_MSGCLASS_MESSAGE = 0, EKG_MSGCLASS_CHAT, EKG_MSGCLASS_SYSTEM, EKG_MSGCLASS_LOG, EKG_MSGCLASS_NOT2US = 16, EKG_MSGCLASS_SENT = 32, EKG_MSGCLASS_SENT_CHAT, EKG_MSGCLASS_SENT_LOG, EKG_MSGCLASS_PRIV_STATUS = 64 } |
| enum | dcc_type_t { DCC_NONE = 0, DCC_SEND, DCC_GET, DCC_VOICE } |
Functions | |
| void | protocol_init () |
| char * | message_print (const char *session, const char *sender, const char **rcpts, const char *text, const uint32_t *format, time_t sent, int class, const char *seq, int dobeep, int secure) |
| int | protocol_connected_emit (const session_t *s) |
| int | protocol_disconnected_emit (const session_t *s, const char *reason, int type) |
| int | protocol_message_ack_emit (const session_t *s, const char *rcpt, const char *seq, int status) |
| int | protocol_message_emit (const session_t *s, const char *uid, char **rcpts, const char *text, const uint32_t *format, time_t sent, int class, const char *seq, int dobeep, int secure) |
| int | protocol_status_emit (const session_t *s, const char *uid, int status, char *descr, time_t when) |
| int | protocol_xstate_emit (const session_t *s, const char *uid, int state, int offstate) |
| char * | protocol_uid (const char *proto, const char *target) |
| dcc_t * | dcc_add (session_t *session, const char *uid, dcc_type_t type, void *priv) |
| int | dcc_close (dcc_t *d) |
| int | dcc_private_set (dcc_t *, void *) |
| void * | dcc_private_get (dcc_t *) |
| int | dcc_close_handler_set (dcc_t *, dcc_close_handler_t) |
| dcc_close_handler_t | dcc_close_handler_get (dcc_t *) |
| const char * | dcc_uid_get (dcc_t *) |
| int | dcc_id_get (dcc_t *) |
| time_t | dcc_started_get (dcc_t *) |
| int | dcc_active_set (dcc_t *, int) |
| int | dcc_active_get (dcc_t *) |
| int | dcc_offset_set (dcc_t *, int) |
| int | dcc_offset_get (dcc_t *) |
| int | dcc_size_set (dcc_t *, int) |
| int | dcc_size_get (dcc_t *) |
| int | dcc_filename_set (dcc_t *, const char *) |
| const char * | dcc_filename_get (dcc_t *) |
| dcc_type_t | dcc_type_get (dcc_t *) |
Variables | |
| dcc_t * | dccs |
| #define EKG_FORMAT_B_MASK 0x000000ffL |
| #define EKG_FORMAT_BOLD 0x02000000L |
| #define EKG_FORMAT_COLOR 0x01000000L |
| #define EKG_FORMAT_G_MASK 0x0000ff00L |
| #define EKG_FORMAT_ITALIC 0x04000000L |
| #define EKG_FORMAT_R_MASK 0x00ff0000L |
| #define EKG_FORMAT_REVERSE 0x10000000L |
| #define EKG_FORMAT_RGB_MASK 0x00ffffffL |
| #define EKG_FORMAT_UNDERLINE 0x08000000L |
| #define EKG_NO_BEEP 0 |
| #define EKG_NO_THEMEBIT 256 |
| #define EKG_TRY_BEEP 1 |
| typedef void(*) dcc_close_handler_t(struct dcc_s *) |
| enum dcc_type_t |
| enum disconnect_t |
| enum msgack_t |
| enum msgclass_t |
| int dcc_active_get | ( | dcc_t * | ) |
| int dcc_active_set | ( | dcc_t * | , | |
| int | ||||
| ) |
| dcc_t* dcc_add | ( | session_t * | session, | |
| const char * | uid, | |||
| dcc_type_t | type, | |||
| void * | priv | |||
| ) |
| int dcc_close | ( | dcc_t * | d | ) |
| dcc_close_handler_t dcc_close_handler_get | ( | dcc_t * | ) |
| int dcc_close_handler_set | ( | dcc_t * | , | |
| dcc_close_handler_t | ||||
| ) |
| const char* dcc_filename_get | ( | dcc_t * | ) |
| int dcc_filename_set | ( | dcc_t * | , | |
| const char * | ||||
| ) |
| int dcc_id_get | ( | dcc_t * | ) |
| int dcc_offset_get | ( | dcc_t * | ) |
| int dcc_offset_set | ( | dcc_t * | , | |
| int | ||||
| ) |
| void* dcc_private_get | ( | dcc_t * | ) |
| int dcc_private_set | ( | dcc_t * | , | |
| void * | ||||
| ) |
| int dcc_size_get | ( | dcc_t * | ) |
| int dcc_size_set | ( | dcc_t * | , | |
| int | ||||
| ) |
| time_t dcc_started_get | ( | dcc_t * | ) |
| dcc_type_t dcc_type_get | ( | dcc_t * | ) |
| const char* dcc_uid_get | ( | dcc_t * | ) |
| char* message_print | ( | const char * | session, | |
| const char * | sender, | |||
| const char ** | rcpts, | |||
| const char * | text, | |||
| const uint32_t * | format, | |||
| time_t | sent, | |||
| int | class, | |||
| const char * | seq, | |||
| int | dobeep, | |||
| int | secure | |||
| ) |
| int protocol_connected_emit | ( | const session_t * | s | ) |
| int protocol_disconnected_emit | ( | const session_t * | s, | |
| const char * | reason, | |||
| int | type | |||
| ) |
| void protocol_init | ( | ) |
Init communication between core and PROTOCOL plugins
Here, we register main communication channels like:
query_emit() - Function to emit specified events.
| int protocol_message_ack_emit | ( | const session_t * | s, | |
| const char * | rcpt, | |||
| const char * | seq, | |||
| int | status | |||
| ) |
| int protocol_message_emit | ( | const session_t * | s, | |
| const char * | uid, | |||
| char ** | rcpts, | |||
| const char * | text, | |||
| const uint32_t * | format, | |||
| time_t | sent, | |||
| int | class, | |||
| const char * | seq, | |||
| int | dobeep, | |||
| int | secure | |||
| ) |
| int protocol_status_emit | ( | const session_t * | s, | |
| const char * | uid, | |||
| int | status, | |||
| char * | descr, | |||
| time_t | when | |||
| ) |
| char* protocol_uid | ( | const char * | proto, | |
| const char * | target | |||
| ) |
| int protocol_xstate_emit | ( | const session_t * | s, | |
| const char * | uid, | |||
| int | state, | |||
| int | offstate | |||
| ) |
1.5.1