ekg2  GIT master
Struktury danych | Definicje | Definicje typów | Wyliczenia | Funkcje | Zmienne
Dokumentacja pliku nntp.c
#include "ekg2.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>
Wykres zależności załączania dla nntp.c:

Struktury danych

struct  feed_private_t
 
struct  nntp_article_t
 
struct  nntp_newsgroup_t
 
struct  nntp_private_t
 
struct  nntp_children_t
 
struct  nntp_handler_t
 

Definicje

#define NNTP_ONLY   SESSION_MUSTBELONG | SESSION_MUSTHASPRIVATE
 
#define NNTP_FLAGS   NNTP_ONLY | SESSION_MUSTBECONNECTED
 
#define NNTP_FLAGS_TARGET   NNTP_FLAGS | COMMAND_ENABLEREQPARAMS | COMMAND_PARAMASTARGET
 
#define nntp_private(s)   ((s && s->priv) ? ((feed_private_t *) s->priv)->priv_data : NULL)
 
#define EKG_WINACT_RSS   EKG_WINACT_IMPORTANT
 
#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 int nntp_theme_init ()
 
static int nntp_plugin_destroy ()
 
void * nntp_protocol_init ()
 
void nntp_protocol_deinit (void *priv)
 
void nntp_init ()
 
static int nntp_validate_uid (void *data, va_list ap)
 
static int nntp_session_init (void *data, va_list ap)
 
static int nntp_session_deinit (void *data, va_list ap)
 
static int nntp_message (void *data, va_list ap)
 
void nntp_set_status (userlist_t *u, int status)
 
void nntp_set_descr (userlist_t *u, char *descr)
 
void nntp_set_statusdescr (userlist_t *u, int status, char *descr)
 
 __attribute__ ((visibility("default")))
 
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 (GPid pid, gint status, gpointer data)
 
static int nntp_help_process (session_t *s, int code, char *str, void *data)
 
static char hextochar (char t)
 
static int nntp_message_process (session_t *s, int code, char *str, void *data)
 
static int nntp_auth_process (session_t *s, int code, char *str, void *data)
 
static int nntp_null_process (session_t *s, int code, char *str, void *data)
 
static int nntp_group_process (session_t *s, int code, char *str, void *data)
 
static int nntp_message_error (session_t *s, int code, char *str, void *data)
 
static int nntp_group_error (session_t *s, int code, char *str, void *data)
 
static int nntp_xover_process (session_t *s, int code, char *str, void *data)
 
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)
 

Zmienne

plugin_t nntp_plugin = { .name = "nntp", .pclass = PLUGIN_PROTOCOL , .destroy = nntp_plugin_destroy, .theme_init = nntp_theme_init }
 
static plugins_params_t nntp_plugin_vars []
 
nntp_handler_t nntp_handlers []
 

Dokumentacja definicji

◆ EKG_WINACT_RSS

#define EKG_WINACT_RSS   EKG_WINACT_IMPORTANT

◆ NNTP_FLAGS

#define NNTP_FLAGS   NNTP_ONLY | SESSION_MUSTBECONNECTED

◆ NNTP_FLAGS_TARGET

#define NNTP_FLAGS_TARGET   NNTP_FLAGS | COMMAND_ENABLEREQPARAMS | COMMAND_PARAMASTARGET

◆ NNTP_HANDLER

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

◆ NNTP_ONLY

#define NNTP_ONLY   SESSION_MUSTBELONG | SESSION_MUSTHASPRIVATE

◆ nntp_private

#define nntp_private (   s)    ((s && s->priv) ? ((feed_private_t *) s->priv)->priv_data : NULL)

Dokumentacja definicji typów

◆ nntp_handler

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

Dokumentacja typów wyliczanych

◆ nntp_newsgroup_state_t

Wartości wyliczeń
NNTP_IDLE 
NNTP_CHECKING 
NNTP_DOWNLOADING 

Dokumentacja funkcji

◆ __attribute__()

__attribute__ ( (visibility("default"))  )

◆ hextochar()

static char hextochar ( char  t)
static

◆ nntp_article_find()

static nntp_article_t* nntp_article_find ( nntp_newsgroup_t group,
int  articleid,
char *  msgid 
)
static

◆ nntp_auth_process()

static int nntp_auth_process ( session_t s,
int  code,
char *  str,
void *  data 
)
static

◆ nntp_children_died()

static void nntp_children_died ( GPid  pid,
gint  status,
gpointer  data 
)
static

◆ nntp_command_check()

static int nntp_command_check ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)
static

◆ nntp_command_connect()

static int nntp_command_connect ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)
static

◆ nntp_command_disconnect()

static int nntp_command_disconnect ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)
static

◆ nntp_command_get()

static int nntp_command_get ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)
static

◆ nntp_command_nextprev()

static int nntp_command_nextprev ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)
static

◆ nntp_command_raw()

static int nntp_command_raw ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)
static

◆ nntp_command_subscribe()

static int nntp_command_subscribe ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)
static

◆ nntp_command_unsubscribe()

static int nntp_command_unsubscribe ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)
static

◆ nntp_group_error()

static int nntp_group_error ( session_t s,
int  code,
char *  str,
void *  data 
)
static

◆ nntp_group_process()

static int nntp_group_process ( session_t s,
int  code,
char *  str,
void *  data 
)
static

◆ nntp_handle_connect()

static int nntp_handle_connect ( int  type,
int  fd,
watch_type_t  watch,
void *  data 
)
static

◆ nntp_handle_disconnect()

static void nntp_handle_disconnect ( session_t s,
const char *  reason,
int  type 
)
static

◆ nntp_handle_stream()

static int nntp_handle_stream ( int  type,
int  fd,
const char *  watch,
void *  data 
)
static

◆ nntp_handler_find()

static nntp_handler_t* nntp_handler_find ( int  code)
static

◆ nntp_help_process()

static int nntp_help_process ( session_t s,
int  code,
char *  str,
void *  data 
)
static

◆ nntp_init()

void nntp_init ( )

◆ nntp_message()

static int nntp_message ( void *  data,
va_list  ap 
)
static

◆ nntp_message_error()

static int nntp_message_error ( session_t s,
int  code,
char *  str,
void *  data 
)
static

◆ nntp_message_process()

static int nntp_message_process ( session_t s,
int  code,
char *  str,
void *  data 
)
static

◆ nntp_newsgroup_find()

static nntp_newsgroup_t* nntp_newsgroup_find ( session_t s,
const char *  name 
)
static

◆ nntp_null_process()

static int nntp_null_process ( session_t s,
int  code,
char *  str,
void *  data 
)
static

◆ nntp_plugin_destroy()

static int nntp_plugin_destroy ( )
static

◆ nntp_protocol_deinit()

void nntp_protocol_deinit ( void *  priv)

◆ nntp_protocol_init()

void * nntp_protocol_init ( )

◆ nntp_session_deinit()

static int nntp_session_deinit ( void *  data,
va_list  ap 
)
static

◆ nntp_session_init()

static int nntp_session_init ( void *  data,
va_list  ap 
)
static

◆ nntp_set_descr()

void nntp_set_descr ( userlist_t u,
char *  descr 
)

◆ nntp_set_status()

void nntp_set_status ( userlist_t u,
int  status 
)

◆ nntp_set_statusdescr()

void nntp_set_statusdescr ( userlist_t u,
int  status,
char *  descr 
)

◆ nntp_string_append()

static void nntp_string_append ( session_t s,
const char *  str 
)
static

◆ nntp_theme_init()

static int nntp_theme_init ( )
static

◆ nntp_validate_uid()

static int nntp_validate_uid ( void *  data,
va_list  ap 
)
static

◆ nntp_xover_process()

static int nntp_xover_process ( session_t s,
int  code,
char *  str,
void *  data 
)
static

Dokumentacja zmiennych

◆ nntp_handlers

nntp_handler_t nntp_handlers[]
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},
}
static int nntp_xover_process(session_t *s, int code, char *str, void *data)
Definition: nntp.c:796
static int nntp_group_error(session_t *s, int code, char *str, void *data)
Definition: nntp.c:783
static int nntp_message_error(session_t *s, int code, char *str, void *data)
Definition: nntp.c:774
static int nntp_message_process(session_t *s, int code, char *str, void *data)
Definition: nntp.c:536
#define NULL
Definition: oralog.c:49
static int nntp_group_process(session_t *s, int code, char *str, void *data)
Definition: nntp.c:746
static int nntp_null_process(session_t *s, int code, char *str, void *data)
Definition: nntp.c:741
static int nntp_auth_process(session_t *s, int code, char *str, void *data)
Definition: nntp.c:712
static int nntp_help_process(session_t *s, int code, char *str, void *data)
Definition: nntp.c:516

◆ nntp_plugin

plugin_t nntp_plugin = { .name = "nntp", .pclass = PLUGIN_PROTOCOL , .destroy = nntp_plugin_destroy, .theme_init = nntp_theme_init }

◆ nntp_plugin_vars

plugins_params_t nntp_plugin_vars[]
static
Wartość początkowa:
= {
{ "alias" , NULL , 0 , VAR_STR , NULL , NULL },
{ "display_mode" , "3" , 0 , VAR_INT , NULL , NULL },
{ "display_headers" , "From: Date: Newsgroups: Subject: User-Agent: NNTP-Posting-Host:" , 0 , VAR_STR , NULL , NULL },
{ "make_window" , "2" , 0 , VAR_INT , NULL , NULL },
{ "auto_connect" , "0" , 0 , VAR_BOOL , NULL , NULL },
{ "username" , NULL , 0 , VAR_STR , NULL , NULL },
{ "password" , NULL , 1 , VAR_STR , NULL , NULL },
{ "port" , "119" , 0 , VAR_INT , NULL , NULL },
{ "server" , NULL , 0 , VAR_STR , NULL , NULL },
{ NULL, NULL, 0, -1, NULL }
}
Definition: vars.h:35
Definition: vars.h:33
#define NULL
Definition: oralog.c:49
Definition: vars.h:34