Add API for getting name and options from plugin handle
This commit is contained in:
parent
91cefc3c3f
commit
79a18457ad
|
@ -90,6 +90,20 @@ struct rpmPluginHooks_s {
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/** \ingroup rpmplugin
|
||||||
|
* Return plugin name
|
||||||
|
* @param plugin plugin handle
|
||||||
|
* @return plugin name string
|
||||||
|
*/
|
||||||
|
const char *rpmPluginName(rpmPlugin plugin);
|
||||||
|
|
||||||
|
/** \ingroup rpmplugin
|
||||||
|
* Return plugin options
|
||||||
|
* @param plugin plugin handle
|
||||||
|
* @return plugin options string (or NULL if none)
|
||||||
|
*/
|
||||||
|
const char *rpmPluginOpts(rpmPlugin plugin);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -98,6 +98,16 @@ static rpmPlugin rpmPluginFree(rpmPlugin plugin)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *rpmPluginName(rpmPlugin plugin)
|
||||||
|
{
|
||||||
|
return (plugin != NULL) ? plugin->name : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *rpmPluginOpts(rpmPlugin plugin)
|
||||||
|
{
|
||||||
|
return (plugin != NULL) ? plugin->opts : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
rpmRC rpmpluginsAdd(rpmPlugins plugins, const char *name, const char *path,
|
rpmRC rpmpluginsAdd(rpmPlugins plugins, const char *name, const char *path,
|
||||||
const char *opts)
|
const char *opts)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue