summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/inspircd.h10
-rw-r--r--include/modules.h8
2 files changed, 18 insertions, 0 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index f0f5a1d1f..321222aab 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -298,6 +298,10 @@ class InspIRCd : public classbase
*/
featurelist Features;
+ /** The interface names published by various modules
+ */
+ interfacelist Interfaces;
+
/** The current time, updated in the mainloop
*/
time_t TIME;
@@ -707,6 +711,8 @@ class InspIRCd : public classbase
*/
bool PublishFeature(const std::string &FeatureName, Module* Mod);
+ bool PublishInterface(const std::string &InterfaceName, Module* Mod);
+
/** Unpublish a 'feature'.
* When your module exits, it must call this method for every feature it
* is providing so that the feature table is cleaned up.
@@ -714,6 +720,8 @@ class InspIRCd : public classbase
*/
bool UnpublishFeature(const std::string &FeatureName);
+ bool UnpublishInterface(const std::string &InterfaceName, Module* Mod);
+
/** Find a 'feature'.
* There are two ways for a module to find another module it depends on.
* Either by name, using InspIRCd::FindModule, or by feature, using the
@@ -728,6 +736,8 @@ class InspIRCd : public classbase
*/
Module* FindFeature(const std::string &FeatureName);
+ modulelist* FindInterface(const std::string &InterfaceName);
+
/** Given a pointer to a Module, return its filename
* @param m The module pointer to identify
* @return The module name or an empty string
diff --git a/include/modules.h b/include/modules.h
index b3be6ae9f..670d32844 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -101,6 +101,14 @@ typedef file_cache string_list;
*/
typedef std::map<std::string,Module*> featurelist;
+/** Holds a list of modules which implement an interface
+ */
+typedef std::deque<Module*> modulelist;
+
+/** Holds a list of all modules which implement interfaces, by interface name
+ */
+typedef std::map<std::string, modulelist> interfacelist;
+
/**
* This #define allows us to call a method in all
* loaded modules in a readable simple way, e.g.: