Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add plugin files and define
- Loading branch information
Showing
9 changed files
with
472 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/*************************************************************************** | ||
qgsseerverfilter.cpp | ||
Server I/O filters class for Qgis Mapserver for use by plugins | ||
------------------- | ||
begin : 2014-09-10 | ||
copyright : (C) 2014 by Alessandro Pasotti | ||
email : a dot pasotti at itopen dot it | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* 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. * | ||
* * | ||
***************************************************************************/ | ||
|
||
|
||
#include "qgsserverfilter.h" | ||
#include "qgslogger.h" | ||
|
||
/** | ||
* QgsServerFilter | ||
* Class defining I/O filters for Qgis Mapserver and | ||
* implemented in plugins | ||
* | ||
*/ | ||
|
||
QgsServerFilter::QgsServerFilter(QgsServerInterface *serverInterface): | ||
mServerInterface( serverInterface ) | ||
{ | ||
} | ||
|
||
QgsServerFilter::~QgsServerFilter() | ||
{ | ||
} | ||
|
||
|
||
void QgsServerFilter::requestReady() | ||
{ | ||
QgsDebugMsg( "QgsServerFilter plugin default requestReady called"); | ||
} | ||
|
||
void QgsServerFilter::responseReady() | ||
{ | ||
QgsDebugMsg( "QgsServerFilter plugin default responseReady called"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/*************************************************************************** | ||
qgsseerverfilter.h | ||
Server I/O filters class for Qgis Mapserver for use by plugins | ||
------------------- | ||
begin : 2014-09-10 | ||
copyright : (C) 2014 by Alessandro Pasotti | ||
email : a dot pasotti at itopen dot it | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* 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 QGSSERVERFILTER_H | ||
#define QGSSERVERFILTER_H | ||
|
||
#include <QMultiMap> | ||
|
||
class QgsServerInterface; | ||
|
||
/** | ||
* QgsServerFilter | ||
* Class defining I/O filters for Qgis Server and | ||
* implemented in plugins | ||
* | ||
*/ | ||
|
||
class QgsServerFilter | ||
{ | ||
|
||
public: | ||
|
||
/** Constructor */ | ||
QgsServerFilter( QgsServerInterface* serverInterface ); | ||
/** Destructor */ | ||
virtual ~QgsServerFilter(); | ||
QgsServerInterface* serverInterface( ) { return mServerInterface; } | ||
virtual void requestReady(); | ||
virtual void responseReady(); | ||
|
||
private: | ||
|
||
QgsServerInterface* mServerInterface; | ||
|
||
}; | ||
|
||
typedef QMultiMap<int, QgsServerFilter*> QgsServerFiltersMap; | ||
|
||
|
||
#endif // QGSSERVERFILTER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/*************************************************************************** | ||
* qgsserverinterface.cpp | ||
* Abstract base class for interfaces to functions in QgsServer | ||
* ------------------- | ||
* begin : 2014-29-09 | ||
* copyright : (C) 2014 by Alessandro Pasotti | ||
* email : a dot pasotti at itopen 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. * | ||
* * | ||
****************************************************************************/ | ||
|
||
#include "qgsserverinterface.h" | ||
|
||
QgsServerInterface::QgsServerInterface() | ||
{ | ||
|
||
|
||
} | ||
|
||
QgsServerInterface::~QgsServerInterface() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/*************************************************************************** | ||
qgsseerversinterface.h | ||
Interface class for exposing functions in Qgis Server for use by plugins | ||
------------------- | ||
begin : 2014-09-10 | ||
copyright : (C) 2014 by Alessandro Pasotti | ||
email : a dot pasotti at itopen dot it | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* 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 QGSSERVERINTERFACE_H | ||
#define QGSSERVERINTERFACE_H | ||
|
||
#include "qgscapabilitiescache.h" | ||
#include "qgsrequesthandler.h" | ||
#include "qgsserverfilter.h" | ||
|
||
/** | ||
* QgsServerInterface | ||
* Class defining interfaces exposed by Qgis Mapserver and | ||
* made available to plugins. | ||
* | ||
*/ | ||
|
||
class QgsServerInterface | ||
{ | ||
|
||
public: | ||
|
||
/** Constructor */ | ||
QgsServerInterface( ); | ||
|
||
/** Destructor */ | ||
virtual ~QgsServerInterface() = 0; | ||
|
||
virtual void setRequestHandler( QgsRequestHandler* requestHandler ) = 0; | ||
virtual QgsCapabilitiesCache* capabiblitiesCache() = 0; | ||
virtual QgsRequestHandler* requestHandler( ) = 0; | ||
virtual void registerFilter( QgsServerFilter* filter, int priority = 0 ) = 0; | ||
virtual QgsServerFiltersMap filters( ) = 0; | ||
|
||
}; | ||
|
||
#endif // QGSSERVERINTERFACE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/*************************************************************************** | ||
qgsseerversinterface.h | ||
Interface class for exposing functions in Qgis Mapserver for use by plugins | ||
------------------- | ||
begin : 2014-09-10 | ||
copyright : (C) 2014 by Alessandro Pasotti | ||
email : a dot pasotti at itopen dot it | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* 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. * | ||
* * | ||
***************************************************************************/ | ||
|
||
|
||
#include "qgsserverinterfaceimpl.h" | ||
|
||
|
||
QgsServerInterfaceImpl::QgsServerInterfaceImpl( QgsCapabilitiesCache* capCache ) : | ||
mCapabilitiesCache( capCache ) | ||
{ | ||
mRequestHandler = NULL; | ||
} | ||
|
||
|
||
/** Destructor */ | ||
QgsServerInterfaceImpl::~QgsServerInterfaceImpl() | ||
{ | ||
} | ||
|
||
void QgsServerInterfaceImpl::setRequestHandler( QgsRequestHandler * requestHandler) | ||
{ | ||
mRequestHandler = requestHandler; | ||
} | ||
|
||
void QgsServerInterfaceImpl::registerFilter( QgsServerFilter *filter, int priority ) | ||
{ | ||
mFilters.insert(priority, filter); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/*************************************************************************** | ||
qgsseerversinterface.h | ||
Interface class for exposing functions in Qgis Mapserver for use by plugins | ||
------------------- | ||
begin : 2014-09-10 | ||
copyright : (C) 2014 by Alessandro Pasotti | ||
email : a dot pasotti at itopen dot it | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* 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 QGSSERVERINTERFACEIMPL_H | ||
#define QGSSERVERINTERFACEIMPL_H | ||
|
||
#include "qgsserverinterface.h" | ||
#include "qgscapabilitiescache.h" | ||
#include "qgsgetrequesthandler.h" | ||
#include "qgspostrequesthandler.h" | ||
#include "qgssoaprequesthandler.h" | ||
#include "qgsmaprenderer.h" | ||
|
||
/** | ||
* QgsServerInterface | ||
* Class defining interfaces exposed by Qgis Mapserver and | ||
* made available to plugins. | ||
* | ||
*/ | ||
|
||
class QgsServerInterfaceImpl : public QgsServerInterface | ||
{ | ||
|
||
public: | ||
|
||
/** Constructor */ | ||
QgsServerInterfaceImpl( QgsCapabilitiesCache *capCache ); | ||
|
||
/** Destructor */ | ||
~QgsServerInterfaceImpl(); | ||
|
||
void setRequestHandler( QgsRequestHandler* requestHandler ); | ||
QgsCapabilitiesCache* capabiblitiesCache() { return mCapabilitiesCache; } | ||
QgsRequestHandler* requestHandler( ) { return mRequestHandler; } | ||
void registerFilter( QgsServerFilter *filter, int priority = 0 ); | ||
QgsServerFiltersMap filters( ) { return mFilters; } | ||
|
||
private: | ||
|
||
QgsServerFiltersMap mFilters; | ||
QgsCapabilitiesCache* mCapabilitiesCache; | ||
QgsRequestHandler* mRequestHandler; | ||
|
||
}; | ||
|
||
#endif // QGSSERVERINTERFACEIMPL_H |
Oops, something went wrong.