grim/gplugin-purple2-loader
Clone
Summary
Browse
Changes
Graph
Just checking in my working copy, it's been a long time since i've looked at this
draft
default
tip
2020-01-21, Gary Kramlich
fd4ebce81b79
Just checking in my working copy, it's been a long time since i've looked at this
#include
<gplugin.h>
#include
<gplugin-native.h>
#include
"gplugin-purple2-loader.h"
#include
"gplugin-purple2-plugin.h"
#include
"gplugin-purple2-purple3.h"
#include
<libpurple/core.h>
G_MODULE_EXPORT
GPluginPluginInfo
*
gplugin_query
(
G_GNUC_UNUSED
GError
**
error
)
{
g_warning
(
"hack to make sure we stay linked to libpurple3 for dev: %p"
,
purple_core_init
);
const
gchar
*
const
authors
[]
=
{
"get rekt"
,
NULL
,
};
return
gplugin_plugin_info_new
(
"gplugin-purple2/purple2"
,
GPLUGIN_NATIVE_PLUGIN_ABI_VERSION
,
"internal"
,
TRUE
,
"load-on-query"
,
TRUE
,
"name"
,
"Purple2 Plugin Loader"
,
"version"
,
"0.0.1"
,
"license-id"
,
"GPL2"
,
"summary"
,
"A plugin that can load purple2 plugins"
,
"description"
,
"This plugin mocks the purple2 api and calls the "
"appropriate purple3 api"
,
"authors"
,
authors
,
NULL
);
}
G_MODULE_EXPORT
gboolean
gplugin_load
(
GPluginNativePlugin
*
plugin
,
G_GNUC_UNUSED
GError
**
error
)
{
gplugin_purple2_purple3_load_symbols
();
gplugin_purple2_loader_register
(
plugin
);
gplugin_purple2_plugin_register
(
plugin
);
gplugin_manager_register_loader
(
GPLUGIN_PURPLE2_TYPE_LOADER
);
return
TRUE
;
}
G_MODULE_EXPORT
gboolean
gplugin_unload
(
G_GNUC_UNUSED
GPluginNativePlugin
*
plugin
,
G_GNUC_UNUSED
GError
**
error
)
{
return
FALSE
;
}