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

ngfd-plugin

Macros | Typedefs | Functions
plugin.h File Reference
`#include <ngf/log.h>`
`#include <ngf/proplist.h>`
`#include <ngf/core.h>`
`#include <ngf/sinkinterface.h>`
`#include <ngf/inputinterface.h>`

Go to the source code of this file.

## Macros
#define | N_PLUGIN_NAME(p_name)
| Macro to define plugin name.
#define | N_PLUGIN_DESCRIPTION(p_desc)
| Macro to define plugin description.
#define | N_PLUGIN_VERSION(p_version)
| Macro to define plugin version.
#define | N_PLUGIN_LOAD(p_plugin) int n_plugin__load (NPlugin* p_plugin)
| Plugin loading function.
#define | N_PLUGIN_UNLOAD(p_plugin) void n_plugin__unload (NPlugin* p_plugin)
| Plugin unload function.

## Typedefs
typedef struct _NPlugin | NPlugin
| Internal plugin structure.

## Functions
NCore * | n_plugin_get_core (NPlugin *plugin)
| Get core to which plugin is associated to.
const NProplist * | n_plugin_get_params (NPlugin *plugin)
| Get parameters stored in plugin settings file.
void | n_plugin_set_userdata (NPlugin *plugin, gpointer userdata)
| Set userdata for plugin.
gpointer | n_plugin_get_userdata (NPlugin *plugin)
| Get userdata for plugin.
void | n_plugin_register_sink (NPlugin *plugin, const NSinkInterfaceDecl *decl)
| Register sink type plugin.
void | n_plugin_register_input (NPlugin *plugin, const NInputInterfaceDecl *decl)
| Register input type plugin.

## Macro Definition Documentation

## ◆ N_PLUGIN_DESCRIPTION

#define N_PLUGIN_DESCRIPTION | ( |  | p_desc | ) |

Value:
const char* n_plugin__get_desc () { \
return p_desc; \
}

Macro to define plugin description.

## ◆ N_PLUGIN_LOAD

#define N_PLUGIN_LOAD | ( |  | p_plugin | ) | int n_plugin__load (NPlugin* p_plugin)

Plugin loading function.

Plugin declaration structure should be initialized here.

## ◆ N_PLUGIN_NAME

#define N_PLUGIN_NAME | ( |  | p_name | ) |

Value:
const char* n_plugin__get_name () { \
return p_name; \
}

Macro to define plugin name.

## ◆ N_PLUGIN_UNLOAD

#define N_PLUGIN_UNLOAD | ( |  | p_plugin | ) | void n_plugin__unload (NPlugin* p_plugin)

Plugin unload function.

Plugin memory releasing should be done here.

## ◆ N_PLUGIN_VERSION

#define N_PLUGIN_VERSION | ( |  | p_version | ) |

Value:
const char* n_plugin__get_version () { \
return p_version; \
}

Macro to define plugin version.

## Typedef Documentation

## ◆ NPlugin

typedef struct _NPlugin NPlugin

Internal plugin structure.

## Function Documentation

## ◆ n_plugin_get_core()

NCore * n_plugin_get_core | ( | NPlugin * | plugin | ) |

Get core to which plugin is associated to.

Parameters

  plugin | NPlugin structure

Returns
  NCore structure

## ◆ n_plugin_get_params()

const NProplist * n_plugin_get_params | ( | NPlugin * | plugin | ) |

Get parameters stored in plugin settings file.

Parameters

  plugin | NPlugin structure

Returns
  Parameters as NProplist structure

## ◆ n_plugin_get_userdata()

gpointer n_plugin_get_userdata | ( | NPlugin * | plugin | ) |

Get userdata for plugin.

Parameters

  plugin | NPlugin structure

Returns
  Userdata pointer stored for the plugin

## ◆ n_plugin_register_input()

void n_plugin_register_input | ( | NPlugin * | plugin,
|  | const NInputInterfaceDecl * | decl )

Register input type plugin.

Parameters

  plugin | NPlugin structure
  decl | Plugin declaration in NInputInterfaceDecl structure

## ◆ n_plugin_register_sink()

void n_plugin_register_sink | ( | NPlugin * | plugin,
|  | const NSinkInterfaceDecl * | decl )

Register sink type plugin.

Parameters

  plugin | NPlugin structure
  decl | Plugin declaration in NSinkInterfaceDecl structure

## ◆ n_plugin_set_userdata()

void n_plugin_set_userdata | ( | NPlugin * | plugin,
|  | gpointer | userdata )

Set userdata for plugin.

This should be called only once per plugin init.

Parameters

  plugin | NPlugin structure
  userdata | Plugin userdata