49 lines
1.1 KiB
Vala
49 lines
1.1 KiB
Vala
using LAview, Core, GObject.Plugins;
|
|
|
|
extern const string GETTEXT_PACKAGE;
|
|
|
|
/**
|
|
* Plugin of type A1.
|
|
*/
|
|
public class PluginDataExample : PluginData {
|
|
|
|
/**
|
|
* Constructs a new ``PluginDataExample``.
|
|
*/
|
|
construct {
|
|
// Initialize the data object, open database connection for example.
|
|
stdout.puts ("PluginDataExample init () called\n");
|
|
}
|
|
|
|
/**
|
|
* Destroys the ``PluginDataExample``.
|
|
*/
|
|
~PluginDataExample () {
|
|
// Deinitialize the data object, close database connection for example.
|
|
stdout.puts ("PluginDataExample deinit () called\n");
|
|
}
|
|
|
|
/**
|
|
* Get plugin name.
|
|
*/
|
|
public override string get_name () {
|
|
return "DataExample";
|
|
}
|
|
|
|
/**
|
|
* Any abstract method realization for PluginData.
|
|
*/
|
|
public override string get_readable_name () {
|
|
//stdout.puts ("PluginDataExample.get_readable_name () called\n");
|
|
//stdout.puts ("Call IHostCore.get_cache_dir () from PluginDataExample:\n ");
|
|
//var cache_dir = (host as IHostCore).get_cache_dir ();
|
|
//stdout.printf ("cache_dir = %s\n", cache_dir);
|
|
return _("Data Example");
|
|
}
|
|
}
|
|
|
|
[ModuleInit]
|
|
Type plugin_init (GLib.TypeModule type_module) {
|
|
return typeof (PluginDataExample);
|
|
}
|