#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 () |
|
#define EKG_ABI_VER 5798 /* git rev-list master | wc -l */ |
#define EXPORT __attribute__ ((visibility("default"))) G_MODULE_EXPORT |
#define PLUGIN_DEFINE |
( |
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Wartość:static int x##_plugin_destroy(); \
.pclass = y, \
.destroy = x##_plugin_destroy, \
.theme_init = z \
}
char * name
Definition: plugins.h:77
#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 QUERIES_BUCKETS 64 |
#define QUERY |
( |
|
x | ) |
int x(void *data, va_list ap) |
typedef int(* plugin_destroy_func_t) (void) |
typedef void( plugin_notify_func_t) (session_t *, const char *) |
typedef int(* plugin_theme_init_func_t) (void) |
typedef int query_handler_func_t(void *data, va_list ap) |
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()
Check if we have loaded plugin from pclass
- Parametry
-
- Zwraca
- 1 - If such plugin was founded
else 0
int plugin_abi_version |
( |
int |
plugin_abi_ver, |
|
|
const char * |
plugin_name |
|
) |
| |
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_t* plugin_find_uid |
( |
const char * |
uid | ) |
|
int plugin_load |
( |
const char * |
name, |
|
|
int |
prio, |
|
|
int |
quiet |
|
) |
| |
int plugin_register |
( |
plugin_t * |
, |
|
|
int |
prio |
|
) |
| |
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
void queries_list_destroy |
( |
query_t ** |
kk | ) |
|
void queries_reconnect |
( |
| ) |
|
int query_emit |
( |
plugin_t * |
, |
|
|
const char * |
, |
|
|
|
... |
|
) |
| |
int query_register |
( |
const char * |
name, |
|
|
|
... |
|
) |
| |
void registered_queries_free |
( |
| ) |
|