25#include <xplc/ICategoryManager.h>
26#include <xplc/uuidops.h>
27#include "moduleloader.h"
41IModule* ModuleLoader::loadModule(
const char* modulename) {
42 return Module::loadModule(modulename);
45Module* 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();
Let you register categories and obtain information about them.
virtual void registerComponent(const UUID &category, const UUID &component, const char *extrastring)=0
Register a component with a category.
The interface to control the module loader.
The interface that a module should provide.
The basic interface which is included by all other XPLC interfaces and objects.
virtual unsigned int release()=0
Indicate that you are finished using this object.
Interface to an object which can be used to find other objects, given their UUIDs.
virtual IObject * getObject(const UUID &)=0
Get the object corresponding to the given UUID.
The XPLC service manager interface.
virtual IObject * getObject(const UUID &cid)
Get the object corresponding to the given UUID.
#define XPLC_MODULE_MAGIC
XPLC module magic number.
#define UUID_MAP_END
Marks the end of an interface map.
#define UUID_MAP_BEGIN(component)
Start the interface map for "component".
#define UUID_MAP_ENTRY(iface)
Add an entry to an interface map.
Entry for a category registration.
Information for an XPLC module.
const XPLC_CategoryEntry *const categories
List of category registrations for the module.
unsigned long magic
XPLC module magic number.
unsigned int version_major
The XPLC module ABI version that this module conforms to.
const XPLC_ComponentEntry *const components
List of components supported by the module.
The structure underlying UUIDs.