ekg2
Struktury danych | Definicje | Definicje typów | Wyliczenia | Funkcje | Zmienne
Dokumentacja pliku plugins/feed/nntp.c
#include "ekg2-config.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <ekg/commands.h>
#include <ekg/debug.h>
#include <ekg/dynstuff.h>
#include <ekg/plugins.h>
#include <ekg/protocol.h>
#include <ekg/vars.h>
#include <ekg/stuff.h>
#include <ekg/userlist.h>
#include <ekg/xmalloc.h>
#include <ekg/queries.h>
#include "feed.h"

Struktury danych

struct  nntp_article_t
struct  nntp_newsgroup_t
struct  nntp_private_t
struct  nntp_children_t
struct  nntp_handler_t

Definicje

#define NNTP_HANDLER(x)   static int x(session_t *s, int code, char *str, void *data)

Definicje typów

typedef int(* nntp_handler )(session_t *, int, char *, void *)

Wyliczenia

enum  nntp_newsgroup_state_t { NNTP_IDLE = 0, NNTP_CHECKING, NNTP_DOWNLOADING }

Funkcje

static nntp_article_tnntp_article_find (nntp_newsgroup_t *group, int articleid, char *msgid)
static nntp_newsgroup_tnntp_newsgroup_find (session_t *s, const char *name)
static void nntp_handle_disconnect (session_t *s, const char *reason, int type)
static void nntp_children_died (struct child_s *c, int pid, const char *name, int status, void *data)
 NNTP_HANDLER (nntp_help_process)
static char hextochar (char t)
 NNTP_HANDLER (nntp_message_process)
 NNTP_HANDLER (nntp_auth_process)
 NNTP_HANDLER (nntp_null_process)
 NNTP_HANDLER (nntp_group_process)
 NNTP_HANDLER (nntp_message_error)
 NNTP_HANDLER (nntp_group_error)
 NNTP_HANDLER (nntp_xover_process)
static void nntp_string_append (session_t *s, const char *str)
static nntp_handler_tnntp_handler_find (int code)
static int nntp_handle_stream (int type, int fd, const char *watch, void *data)
static int nntp_handle_connect (int type, int fd, watch_type_t watch, void *data)
static int nntp_command_disconnect (const char *name, const char **params, session_t *session, const char *target, int quiet)
static int nntp_command_connect (const char *name, const char **params, session_t *session, const char *target, int quiet)
static int nntp_command_raw (const char *name, const char **params, session_t *session, const char *target, int quiet)
static int nntp_command_nextprev (const char *name, const char **params, session_t *session, const char *target, int quiet)
static int nntp_command_get (const char *name, const char **params, session_t *session, const char *target, int quiet)
static int nntp_command_check (const char *name, const char **params, session_t *session, const char *target, int quiet)
static int nntp_command_subscribe (const char *name, const char **params, session_t *session, const char *target, int quiet)
static int nntp_command_unsubscribe (const char *name, const char **params, session_t *session, const char *target, int quiet)
void * nntp_protocol_init ()
void nntp_protocol_deinit (void *priv)
void nntp_init ()

Zmienne

nntp_handler_t nntp_handlers []

Dokumentacja definicji

#define NNTP_HANDLER (   x)    static int x(session_t *s, int code, char *str, void *data)

Dokumentacja definicji typów

typedef int(* nntp_handler)(session_t *, int, char *, void *)

Dokumentacja typów wyliczanych

Wartości wyliczeń:
NNTP_IDLE 
NNTP_CHECKING 
NNTP_DOWNLOADING 

Dokumentacja funkcji

static char hextochar ( char  t) [static]
static nntp_article_t* nntp_article_find ( nntp_newsgroup_t group,
int  articleid,
char *  msgid 
) [static]
static void nntp_children_died ( struct child_s c,
int  pid,
const char *  name,
int  status,
void *  data 
) [static]
static int nntp_command_check ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
) [static]
static int nntp_command_connect ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
) [static]
static int nntp_command_disconnect ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
) [static]
static int nntp_command_get ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
) [static]
static int nntp_command_nextprev ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
) [static]
static int nntp_command_raw ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
) [static]
static int nntp_command_subscribe ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
) [static]
static int nntp_command_unsubscribe ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
) [static]
static int nntp_handle_connect ( int  type,
int  fd,
watch_type_t  watch,
void *  data 
) [static]
static void nntp_handle_disconnect ( session_t s,
const char *  reason,
int  type 
) [static]
static int nntp_handle_stream ( int  type,
int  fd,
const char *  watch,
void *  data 
) [static]
NNTP_HANDLER ( nntp_help_process  )
NNTP_HANDLER ( nntp_auth_process  )
NNTP_HANDLER ( nntp_null_process  )
NNTP_HANDLER ( nntp_message_error  )
NNTP_HANDLER ( nntp_group_process  )
NNTP_HANDLER ( nntp_group_error  )
NNTP_HANDLER ( nntp_xover_process  )
NNTP_HANDLER ( nntp_message_process  )
static nntp_handler_t* nntp_handler_find ( int  code) [static]
void nntp_init ( )
static nntp_newsgroup_t* nntp_newsgroup_find ( session_t s,
const char *  name 
) [static]
void nntp_protocol_deinit ( void *  priv)
void* nntp_protocol_init ( )
static void nntp_string_append ( session_t s,
const char *  str 
) [static]

Dokumentacja zmiennych

Wartość początkowa:
 {
        {100, nntp_help_process,        1, NULL}, 
        {200, nntp_auth_process,        0, NULL},
        {201, nntp_auth_process,        0, NULL},
        {281, nntp_auth_process,        0, NULL}, 
        {381, nntp_auth_process,        0, NULL}, 
        {480, nntp_auth_process,        0, NULL}, 

        {220, nntp_message_process,     1, NULL},
        {221, nntp_message_process,     1, NULL}, 
        {222, nntp_message_process,     1, NULL},
        {423, nntp_message_error,       0, NULL}, 

        {211, nntp_group_process,       0, NULL}, 
        {411, nntp_group_error,         0, NULL}, 

        {224, nntp_xover_process,       1, "xover"}, 

        {282, nntp_null_process,        1, "xgitle"}, 
        {-1, NULL,                      0, NULL},
}
 All Struktury Danych Pliki Funkcje Zmienne Definicje typów Wyliczenia Wartości wyliczeń Definicje