Skip to content

Commit

Permalink
fix indent
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarteau committed Jan 10, 2017
1 parent 89859ef commit 4c8a5cb
Show file tree
Hide file tree
Showing 19 changed files with 516 additions and 513 deletions.
80 changes: 40 additions & 40 deletions python/server/qgsserverrequest.sip
Expand Up @@ -28,52 +28,52 @@ class QgsServerRequest
%TypeHeaderCode
#include "qgsserverrequest.h"
%End
public:

enum Method {
HeadMethod, PutMethod, GetMethod, PostMethod, DeleteMethod
};
public:

/**
* Constructor
*
* @param url the url string
* @param method the request method
*/
QgsServerRequest( const QString& url, Method method );

/**
* Constructor
*
* @param url QUrl
* @param method the request method (default to GetMethod)
*/
QgsServerRequest( const QUrl& url, Method method = GetMethod );
enum Method {
HeadMethod, PutMethod, GetMethod, PostMethod, DeleteMethod
};

//! destructor
virtual ~QgsServerRequest();
/**
* Constructor
*
* @param url the url string
* @param method the request method
*/
QgsServerRequest( const QString& url, Method method );

/**
* @return the value of the header field for that request
*/
virtual QString getHeader( const QString& name ) const;
/**
* Constructor
*
* @param url QUrl
* @param method the request method (default to GetMethod)
*/
QgsServerRequest( const QUrl& url, Method method = GetMethod );

/**
* @return the request url
*/
virtual QUrl url() const;
//! destructor
virtual ~QgsServerRequest();

/**
* @return the request method
*/
virtual Method method() const;
/**
* @return the value of the header field for that request
*/
virtual QString getHeader( const QString& name ) const;

/**
* Return post/put data
* Check for QByteArray::isNull() to check if data
* is available.
*/
virtual QByteArray data() const;
/**
* @return the request url
*/
virtual QUrl url() const;

/**
* @return the request method
*/
virtual Method method() const;

/**
* Return post/put data
* Check for QByteArray::isNull() to check if data
* is available.
*/
virtual QByteArray data() const;

};

82 changes: 41 additions & 41 deletions python/server/qgsserverresponse.sip
Expand Up @@ -28,53 +28,53 @@ class QgsServerResponse
%TypeHeaderCode
#include "qgsserverresponse.h"
%End
public:

//!constructor
QgsServerResponse();
public:

//! destructor
virtual ~QgsServerResponse();
//!constructor
QgsServerResponse();

/** Set Header entry
* Add Header entry to the response
* Note that it is usually an error to set Header after writing data
*/
virtual void setHeader( const QString& key, const QString& value ) = 0;

/** Set the http return code
* @param code HTTP return code value
*/
virtual void setReturnCode( int code ) = 0;
//! destructor
virtual ~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 message An informative error message
*/
virtual void sendError( int code, const QString& message ) = 0;
/** Set Header entry
* Add Header entry to the response
* Note that it is usually an error to set Header after writing data
*/
virtual void setHeader( const QString& key, const QString& value ) = 0;

/**
* Write string
* This is a convenient method that will write directly
* to the underlying I/O device
*/
virtual void write(const QString& data );
/** Set the http return code
* @param code HTTP return code value
*/
virtual void setReturnCode( int code ) = 0;

/**
* 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 );
/**
* 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 message An informative error message
*/
virtual void sendError( int code, const QString& message ) = 0;

/**
* Return the underlying QIODevice
*/
virtual QIODevice* io() = 0;
/**
* Write string
* This is a convenient method that will write directly
* to the underlying I/O device
*/
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 );

/**
* Return the underlying QIODevice
*/
virtual QIODevice* io() = 0;

};

2 changes: 1 addition & 1 deletion python/server/qgsservice.sip
Expand Up @@ -55,7 +55,7 @@ class QgsService
/**
* Return true if the given method is supported for that
* service.
* @param method QGSMethodType the
* @param method QGSMethodType the
* @return QString containing the configuration file path
*/
virtual bool allowMethod( QgsServerRequest::Method ) const = 0;
Expand Down
4 changes: 2 additions & 2 deletions python/server/qgsservicemodule.sip
Expand Up @@ -22,9 +22,9 @@
* QgsServiceModule
* Class defining the service module interface for QGIS server services
*
* This class acts as a service registrar for 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
* For dynamic modules, a QgsServiceModule instance is returned from the QGS_ServiceModule_Init() entry point
*/
class QgsServiceModule
{
Expand Down
12 changes: 6 additions & 6 deletions python/server/qgsserviceregistry.sip
Expand Up @@ -22,7 +22,7 @@
* QgsServiceRegistry
* Class defining the registry manager for QGIS server services
*
* This class provides methods for registering and retrieving
* This class provides methods for registering and retrieving
* services.
*
* IMPORTANT: The registry hold ownership of registered services and
Expand All @@ -41,19 +41,19 @@ class QgsServiceRegistry
QgsServiceRegistry();

//! Destructor
~QgsServiceRegistry();
~QgsServiceRegistry();

/**
* Retrieve a service from its name
* @param name the name of the service
* @param name the name of the service
* @param version the required version (optional)
* @return QgsService
*/
QgsService* getService( const QString& name, const QString& version = QString() );

/**
* Register a service by its name
*
*
* This method is intended to be called by modules for registering
* services. A module may register multiple services.
* The registry gain ownership of services.
Expand All @@ -62,13 +62,13 @@ class QgsServiceRegistry
*/
void registerService( QgsService* service /Transfer/ );

/**
/**
* Initialize registry, load modules and auto register services
* @param nativeModulepath the native module path
* @param pythonModulePath the python module path
*
* If pythonModulePath is not specified the environnement variables QGIS_PYTHON_SERVICE_PATH
* is examined.
* is examined.
*/
void init( const QString& nativeModulepath, const QString& pythonModulePath = QString() );

Expand Down
20 changes: 10 additions & 10 deletions src/server/qgsserverrequest.cpp
Expand Up @@ -21,43 +21,43 @@


QgsServerRequest::QgsServerRequest( const QString& url, Method method )
: mUrl(url)
, mMethod(method)
: mUrl( url )
, mMethod( method )
{

}

QgsServerRequest::QgsServerRequest( const QUrl& url, Method method )
: mUrl(url)
, mMethod(method)
: mUrl( url )
, mMethod( method )
{

}

//! destructor
QgsServerRequest::~QgsServerRequest()
{

}

QString QgsServerRequest::getHeader( const QString& name ) const
{
return "";
return "";
}

QUrl QgsServerRequest::url() const
QUrl QgsServerRequest::url() const
{
return mUrl;
return mUrl;
}

QgsServerRequest::Method QgsServerRequest::method() const
{
return mMethod;
return mMethod;
}

QByteArray QgsServerRequest::data() const
{
return QByteArray();
return QByteArray();
}


0 comments on commit 4c8a5cb

Please sign in to comment.