56 QDir moduleDir( modulePath );
57 moduleDir.setSorting( QDir::Name | QDir::IgnoreCase );
58 moduleDir.setFilter( QDir::Files );
60#if defined( Q_OS_WIN ) || defined( __CYGWIN__ )
61 moduleDir.setNameFilters( QStringList(
"*.dll" ) );
63 moduleDir.setNameFilters( QStringList(
"*.so" ) );
68 const auto constFiList( moduleDir.entryInfoList() );
69 for (
const QFileInfo &fi : constFiList )
75 module->registerSelf( registrar, serverIface );
91 QLibrary lib( location );
93 qDebug() << QString(
"Loading native module %1" ).arg( location );
104 if ( entryPointFunc )
114 mModules.insert( location, ModuleTable::mapped_type( entry ) );
134 ModuleTable::iterator it = mModules.begin();
135 const ModuleTable::iterator end = mModules.end();
139 unloadModuleEntry( it->get() );
149 const ModuleTable::iterator item = mModules.find( location );
150 if ( item != mModules.end() )
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::MessageLevel::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins.
Class defining the service module interface for QGIS server services.
QgsServiceModule * loadNativeModule(const QString &location)
Load the native module from path.
void unloadModules()
Unload all modules.
void loadModules(const QString &modulePath, QgsServiceRegistry ®istrar, QgsServerInterface *serverIface=nullptr)
Load all modules from path.
Native module (location, the module itself and the unload function).
unloadHook_t * mUnloadHook
QgsServiceNativeModuleEntry(const QString &location)
Constructor for QgsServiceNativeModuleEntry.
QgsServiceModule * mModule
QgsServiceRegistry Class defining the registry manager for QGIS server services.
void unloadHook_t(QgsServiceModule *)
QgsServiceModule * serviceEntryPoint_t()