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
26typedef 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
39
45
50void n_plugin_set_userdata (NPlugin *plugin, gpointer userdata);
51
56gpointer n_plugin_get_userdata (NPlugin *plugin);
57
63
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 */
struct _NCore NCore
Internal core structure.
Definition core.h:26
struct _NInputInterfaceDecl NInputInterfaceDecl
Interface declaration structure.
gpointer n_plugin_get_userdata(NPlugin *plugin)
Get userdata for plugin.
struct _NPlugin NPlugin
Internal plugin structure.
Definition plugin.h:26
NCore * n_plugin_get_core(NPlugin *plugin)
Get core to which plugin is associated to.
void n_plugin_register_sink(NPlugin *plugin, const NSinkInterfaceDecl *decl)
Register sink type plugin.
void n_plugin_set_userdata(NPlugin *plugin, gpointer userdata)
Set userdata for plugin.
const NProplist * n_plugin_get_params(NPlugin *plugin)
Get parameters stored in plugin settings file.
void n_plugin_register_input(NPlugin *plugin, const NInputInterfaceDecl *decl)
Register input type plugin.
struct _NProplist NProplist
Internal proplist structure.
Definition proplist.h:26
struct _NSinkInterfaceDecl NSinkInterfaceDecl
Interface declaration structure.