ngfd-plugin: /build/ngfd/src/ngfd-1.4.1/src/include/ngf/plugin.h Source File

ngfd-plugin

plugin.h
Go to the documentation of this file.
1/*
2 * ngfd - Non-graphic feedback daemon
3 *
4 * Copyright (C) 2010 Nokia Corporation.
5 * Contact: Xun Chen <xun.chen@nokia.com>
6 *
7 * This work is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This work is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this work; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#ifndef N_PLUGIN_H
23#define N_PLUGIN_H
24
26 typedef struct _NPlugin NPlugin;
27
28#include <ngf/log.h>
29#include <ngf/proplist.h>
30#include <ngf/core.h>
31#include <ngf/sinkinterface.h>
32#include <ngf/inputinterface.h>
33
38 NCore* n_plugin_get_core (NPlugin *plugin);
39
44 const NProplist* n_plugin_get_params (NPlugin *plugin);
45
50 void n_plugin_set_userdata (NPlugin *plugin, gpointer userdata);
51
56gpointer n_plugin_get_userdata (NPlugin *plugin);
57
62 void n_plugin_register_sink (NPlugin *plugin, const NSinkInterfaceDecl *decl);
63
68 void n_plugin_register_input (NPlugin *plugin, const NInputInterfaceDecl *decl);
69
71#define N_PLUGIN_NAME(p_name) \
72 const char* n_plugin__get_name () { \
73 return p_name; \
74 }
75
77#define N_PLUGIN_DESCRIPTION(p_desc) \
78 const char* n_plugin__get_desc () { \
79 return p_desc; \
80 }
81
83#define N_PLUGIN_VERSION(p_version) \
84 const char* n_plugin__get_version () { \
85 return p_version; \
86 }
87
89#define N_PLUGIN_LOAD(p_plugin) \
90 int n_plugin__load (NPlugin* p_plugin)
91
93#define N_PLUGIN_UNLOAD(p_plugin) \
94 void n_plugin__unload (NPlugin* p_plugin)
95
96#endif /* N_PLUGIN_H */
core.h
NCore
struct _NCore NCore
Internal core structure.
Definition core.h:26
inputinterface.h
log.h
n_plugin_get_userdata
gpointer n_plugin_get_userdata(NPlugin *plugin)
Get userdata for plugin.
NPlugin
struct _NPlugin NPlugin
Internal plugin structure.
Definition plugin.h:26
n_plugin_get_core
NCore * n_plugin_get_core(NPlugin *plugin)
Get core to which plugin is associated to.
n_plugin_register_sink
void n_plugin_register_sink(NPlugin *plugin, const NSinkInterfaceDecl *decl)
Register sink type plugin.
n_plugin_set_userdata
void n_plugin_set_userdata(NPlugin *plugin, gpointer userdata)
Set userdata for plugin.
n_plugin_get_params
const NProplist * n_plugin_get_params(NPlugin *plugin)
Get parameters stored in plugin settings file.
n_plugin_register_input
void n_plugin_register_input(NPlugin *plugin, const NInputInterfaceDecl *decl)
Register input type plugin.
proplist.h
NProplist
struct _NProplist NProplist
Internal proplist structure.
Definition proplist.h:26
sinkinterface.h
_NInputInterfaceDecl
Interface declaration structure.
Definition inputinterface.h:33
_NSinkInterfaceDecl
Interface declaration structure.
Definition sinkinterface.h:37