ekg2
GIT master
|
#include "ekg2.h"
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include "zlib.h"
#include "jabber.h"
#include "jabber-ssl.h"
Definicje | |
#define | ZLIB_BUF_SIZE 1024 |
Funkcje | |
static char * | jabber_gpg_strip_header_footer (char *data) |
char * | jabber_openpgp (session_t *s, const char *fromto, enum jabber_opengpg_type_t way, char *message, char *key, char **error) |
char * | jabber_zlib_compress (const char *buf, int *len) |
char * | jabber_zlib_decompress (const char *buf, int *len) |
int | JABBER_COMMIT_DATA (watch_t *w) |
char * | jabber_attr (char **atts, const char *att) |
char * | jabber_escape (const char *text) |
char * | jabber_unescape (const char *text) |
char * | tlen_encode (const char *what) |
char * | tlen_decode (const char *what) |
int | jabber_handle_write (int type, int fd, const char *watch, void *data) |
int | jabber_conversation_find (jabber_private_t *j, const char *uid, const char *subject, const char *thread, jabber_conversation_t **result, const int can_add) |
jabber_conversation_t * | jabber_conversation_get (jabber_private_t *j, const int n) |
char * | jabber_thread_gen (jabber_private_t *j, const char *uid) |
static guint32 | jabber_formatchar (const char c) |
static int | jabber_fc_check (const char *curr, const char *beginning, const int mode) |
guint32 * | jabber_msg_format (const char *plaintext, const xmlnode_t *html) |
#define ZLIB_BUF_SIZE 1024 |
char* jabber_attr | ( | char ** | atts, |
const char * | att | ||
) |
int JABBER_COMMIT_DATA | ( | watch_t * | w | ) |
int jabber_conversation_find | ( | jabber_private_t * | j, |
const char * | uid, | ||
const char * | subject, | ||
const char * | thread, | ||
jabber_conversation_t ** | result, | ||
const int | can_add | ||
) |
jabber_conversation_find() searches session's conversation list for matching one.
j | - private data of session. |
uid | - UID of recipient. |
subject | - message subject (for non-threaded conversations). |
thread | - jabber thread ID, if threaded. |
result | - place to write address of jabber_conversation_t or NULL, if not needed. |
can_add | - if nonzero, we can create new conversation, if none match. |
jabber_conversation_t* jabber_conversation_get | ( | jabber_private_t * | j, |
const int | n | ||
) |
jabber_conversation_get() is used to get conversation by its Reply-ID.
j | - private data of session. |
n | - Reply-ID. |
char* jabber_escape | ( | const char * | text | ) |
Convert charset from config_console_charset to "utf-8"
Escape xml chars using xml_escape()
text | - text to reencode+escape |
|
inlinestatic |
|
inlinestatic |
|
static |
int jabber_handle_write | ( | int | type, |
int | fd, | ||
const char * | watch, | ||
void * | data | ||
) |
guint32* jabber_msg_format | ( | const char * | plaintext, |
const xmlnode_t * | html | ||
) |
char* jabber_openpgp | ( | session_t * | s, |
const char * | fromto, | ||
enum jabber_opengpg_type_t | way, | ||
char * | message, | ||
char * | key, | ||
char ** | error | ||
) |
char* jabber_thread_gen | ( | jabber_private_t * | j, |
const char * | uid | ||
) |
jabber_thread_gen() generates new thread-ID for outgoing messages.
j | - private data of session. |
uid | - recipient UID. |
char* jabber_unescape | ( | const char * | text | ) |
Convert charset from "utf-8" to config_console_charset.
xml escaped chars are already changed by expat. so we don't care about them.
text | - text to reencode. |
char* jabber_zlib_compress | ( | const char * | buf, |
int * | len | ||
) |
char* jabber_zlib_decompress | ( | const char * | buf, |
int * | len | ||
) |
char* tlen_decode | ( | const char * | what | ) |
Decode string ,,encoded'' with urldecode [in ISO-8859-2] and convert charset to config_console_charset
what | - string to decode. |
char* tlen_encode | ( | const char * | what | ) |
Convert charset from config_console_charset to ISO-8859-2
,,encode'' string with urlencode
what | - string to encode. |