ekg2  GIT master
Definicje | Funkcje | Zmienne
Dokumentacja pliku scripts.c
#include "ekg2.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <dirent.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include "scripts.h"
Wykres zależności załączania dla scripts.c:

Definicje

#define s(x)   ((tmpstruct *) x)
 
#define NEXT_ARG(y)   temp->argv_type[temp->argc] = y; temp->argc++;
 

Funkcje

static void list_script_free (script_t *data)
 
static void scripts_add (script_t *new_)
 
static void scripts_remove (script_t *elem)
 
static void scriptlang_add (scriptlang_t *new_)
 
static void scriptlang_unlink (scriptlang_t *elem)
 
static int script_command_handlers (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
static gint script_timer_handlers (gint type, gpointer data)
 
static void script_var_changed (const char *var)
 
static int script_query_handlers (void *data, va_list ap)
 
static int script_handle_watch (int type, int fd, watch_type_t watch, void *data)
 
static int script_plugin_theme_init ()
 
static int scripts_autoload (scriptlang_t *scr)
 
static char * script_find_path (const char *name)
 
scriptlang_tscriptlang_from_ext (char *name)
 
int scriptlang_register (scriptlang_t *s)
 
int scriptlang_unregister (scriptlang_t *s)
 
int script_autorun (char *scriptname, int isautorun)
 
int script_reset (scriptlang_t *scr)
 
int script_list (scriptlang_t *s)
 
int script_var_list (script_t *scr)
 
int script_unload (script_t *scr)
 
script_tscript_find (scriptlang_t *s, char *name)
 
int script_unload_name (scriptlang_t *s, char *name)
 
int script_unload_lang (scriptlang_t *s)
 
int script_load (scriptlang_t *s, char *tname)
 
int script_variables_read ()
 
void script_variables_free ()
 
void script_variables_write ()
 
script_command_tscript_command_find (const char *name)
 
script_var_tscript_var_find (const char *name)
 
int script_command_unbind (script_command_t *temp, int free)
 
int script_query_unbind (script_query_t *temp, int free)
 
int script_plugin_destroy ()
 
int script_timer_unbind (script_timer_t *temp, int remove)
 
int script_watch_unbind (script_watch_t *temp, int remove)
 
int script_var_unbind (script_var_t *temp, int free)
 
script_var_tscript_var_add_full (scriptlang_t *s, script_t *scr, char *name, int type, char *value, void *handler)
 
script_var_tscript_var_add (scriptlang_t *s, script_t *scr, char *name, char *value, void *handler)
 
script_command_tscript_command_bind (scriptlang_t *s, script_t *scr, char *command, char *params, char *possibilities, void *handler)
 
script_plugin_tscript_plugin_init (scriptlang_t *s, script_t *scr, char *name, plugin_class_t pclass, void *handler)
 
script_timer_tscript_timer_bind (scriptlang_t *s, script_t *scr, int freq, void *handler)
 
script_watch_tscript_watch_add (scriptlang_t *s, script_t *scr, int fd, int type, void *handler, void *data)
 
script_query_tscript_query_bind (scriptlang_t *s, script_t *scr, char *qname, void *handler)
 
static int scripts_loaddir (scriptlang_t *s, const char *path)
 
int cmd_script (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
int script_postinit (void *data, va_list ap)
 
int scripts_init ()
 

Zmienne

script_tscripts
 
scriptlang_tscriptlang
 
static list_t script_timers
 
static list_t script_plugins
 
static list_t script_vars
 
static list_t script_queries
 
static list_t script_commands
 
static list_t script_watches
 

Dokumentacja definicji

◆ NEXT_ARG

#define NEXT_ARG (   y)    temp->argv_type[temp->argc] = y; temp->argc++;

◆ s

#define s (   x)    ((tmpstruct *) x)

Dokumentacja funkcji

◆ cmd_script()

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

◆ list_script_free()

static void list_script_free ( script_t data)
static

◆ script_autorun()

int script_autorun ( char *  scriptname,
int  isautorun 
)

◆ script_command_bind()

script_command_t* script_command_bind ( scriptlang_t s,
script_t scr,
char *  command,
char *  params,
char *  possibilities,
void *  handler 
)

◆ script_command_find()

script_command_t* script_command_find ( const char *  name)

◆ script_command_handlers()

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

◆ script_command_unbind()

int script_command_unbind ( script_command_t temp,
int  free 
)

◆ script_find()

script_t* script_find ( scriptlang_t s,
char *  name 
)

◆ script_find_path()

static char * script_find_path ( const char *  name)
static

◆ script_handle_watch()

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

◆ script_list()

int script_list ( scriptlang_t s)

◆ script_load()

int script_load ( scriptlang_t s,
char *  tname 
)

◆ script_plugin_destroy()

int script_plugin_destroy ( )

◆ script_plugin_init()

script_plugin_t* script_plugin_init ( scriptlang_t s,
script_t scr,
char *  name,
plugin_class_t  pclass,
void *  handler 
)

◆ script_plugin_theme_init()

static int script_plugin_theme_init ( )
static

◆ script_postinit()

int script_postinit ( void *  data,
va_list  ap 
)

◆ script_query_bind()

script_query_t* script_query_bind ( scriptlang_t s,
script_t scr,
char *  qname,
void *  handler 
)

◆ script_query_handlers()

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

◆ script_query_unbind()

int script_query_unbind ( script_query_t temp,
int  free 
)

◆ script_reset()

int script_reset ( scriptlang_t scr)

◆ script_timer_bind()

script_timer_t* script_timer_bind ( scriptlang_t s,
script_t scr,
int  freq,
void *  handler 
)

◆ script_timer_handlers()

static gint script_timer_handlers ( gint  type,
gpointer  data 
)
static

◆ script_timer_unbind()

int script_timer_unbind ( script_timer_t temp,
int  remove 
)

◆ script_unload()

int script_unload ( script_t scr)

◆ script_unload_lang()

int script_unload_lang ( scriptlang_t s)

◆ script_unload_name()

int script_unload_name ( scriptlang_t s,
char *  name 
)

◆ script_var_add()

script_var_t* script_var_add ( scriptlang_t s,
script_t scr,
char *  name,
char *  value,
void *  handler 
)

◆ script_var_add_full()

script_var_t* script_var_add_full ( scriptlang_t s,
script_t scr,
char *  name,
int  type,
char *  value,
void *  handler 
)

◆ script_var_changed()

static void script_var_changed ( const char *  var)
static

◆ script_var_find()

script_var_t* script_var_find ( const char *  name)

◆ script_var_list()

int script_var_list ( script_t scr)

◆ script_var_unbind()

int script_var_unbind ( script_var_t temp,
int  free 
)

◆ script_variables_free()

void script_variables_free ( )

◆ script_variables_read()

int script_variables_read ( )

◆ script_variables_write()

void script_variables_write ( )

◆ script_watch_add()

script_watch_t* script_watch_add ( scriptlang_t s,
script_t scr,
int  fd,
int  type,
void *  handler,
void *  data 
)

◆ script_watch_unbind()

int script_watch_unbind ( script_watch_t temp,
int  remove 
)

◆ scriptlang_add()

static void scriptlang_add ( scriptlang_t new_)
static

◆ scriptlang_from_ext()

scriptlang_t* scriptlang_from_ext ( char *  name)

◆ scriptlang_register()

int scriptlang_register ( scriptlang_t s)

◆ scriptlang_unlink()

static void scriptlang_unlink ( scriptlang_t elem)
static

◆ scriptlang_unregister()

int scriptlang_unregister ( scriptlang_t s)

◆ scripts_add()

static void scripts_add ( script_t new_)
static

◆ scripts_autoload()

static int scripts_autoload ( scriptlang_t scr)
static

◆ scripts_init()

int scripts_init ( )

◆ scripts_loaddir()

static int scripts_loaddir ( scriptlang_t s,
const char *  path 
)
static

◆ scripts_remove()

static void scripts_remove ( script_t elem)
static

Dokumentacja zmiennych

◆ script_commands

list_t script_commands
static

◆ script_plugins

list_t script_plugins
static

◆ script_queries

list_t script_queries
static

◆ script_timers

list_t script_timers
static

◆ script_vars

list_t script_vars
static

◆ script_watches

list_t script_watches
static

◆ scriptlang

◆ scripts

script_t* scripts