-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[server] Moved QgsBufferServerRequest into its own header and cpp file
- Loading branch information
Showing
6 changed files
with
113 additions
and
69 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,47 @@ | ||
/*************************************************************************** | ||
qgsbufferserverrequest.cpp | ||
Define response wrapper for bbuffer response | ||
------------------- | ||
begin : 2017-01-03 | ||
copyright : (C) 2017 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. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgsbufferserverrequest.h" | ||
#include "qgslogger.h" | ||
#include "qgsmessagelog.h" | ||
|
||
#include <QDebug> | ||
|
||
QgsBufferServerRequest::QgsBufferServerRequest( const QString &url, Method method, QByteArray *data ) | ||
: QgsServerRequest( url, method ) | ||
{ | ||
if ( data ) | ||
{ | ||
mData = *data; | ||
} | ||
} | ||
|
||
QgsBufferServerRequest::QgsBufferServerRequest( const QUrl &url, Method method, QByteArray *data ) | ||
: QgsServerRequest( url, method ) | ||
{ | ||
if ( data ) | ||
{ | ||
mData = *data; | ||
} | ||
} | ||
|
||
QgsBufferServerRequest::~QgsBufferServerRequest() | ||
{ | ||
|
||
} |
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 @@ | ||
/*************************************************************************** | ||
qgsbufferserverrequest.h | ||
Define response wrapper for storing responsea in buffer | ||
------------------- | ||
begin : 2017-01-03 | ||
copyright : (C) 2017 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 QGSBUFFERSERVERREQUEST_H | ||
#define QGSBUFFERSERVERREQUEST_H | ||
|
||
#include "qgsserverrequest.h" | ||
|
||
#include <QBuffer> | ||
#include <QByteArray> | ||
#include <QMap> | ||
|
||
/** | ||
* \ingroup server | ||
* QgsBufferServerRequest | ||
* Class defining request with data | ||
*/ | ||
class QgsBufferServerRequest : public QgsServerRequest | ||
{ | ||
public: | ||
|
||
/** | ||
* Constructor | ||
* | ||
* \param url the url string | ||
* \param method the request method | ||
*/ | ||
QgsBufferServerRequest( const QString &url, Method method = GetMethod, QByteArray *data = nullptr ); | ||
|
||
/** | ||
* Constructor | ||
* | ||
* \param url QUrl | ||
* \param method the request method | ||
*/ | ||
QgsBufferServerRequest( const QUrl &url, Method method = GetMethod, QByteArray *data = nullptr ); | ||
|
||
~QgsBufferServerRequest(); | ||
|
||
virtual QByteArray data() const { return mData; } | ||
|
||
private: | ||
QByteArray mData; | ||
}; | ||
|
||
#endif |
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
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