| 
    ekg2
    GIT master
    
   | 
 
#include "ekg2.h"#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>
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 | |
| static int | httprc_xajax_plugin_destroy () | 
| client_t * | find_client_by_cookie (list_t clients, char *cookie) | 
| char * | generate_cookie (void) | 
| char * | escape_single_quote (char *p) | 
| char * | http_fstring (int winid, char *parent, const fstring_t *line) | 
| 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) | 
Zmienne | |
| plugin_t | httprc_xajax_plugin = { .name = "httprc_xajax", .pclass = PLUGIN_UI , .destroy = httprc_xajax_plugin_destroy, .theme_init = NULL } | 
| 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 | ) | 
| char* generate_cookie | ( | void | ) | 
| char* http_fstring | ( | int | winid, | 
| char * | parent, | ||
| const fstring_t * | line | ||
| ) | 
| 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 | ) | 
| plugin_t httprc_xajax_plugin = { .name = "httprc_xajax", .pclass = PLUGIN_UI , .destroy = httprc_xajax_plugin_destroy, .theme_init = NULL } | 
 1.8.13