#include <glib.h>
#include <gmodule.h>
#include <sys/types.h>
#include <stdarg.h>
#include "dynstuff.h"
#include "sessions.h"
Idź do kodu źródłowego tego pliku.
|
| #define | EKG_ABI_VER 5798 /* git rev-list master | wc -l */ |
| |
| #define | EXPORT __attribute__ ((visibility("default"))) G_MODULE_EXPORT |
| |
| #define | PLUGIN_VAR_ADD(name, type, value, secret, notify) { name, value, secret, type, notify, NULL } |
| |
| #define | PLUGIN_VAR_ADD_MAP(name, type, value, secret, notify, map) { name, value, secret, type, notify, map } |
| |
| #define | PLUGIN_VAR_END() { NULL, NULL, 0, -1, NULL } |
| |
| #define | PLUGIN_CHECK_VER(name) { if (!plugin_abi_version(EKG_ABI_VER, name)) return -1; } |
| |
| #define | PLUGIN_DEFINE(x, y, z) |
| |
| #define | QUERY(x) int x(void *data, va_list ap) |
| |
| #define | QUERIES_BUCKETS 64 |
| |
|
| enum | plugin_class_t {
PLUGIN_ANY = 0,
PLUGIN_GENERIC,
PLUGIN_PROTOCOL,
PLUGIN_UI,
PLUGIN_LOG,
PLUGIN_SCRIPTING,
PLUGIN_AUDIO,
PLUGIN_CODEC,
PLUGIN_CRYPT,
PLUGIN_ANY = 0,
PLUGIN_GENERIC,
PLUGIN_PROTOCOL,
PLUGIN_UI,
PLUGIN_LOG,
PLUGIN_SCRIPTING,
PLUGIN_AUDIO,
PLUGIN_CODEC,
PLUGIN_CRYPT
} |
| |
|
| int | plugin_abi_version (int plugin_abi_ver, const char *plugin_name) |
| |
| int | plugin_load (const char *name, int prio, int quiet) |
| |
| int | plugin_unload (plugin_t *) |
| |
| int | plugin_register (plugin_t *, int prio) |
| |
| int | plugin_unregister (plugin_t *) |
| |
| plugin_t * | plugin_find (const char *name) |
| |
| plugin_t * | plugin_find_uid (const char *uid) |
| |
| int | have_plugin_of_class (plugin_class_t pclass) |
| |
| int | plugin_var_add (plugin_t *pl, const char *name, int type, const char *value, int secret, plugin_notify_func_t *notify) |
| |
| int | plugin_var_find (plugin_t *pl, const char *name) |
| |
| void | plugins_unlink (plugin_t *pl) |
| |
| int | query_register (const char *name,...) |
| |
| query_t * | query_connect (plugin_t *plugin, const char *name, query_handler_func_t *handler, void *data) |
| |
| int | query_emit (plugin_t *, const char *,...) |
| |
| int | query_free (query_t *g) |
| |
| void | queries_reconnect () |
| |
| void | queries_list_destroy (query_t **kk) |
| |
| void | registered_queries_free () |
| |
◆ EKG_ABI_VER
| #define EKG_ABI_VER 5798 /* git rev-list master | wc -l */ |
◆ EXPORT
| #define EXPORT __attribute__ ((visibility("default"))) G_MODULE_EXPORT |
◆ PLUGIN_CHECK_VER
◆ PLUGIN_DEFINE
| #define PLUGIN_DEFINE |
( |
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Wartość:static int x##_plugin_destroy(); \
\
plugin_t x##_plugin = { \
.name = #x, \
.pclass = y, \
.destroy = x##_plugin_destroy, \
.theme_init = z \
}
◆ PLUGIN_VAR_ADD
| #define PLUGIN_VAR_ADD |
( |
|
name, |
|
|
|
type, |
|
|
|
value, |
|
|
|
secret, |
|
|
|
notify |
|
) |
| { name, value, secret, type, notify, NULL } |
◆ PLUGIN_VAR_ADD_MAP
| #define PLUGIN_VAR_ADD_MAP |
( |
|
name, |
|
|
|
type, |
|
|
|
value, |
|
|
|
secret, |
|
|
|
notify, |
|
|
|
map |
|
) |
| { name, value, secret, type, notify, map } |
◆ PLUGIN_VAR_END
◆ QUERIES_BUCKETS
| #define QUERIES_BUCKETS 64 |
◆ QUERY
| #define QUERY |
( |
|
x | ) |
int x(void *data, va_list ap) |
◆ plugin_destroy_func_t
| typedef int(* plugin_destroy_func_t) (void) |
◆ plugin_notify_func_t
| typedef void() plugin_notify_func_t(session_t *, const char *) |
◆ plugin_t
◆ plugin_theme_init_func_t
| typedef int(* plugin_theme_init_func_t) (void) |
◆ query_handler_func_t
| typedef int query_handler_func_t(void *data, va_list ap) |
◆ query_t
◆ plugin_class_t
| Wartości wyliczeń |
|---|
| PLUGIN_ANY | |
| PLUGIN_GENERIC | |
| PLUGIN_PROTOCOL | |
| PLUGIN_UI | |
| PLUGIN_LOG | |
| PLUGIN_SCRIPTING | |
| PLUGIN_AUDIO | |
| PLUGIN_CODEC | |
| PLUGIN_CRYPT | |
| PLUGIN_ANY | |
| PLUGIN_GENERIC | |
| PLUGIN_PROTOCOL | |
| PLUGIN_UI | |
| PLUGIN_LOG | |
| PLUGIN_SCRIPTING | |
| PLUGIN_AUDIO | |
| PLUGIN_CODEC | |
| PLUGIN_CRYPT | |
◆ have_plugin_of_class()
have_plugin_of_class()
Check if we have loaded plugin from pclass
- Parametry
-
- Zwraca
- 1 - If such plugin was founded
else 0
◆ plugin_abi_version()
| int plugin_abi_version |
( |
int |
plugin_abi_ver, |
|
|
const char * |
plugin_name |
|
) |
| |
◆ plugin_find()
| plugin_t* plugin_find |
( |
const char * |
name | ) |
|
plugin_find()
Find plugin by name
- Parametry
-
- Zwraca
- plugin_t with given name, or NULL if not found.
◆ plugin_find_uid()
| plugin_t* plugin_find_uid |
( |
const char * |
uid | ) |
|
◆ plugin_load()
| int plugin_load |
( |
const char * |
name, |
|
|
int |
prio, |
|
|
int |
quiet |
|
) |
| |
◆ plugin_register()
| int plugin_register |
( |
plugin_t * |
, |
|
|
int |
prio |
|
) |
| |
◆ plugin_unload()
◆ plugin_unregister()
◆ plugin_var_add()
◆ plugin_var_find()
| int plugin_var_find |
( |
plugin_t * |
pl, |
|
|
const char * |
name |
|
) |
| |
plugin_var_find()
it looks for given variable name in given plugin
- Parametry
-
| pl | - plugin |
| name | - variable name |
returns sequence number+1 of variable if found, else 0
◆ plugins_unlink()
◆ queries_list_destroy()
| void queries_list_destroy |
( |
query_t ** |
kk | ) |
|
◆ queries_reconnect()
| void queries_reconnect |
( |
| ) |
|
◆ query_connect()
◆ query_emit()
| int query_emit |
( |
plugin_t * |
, |
|
|
const char * |
, |
|
|
|
... |
|
) |
| |
◆ query_free()
◆ query_register()
| int query_register |
( |
const char * |
name, |
|
|
|
... |
|
) |
| |
◆ registered_queries_free()
| void registered_queries_free |
( |
| ) |
|
◆ plugins
◆ queries