Skip to content

Commit

Permalink
Fix coding style and update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarteau committed Jan 10, 2017
1 parent 689f3b1 commit fcacb28
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 26 deletions.
20 changes: 10 additions & 10 deletions python/server/qgsserverinterface.sip
Expand Up @@ -39,7 +39,7 @@ typedef QMultiMap<int, QgsServerFilter*> QgsServerFiltersMap;
class QgsServerInterface
{
%TypeHeaderCode
#include "qgsserverinterface.h"
#include "qgsserverinterface.h"
%End

public:
Expand All @@ -61,26 +61,26 @@ class QgsServerInterface
* Get pointer to the capabiblities cache
* @return QgsCapabilitiesCache
*/
virtual QgsCapabilitiesCache* capabilitiesCache() = 0 /KeepReference/;
virtual QgsCapabilitiesCache* capabilitiesCache() = 0 / KeepReference /;

/**
* Get pointer to the request handler
* @return QgsRequestHandler
*/
virtual QgsRequestHandler* requestHandler() = 0 /KeepReference/;
virtual QgsRequestHandler* requestHandler() = 0 / KeepReference /;

/**
* Register a QgsServerFilter
* @param filter the QgsServerFilter to add
* @param priority an optional priority for the filter order
*/
virtual void registerFilter( QgsServerFilter* filter /Transfer/, int priority = 0 ) = 0;
virtual void registerFilter( QgsServerFilter* filter / Transfer / , int priority = 0 ) = 0;

/**
* Set the filters map
* @param filters the QgsServerFiltersMap
*/
virtual void setFilters( QgsServerFiltersMap* filters /Transfer/) = 0;
virtual void setFilters( QgsServerFiltersMap* filters / Transfer / ) = 0;

/**
* Return the list of current QgsServerFilter
Expand All @@ -92,13 +92,13 @@ class QgsServerInterface
* @param accessControl the access control to register
* @param priority the priority used to order them
*/
virtual void registerAccessControl( QgsAccessControlFilter* accessControl /Transfer/, int priority = 0 ) = 0;
virtual void registerAccessControl( QgsAccessControlFilter* accessControl / Transfer / , int priority = 0 ) = 0;

/** Gets the registred access control filters */
virtual const QgsAccessControl* accessControls() const = 0;

//! Return an enrironment variable, used to pass environment variables to python
virtual QString getEnv(const QString& name ) const = 0;
virtual QString getEnv( const QString& name ) const = 0;

/**
* Return the configuration file path
Expand All @@ -110,7 +110,7 @@ class QgsServerInterface
* Set the configuration file path
* @param configFilePath QString with the configuration file path
*/
virtual void setConfigFilePath( const QString& configFilePath) = 0;
virtual void setConfigFilePath( const QString& configFilePath ) = 0;

/**
* Remove entry from config cache
Expand All @@ -125,10 +125,10 @@ class QgsServerInterface
virtual void removeProjectLayers( const QString& path ) = 0;

/**
* Return the service registry
* Return the service registry
* @return QgsServiceResgistry
*/
virtual QgsServiceRegistry* serviceRegistry() = 0 /KeepReference/;
virtual QgsServiceRegistry* serviceRegistry() = 0 / KeepReference /;

private:
/** Constructor */
Expand Down
4 changes: 2 additions & 2 deletions python/server/qgsserverrequest.sip
Expand Up @@ -70,8 +70,8 @@ class QgsServerRequest
Method method() const;

/**
* * @return query params
* */
* @return query params
*/
QMap<QString, QString> parameters() const;

/**
Expand Down
6 changes: 3 additions & 3 deletions python/server/qgsserverresponse.sip
Expand Up @@ -51,7 +51,7 @@ class QgsServerResponse
* Send error
* This method delegates error handling at the server level. This is different
* from calling setReturnCode() along with and a specific response body.
* @param code HHTP return code value
* @param code HTTP return code value
* @param message An informative error message
*/
virtual void sendError( int code, const QString& message ) = 0;
Expand All @@ -61,15 +61,15 @@ class QgsServerResponse
* This is a convenient method that will write directly
* to the underlying I/O device
*/
virtual void write(const QString& data );
virtual void write( const QString& data );

/**
* Write chunk of data
* This is a convenient method that will write directly to the
* underlying I/O device
* @return the number of bytes that were actually written
*/
virtual qint64 write(const QByteArray& byteArray );
virtual qint64 write( const QByteArray& byteArray );

/**
* Return the underlying QIODevice
Expand Down
4 changes: 2 additions & 2 deletions src/server/qgsserver.h
Expand Up @@ -60,7 +60,7 @@ class SERVER_EXPORT QgsServer
* @param var environment variable name
* @param val value
* @note added in 2.14
/ */
*/
void putenv( const QString &var, const QString &val );

/** Handles the request. The output is normally printed trough FCGI printf
Expand Down Expand Up @@ -129,7 +129,7 @@ class SERVER_EXPORT QgsServer

//! service registry
static QgsServiceRegistry sServiceRegistry;

};
#endif // QGSSERVER_H

2 changes: 1 addition & 1 deletion src/server/qgsserverinterface.h
Expand Up @@ -134,7 +134,7 @@ class SERVER_EXPORT QgsServerInterface
virtual void removeProjectLayers( const QString& path ) = 0;

/**
* Return the service registry
* Return the service registry
* @return QgsServiceResgistry
*/
virtual QgsServiceRegistry* serviceRegistry() = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/server/qgsserverinterfaceimpl.cpp
Expand Up @@ -24,7 +24,7 @@
//! Constructor
QgsServerInterfaceImpl::QgsServerInterfaceImpl( QgsCapabilitiesCache* capCache, QgsServiceRegistry* srvRegistry )
: mCapabilitiesCache( capCache )
, mServiceRegistry(srvRegistry)
, mServiceRegistry( srvRegistry )
{
mRequestHandler = nullptr;
mAccessControls = new QgsAccessControl();
Expand Down Expand Up @@ -92,6 +92,6 @@ void QgsServerInterfaceImpl::removeProjectLayers( const QString& path )

QgsServiceRegistry* QgsServerInterfaceImpl::serviceRegistry()
{
return mServiceRegistry;
return mServiceRegistry;
}

4 changes: 3 additions & 1 deletion src/server/qgsserverresponse.h
Expand Up @@ -56,7 +56,9 @@ class SERVER_EXPORT QgsServerResponse
/**
* Send error
* This method delegates error handling at the server level. This is different
* from calling setReturnCode() along with and a specific response body.
* from calling setReturnCode() wich let you return a specific response body.
* Calling sendError() will end the transaction and any attempt to write data
* or set headers will be an error.
* @param code HHTP return code value
* @param message An informative error message
*/
Expand Down
2 changes: 1 addition & 1 deletion src/server/qgsservicenativeloader.cpp
Expand Up @@ -55,7 +55,7 @@ QgsServiceNativeLoader::~QgsServiceNativeLoader()
}

void QgsServiceNativeLoader::loadModules( const QString& modulePath, QgsServiceRegistry& registrar,
QgsServerInterface* serverIface )
QgsServerInterface* serverIface )
{
QDir moduleDir( modulePath );
moduleDir.setSorting( QDir::Name | QDir::IgnoreCase );
Expand Down
4 changes: 2 additions & 2 deletions src/server/qgsservicenativeloader.h
Expand Up @@ -49,10 +49,10 @@ class SERVER_EXPORT QgsServiceNativeLoader
* Lead all medules from path
* @param modulePath the path to look for module
* @param registrar QgsServiceRegistry instance for registering services
* @param serverIface QgsServerInterface instarce
* @param serverIface QgsServerInterface instarce
*/
void loadModules( const QString& modulePath, QgsServiceRegistry& registrar,
QgsServerInterface* serverIface = nullptr );
QgsServerInterface* serverIface = nullptr );

/**
* Unload all modules
Expand Down
4 changes: 2 additions & 2 deletions src/server/qgsserviceregistry.h
Expand Up @@ -89,10 +89,10 @@ class SERVER_EXPORT QgsServiceRegistry

/**
* Initialize registry, load modules and auto register services
* @param serverIface the server interface
* @param serverIface the server interface
* @param nativeModulepath the native module path
*/
void init( const QString& nativeModulepath, QgsServerInterface* serverIface =nullptr );
void init( const QString& nativeModulepath, QgsServerInterface* serverIface = nullptr );

/**
* Clean up registered service and unregister modules
Expand Down

0 comments on commit fcacb28

Please sign in to comment.