ekg2
|
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <time.h>
#include <stdarg.h>
#include <stdlib.h>
#include <ekg/debug.h>
#include <ekg/dynstuff.h>
#include <ekg/log.h>
#include <ekg/plugins.h>
#include <ekg/strings.h>
#include <ekg/stuff.h>
#include <ekg/userlist.h>
#include <ekg/vars.h>
#include <ekg/windows.h>
#include <ekg/xmalloc.h>
Struktury danych | |
struct | ncurses_window_t |
struct | client_t |
Definicje | |
#define | LOCALHOST "localhost" |
#define | HTTPRCXAJAX_DEFPORT "8080" |
#define | ISBOLD (att & FSTR_BOLD) |
#define | ISBLINK (att & FSTR_BLINK) |
#define | ISUNDERLINE (att & FSTR_UNDERLINE) |
#define | ISREVERSE (att & FSTR_REVERSE) |
#define | ISNORMAL (att & FSTR_NORMAL) |
#define | ISONLYNORMAL ((att & FSTR_NORMAL) && !(att & (FSTR_BOLD|FSTR_BLINK|FSTR_REVERSE|FSTR_UNDERLINE))) |
#define | FORE (att & FSTR_FOREMASK) |
#define | BACK ((att & FSTR_BACKMASK)>>3) |
#define | ADDJS(x) string_append(asc, x) |
#define | ADDJSf(x...) string_append_format(asc, x) |
#define | httprc_write(watch, args...) do { string_append_format(watch->buf, args); } while (0) |
#define | httprc_write2(watch, str) do { string_append_n(watch->buf, str, -1); } while (0) |
#define | httprc_write3(watch, str, len) do { string_append_raw(watch->buf, str, len); } while (0) |
#define | HTTP_HEADER(ver, scode, eheaders) |
#define | WATCH_FIND(w, fd) |
Wyliczenia | |
enum | http_method_t { HTTP_METHOD_UNKNOWN = -1, HTTP_METHOD_OPTIONS = 0, HTTP_METHOD_GET, HTTP_METHOD_HEAD, HTTP_METHOD_POST, HTTP_METHOD_PUT, HTTP_METHOD_DELETE, HTTP_METHOD_TRACE, HTTP_METHOD_CONNECT } |
Funkcje | |
PLUGIN_DEFINE (httprc_xajax, PLUGIN_UI, NULL) | |
client_t * | find_client_by_cookie (list_t clients, char *cookie) |
char * | generate_cookie (void) |
char * | escape_single_quote (char *p, int inuni) |
char * | http_fstring (int winid, char *parent, fstring_t *line, int inuni) |
int | http_watch_send (int type, int fd, const char *watch, void *data) |
int | httprc_xajax_def_action (void *data, va_list ap) |
const char * | http_timestamp (time_t t) |
int | http_watch_read (int type, int fd, watch_type_t watch, void *data) |
int | http_watch_accept (int type, int fd, watch_type_t watch, void *data) |
int | httprc_xajax_plugin_init (int prio) |
static int | httprc_xajax_plugin_destroy () |
Zmienne | |
list_t | clients = NULL |
#define ADDJS | ( | x | ) | string_append(asc, x) |
#define ADDJSf | ( | x... | ) | string_append_format(asc, x) |
#define BACK ((att & FSTR_BACKMASK)>>3) |
#define FORE (att & FSTR_FOREMASK) |
#define HTTP_HEADER | ( | ver, | |
scode, | |||
eheaders | |||
) |
#define httprc_write | ( | watch, | |
args... | |||
) | do { string_append_format(watch->buf, args); } while (0) |
#define httprc_write2 | ( | watch, | |
str | |||
) | do { string_append_n(watch->buf, str, -1); } while (0) |
#define httprc_write3 | ( | watch, | |
str, | |||
len | |||
) | do { string_append_raw(watch->buf, str, len); } while (0) |
#define HTTPRCXAJAX_DEFPORT "8080" |
#define ISBLINK (att & FSTR_BLINK) |
#define ISBOLD (att & FSTR_BOLD) |
#define ISNORMAL (att & FSTR_NORMAL) |
#define ISONLYNORMAL ((att & FSTR_NORMAL) && !(att & (FSTR_BOLD|FSTR_BLINK|FSTR_REVERSE|FSTR_UNDERLINE))) |
#define ISREVERSE (att & FSTR_REVERSE) |
#define ISUNDERLINE (att & FSTR_UNDERLINE) |
#define LOCALHOST "localhost" |
#define WATCH_FIND | ( | w, | |
fd | |||
) |
enum http_method_t |
char* escape_single_quote | ( | char * | p, |
int | inuni | ||
) |
char* generate_cookie | ( | void | ) |
char* http_fstring | ( | int | winid, |
char * | parent, | ||
fstring_t * | line, | ||
int | inuni | ||
) |
const char* http_timestamp | ( | time_t | t | ) |
int http_watch_accept | ( | int | type, |
int | fd, | ||
watch_type_t | watch, | ||
void * | data | ||
) |
int http_watch_read | ( | int | type, |
int | fd, | ||
watch_type_t | watch, | ||
void * | data | ||
) |
int http_watch_send | ( | int | type, |
int | fd, | ||
const char * | watch, | ||
void * | data | ||
) |
int httprc_xajax_def_action | ( | void * | data, |
va_list | ap | ||
) |
|
static |
int httprc_xajax_plugin_init | ( | int | prio | ) |