diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/modules.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h index b9dcd0b8d..27fec9010 100644 --- a/include/modules.h +++ b/include/modules.h @@ -416,6 +416,10 @@ class CoreExport Module : public Extensible */ virtual ~Module(); + virtual void Prioritize() + { + } + /** Returns the version number of a Module. * The method should return a Version object with its version information assigned via * Version::Version @@ -1522,10 +1526,19 @@ typedef std::vector<Module*> ModuleList; */ typedef std::vector<ircd_module*> ModuleHandleList; -typedef std::list<Module*> IntModuleList; +typedef std::vector<Module*> IntModuleList; typedef std::vector<IntModuleList> EventHandlerList; typedef IntModuleList::iterator EventHandlerIter; +enum PriorityState +{ + PRIO_DONTCARE, + PRIO_FIRST, + PRIO_LAST, + PRIO_AFTER, + PRIO_BEFORE +}; + /** ModuleManager takes care of all things module-related * in the core. */ @@ -1574,6 +1587,8 @@ class CoreExport ModuleManager : public classbase ~ModuleManager(); + bool SetPriority(Module* mod, Implementation i, PriorityState s, Module** modules = NULL, size_t sz = 1); + /** Attach an event to a module * @param i Event type to attach * @param mod Module to attach event to |