25 #include <xplc/ICategoryManager.h>
26 #include <xplc/uuidops.h>
27 #include "moduleloader.h"
41 IModule* ModuleLoader::loadModule(
const char* modulename) {
42 return Module::loadModule(modulename);
45 Module* Module::loadModule(
const char* modulename) {
50 err = loaderOpen(modulename, &dlh);
55 err = loaderSymbol(dlh,
"XPLC_Module", &symbol);
76 return new Module(dlh, moduleinfo);
81 moduleinfo(aModuleInfo)
91 servmgr = XPLC_getServiceManager();
94 obj = servmgr->
getObject(XPLC_categoryManager);
99 catmgr = mutate<ICategoryManager>(obj);
103 while(entry->category != UUID_null && entry->uuid != UUID_null) {
120 while(!obj && entry->uuid != UUID_null) {
121 if(entry->uuid == cid)
122 obj = entry->getObject();
const XPLC_CategoryEntry *const categories
List of category registrations for the module.
The XPLC service manager interface.
Information for an XPLC module.
virtual IObject * getObject(const UUID &)=0
Get the object corresponding to the given UUID.
Entry for a category registration.
#define UUID_MAP_ENTRY(iface)
Add an entry to an interface map.
#define UUID_MAP_BEGIN(component)
Start the interface map for "component".
Let you register categories and obtain information about them.
#define XPLC_MODULE_MAGIC
XPLC module magic number.
Interface to an object which can be used to find other objects, given their UUIDs.
unsigned long magic
XPLC module magic number.
The interface to control the module loader.
unsigned int version_major
The XPLC module ABI version that this module conforms to.
virtual unsigned int release()=0
Indicate that you are finished using this object.
#define UUID_MAP_END
Marks the end of an interface map.
The basic interface which is included by all other XPLC interfaces and objects.
virtual IObject * getObject(const UUID &cid)
Get the object corresponding to the given UUID.
The structure underlying UUIDs.
const XPLC_ComponentEntry *const components
List of components supported by the module.
virtual void registerComponent(const UUID &category, const UUID &component, const char *extrastring)=0
Register a component with a category.
The interface that a module should provide.