Skip to content

Commit

Permalink
export more classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Dees committed Dec 8, 2017
1 parent 48a5c0e commit 130cb62
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/qhttprequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* IN THE SOFTWARE.
*/

#define BUILD_QHTTPREQUEST_API 1
#include "qhttprequest.h"

#include "qhttpconnection.h"
Expand Down
14 changes: 13 additions & 1 deletion src/qhttprequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@
#include <QMetaType>
#include <QUrl>

#ifdef _WIN32
#ifdef BUILD_QHTTPREQUEST_API
#define QHTTPREQUEST_API __declspec(dllexport)
#elif qhttpserver_EXPORTS // default by CMAKE
#define QHTTPREQUEST_API
#else // used outside dll
#define QHTTPREQUEST_API __declspec(dllimport)
#endif // BUILD_QHTTPREQUEST_API
#else // UNIX
#define QHTTPREQUEST_API
#endif // _WIN32

/// The QHttpRequest class represents the header and body data sent by the client.
/** The requests header data is available immediately. Body data is streamed as
it comes in via the data() signal. As a consequence the application's request
Expand All @@ -38,7 +50,7 @@
being received by the application.
The class is <b>read-only</b>. */
class QHttpRequest : public QObject
class QHTTPREQUEST_API QHttpRequest : public QObject
{
Q_OBJECT

Expand Down
1 change: 1 addition & 0 deletions src/qhttpresponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* IN THE SOFTWARE.
*/

#define BUILD_QHTTPRESPONSE_API 1
#include "qhttpresponse.h"

#include <QDateTime>
Expand Down
14 changes: 13 additions & 1 deletion src/qhttpresponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@
#ifndef Q_HTTP_RESPONSE
#define Q_HTTP_RESPONSE

#ifdef _WIN32
#ifdef BUILD_QHTTPRESPONSE_API
#define QHTTPRESPONSE_API __declspec(dllexport)
#elif qhttpserver_EXPORTS // default by CMAKE
#define QHTTPRESPONSE_API
#else // used outside dll
#define QHTTPRESPONSE_API __declspec(dllimport)
#endif // BUILD_QHTTPRESPONSE_API
#else // UNIX
#define QHTTPRESPONSE_API
#endif // _WIN32

#include "qhttpserverfwd.h"

#include <QObject>
Expand All @@ -35,7 +47,7 @@
<li>Call write() zero or more times for body data.</li>
<li>Call end() when the resonse can be sent back</li>
</ol> */
class QHttpResponse : public QObject
class QHTTPRESPONSE_API QHttpResponse : public QObject
{
Q_OBJECT

Expand Down

0 comments on commit 130cb62

Please sign in to comment.