QGIS/src/server/qgsservicemodule.h
David Marteau 689f3b1ab2 Expose QgsServerInterface to service modules
* Instanciate QgsServerInterface even if HAVE_SERVER_PYTHON_PLUGINS is
      not defined
    * Pass QgsServerInterface in module registration methods.
    * Add QgsServer initialisation test

 #Please enter the commit message for your changes. Lines starting
2017-01-10 14:34:16 +01:00

57 lines
1.8 KiB
C++

/***************************************************************************
qgsservicemodule.h
Class defining the service module interface for QGIS server services.
-------------------
begin : 2016-12-05
copyright : (C) 2016 by David Marteau
email : david dot marteau at 3liz dot com
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSSERVICEMODULE_H
#define QGSSERVICEMODULE_H
class QgsServiceRegistry;
class QgsServerInterface;
/**
* \ingroup server
* QgsServiceModule
* Class defining the service module interface for QGIS server services
*
* This class acts as a service registrar for services.
*
* For dynamic modules, a QgsServiceModule instance is returned from the QGS_ServiceModule_Init() entry point
*/
class SERVER_EXPORT QgsServiceModule
{
public:
//! Constructor
QgsServiceModule();
//! Destructor
virtual ~QgsServiceModule() = 0;
/**
* Ask module to register all provided services
* @param registry QgsServiceRegistry
*/
virtual void registerSelf( QgsServiceRegistry& registry,
QgsServerInterface* serverIface = nullptr ) = 0;
};
#endif