diff options
Diffstat (limited to 'include/base.h')
-rw-r--r-- | include/base.h | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/include/base.h b/include/base.h index bc096b85b..8324d6347 100644 --- a/include/base.h +++ b/include/base.h @@ -36,8 +36,6 @@ class CoreExport classbase /** * Called just prior to destruction via cull list. - * - * @return true to allow the delete, or false to halt the delete */ virtual CullResult cull(); virtual ~classbase(); @@ -93,6 +91,8 @@ class CoreExport refcountbase /** Base class for use count tracking. Uses reference<>, but does not * cause object deletion when the last user is removed. + * + * Safe for use as a second parent class; will not add a second vtable. */ class CoreExport usecountbase { @@ -197,4 +197,35 @@ class CoreExport ModuleException : public CoreException typedef const reference<Module> ModuleRef; +enum ServiceType { + /** is a Command */ + SERVICE_COMMAND, + /** is a channel ModeHandler */ + SERVICE_CMODE, + /** is a user ModeHandler */ + SERVICE_UMODE, + /** is a metadata descriptor */ + SERVICE_METADATA, + /** is a data processing provider (MD5, SQL) */ + SERVICE_DATA, + /** is an I/O hook provider (SSL) */ + SERVICE_IOHOOK +}; + +/** A structure defining something that a module can provide */ +class CoreExport providerbase : public classbase +{ + public: + /** Module that is providing this service */ + ModuleRef creator; + /** Name of the service being provided */ + const std::string name; + /** Type of service (must match object type) */ + const ServiceType service; + providerbase(Module* Creator, const std::string& Name, ServiceType Type) + : creator(Creator), name(Name), service(Type) {} + virtual ~providerbase(); +}; + + #endif |