#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>
Idź do kodu źródłowego tego pliku.
|
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
} |
|
|
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 mclass, 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 mclass, 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 *) |
|
#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 /* 0x00BBGGRR */ |
#define EKG_FORMAT_UNDERLINE 0x08000000L |
#define EKG_NO_THEMEBIT 256 |
typedef void(* dcc_close_handler_t)(struct dcc_s *) |
Wartości wyliczeń |
---|
DCC_NONE |
|
DCC_SEND |
|
DCC_GET |
|
DCC_VOICE |
|
Wartości wyliczeń |
---|
EKG_DISCONNECT_USER |
|
EKG_DISCONNECT_NETWORK |
|
EKG_DISCONNECT_FORCED |
|
EKG_DISCONNECT_FAILURE |
|
EKG_DISCONNECT_STOPPED |
|
Wartości wyliczeń |
---|
EKG_ACK_DELIVERED |
|
EKG_ACK_QUEUED |
|
EKG_ACK_DROPPED |
|
EKG_ACK_TEMPFAIL |
|
EKG_ACK_UNKNOWN |
|
EKG_ACK_MAX |
|
Wartości wyliczeń |
---|
EKG_MSGCLASS_MESSAGE |
|
EKG_MSGCLASS_CHAT |
|
EKG_MSGCLASS_SYSTEM |
|
EKG_MSGCLASS_LOG |
|
EKG_MSGCLASS_NOT2US |
|
EKG_MSGCLASS_SENT |
|
EKG_MSGCLASS_SENT_CHAT |
|
EKG_MSGCLASS_SENT_LOG |
|
EKG_MSGCLASS_PRIV_STATUS |
|
int dcc_active_get |
( |
dcc_t * |
| ) |
|
int dcc_active_set |
( |
dcc_t * |
, |
|
|
int |
|
|
) |
| |
int dcc_close |
( |
dcc_t * |
d | ) |
|
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 * |
| ) |
|
char* message_print |
( |
const char * |
session, |
|
|
const char * |
sender, |
|
|
const char ** |
rcpts, |
|
|
const char * |
text, |
|
|
const uint32_t * |
format, |
|
|
time_t |
sent, |
|
|
int |
mclass, |
|
|
const char * |
seq, |
|
|
int |
dobeep, |
|
|
int |
secure |
|
) |
| |
protocol_init()
Init communication between core and PROTOCOL plugins
Here, we register main communication channels like:
- status changes: PROTOCOL_STATUS
- message I/O: PROTOCOL_MESSAGE
- acknowledge of messages: PROTOCOL_MESSAGE_ACK
- misc user events like typing notifies:PROTOCOL_XSTATE
- session connection/disconnection: PROTOCOL_CONNECTED and PROTOCOL_DISCONNECTED
- roster changes: USERLIST_ADDED and USERLIST_REMOVED and USERLIST_RENAMED
- Zobacz również
- query_connect() - Function to add listener on specified events.
-
query_emit() - Function to emit specified events.
int protocol_message_emit |
( |
const session_t * |
s, |
|
|
const char * |
uid, |
|
|
char ** |
rcpts, |
|
|
const char * |
text, |
|
|
const uint32_t * |
format, |
|
|
time_t |
sent, |
|
|
int |
mclass, |
|
|
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 |
|
) |
| |