Next: Building and Installing, Previous: Plugin Lifecycle, Up: Writing Plugins [Contents]
Every plugin module exports the same two symbols. Include the header for the category you implement (transport.h, reader.h, writer.h, or transform.h).
#include <gmodule.h>
#include "plugin.h"
#include "starter/configurable-service/transform.h"
G_MODULE_EXPORT STCSPluginInfo *
stcs_plugin_get_info (void)
{
return stcs_plugin_info_new ("my-transform",
STCS_PLUGIN_CATEGORY_TRANSFORM,
"0.1.0");
}
G_MODULE_EXPORT GObject *
stcs_plugin_create (void)
{
return g_object_new (STCS_TYPE_MY_TRANSFORM, NULL);
}
Categories (STCSPluginCategory):
STCS_PLUGIN_CATEGORY_TRANSPORTSubclass STCSTransport.
STCS_PLUGIN_CATEGORY_READERSubclass STCSReader.
STCS_PLUGIN_CATEGORY_WRITERSubclass STCSWriter.
STCS_PLUGIN_CATEGORY_TRANSFORMSubclass STCSTransform.
The config plugin="my-transform" string must match the name passed
to stcs_plugin_info_new.