Go to the documentation of this file.00001 #ifndef _PLUGINS_H
00002 #define _PLUGINS_H
00003
00004 #include <rpm/rpmtypes.h>
00005
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif
00009
00010 #define PLUGIN_HOOKS plugin_hooks
00011
00012 #define PLUGINHOOK_INIT_FUNC pluginhook_init
00013 #define PLUGINHOOK_CLEANUP_FUNC pluginhook_cleanup
00014 #define PLUGINHOOK_OPENTE_FUNC pluginhook_opente
00015 #define PLUGINHOOK_COLL_POST_ADD_FUNC pluginhook_coll_post_add
00016 #define PLUGINHOOK_COLL_POST_ANY_FUNC pluginhook_coll_post_any
00017 #define PLUGINHOOK_COLL_PRE_REMOVE_FUNC pluginhook_coll_pre_remove
00018
00019 enum rpmPluginHook_e {
00020 PLUGINHOOK_NONE = 0,
00021 PLUGINHOOK_INIT = 1 << 0,
00022 PLUGINHOOK_CLEANUP = 1 << 1,
00023 PLUGINHOOK_OPENTE = 1 << 2,
00024 PLUGINHOOK_COLL_POST_ADD = 1 << 3,
00025 PLUGINHOOK_COLL_POST_ANY = 1 << 4,
00026 PLUGINHOOK_COLL_PRE_REMOVE = 1 << 5
00027 };
00028
00029 typedef rpmFlags rpmPluginHook;
00030
00036 rpmPlugins rpmpluginsNew(rpmts ts);
00037
00043 rpmPlugins rpmpluginsFree(rpmPlugins plugins);
00044
00053 rpmRC rpmpluginsAdd(rpmPlugins plugins, const char *name, const char *path, const char *opts);
00054
00061 rpmRC rpmpluginsAddCollectionPlugin(rpmPlugins plugins, const char *name);
00062
00069 int rpmpluginsPluginAdded(rpmPlugins plugins, const char *name);
00070
00071
00079 rpmRC rpmpluginsCallInit(rpmPlugins plugins, const char *name, const char *opts);
00080
00087 rpmRC rpmpluginsCallCleanup(rpmPlugins plugins, const char *name);
00088
00096 rpmRC rpmpluginsCallOpenTE(rpmPlugins plugins, const char *name, rpmte te);
00097
00104 rpmRC rpmpluginsCallCollectionPostAdd(rpmPlugins plugins, const char *name);
00105
00112 rpmRC rpmpluginsCallCollectionPostAny(rpmPlugins plugins, const char *name);
00113
00120 rpmRC rpmpluginsCallCollectionPreRemove(rpmPlugins plugins, const char *name);
00121
00122 #ifdef __cplusplus
00123 }
00124 #endif
00125 #endif