|
| 1 | +/************************************************************************ |
| 2 | + * This file has been generated automatically from * |
| 3 | + * * |
| 4 | + * src/server/qgsbufferserverresponse.h * |
| 5 | + * * |
| 6 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 7 | + ************************************************************************/ |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +class QgsBufferServerResponse: QgsServerResponse |
| 13 | +{ |
| 14 | +%Docstring |
| 15 | + Class defining buffered response |
| 16 | +%End |
| 17 | + |
| 18 | +%TypeHeaderCode |
| 19 | +#include "qgsbufferserverresponse.h" |
| 20 | +%End |
| 21 | + public: |
| 22 | + |
| 23 | + QgsBufferServerResponse(); |
| 24 | + ~QgsBufferServerResponse(); |
| 25 | + |
| 26 | + |
| 27 | + virtual void setHeader( const QString &key, const QString &value ); |
| 28 | + |
| 29 | +%Docstring |
| 30 | + Set Header entry |
| 31 | + Add Header entry to the response |
| 32 | + Note that it is usually an error to set Header after data have been sent through the wire |
| 33 | +%End |
| 34 | + |
| 35 | + virtual void removeHeader( const QString &key ); |
| 36 | + |
| 37 | +%Docstring |
| 38 | + Clear header |
| 39 | + Undo a previous 'setHeader' call |
| 40 | +%End |
| 41 | + |
| 42 | + virtual QString header( const QString &key ) const; |
| 43 | + |
| 44 | +%Docstring |
| 45 | + Return the header value |
| 46 | + :rtype: str |
| 47 | +%End |
| 48 | + |
| 49 | + virtual QMap<QString, QString> headers() const; |
| 50 | +%Docstring |
| 51 | + Return all the headers |
| 52 | + :rtype: QMap<str, QString> |
| 53 | +%End |
| 54 | + |
| 55 | + virtual bool headersSent() const; |
| 56 | + |
| 57 | +%Docstring |
| 58 | + Return true if the headers have alredy been sent |
| 59 | + :rtype: bool |
| 60 | +%End |
| 61 | + |
| 62 | + virtual void setStatusCode( int code ); |
| 63 | + |
| 64 | +%Docstring |
| 65 | + Set the http status code |
| 66 | + \param code HTTP status code value |
| 67 | +%End |
| 68 | + |
| 69 | + virtual int statusCode( ) const; |
| 70 | +%Docstring |
| 71 | + Return the http status code |
| 72 | + :rtype: int |
| 73 | +%End |
| 74 | + |
| 75 | + virtual void sendError( int code, const QString &message ); |
| 76 | + |
| 77 | +%Docstring |
| 78 | + Send error |
| 79 | + This method delegates error handling at the server level. This is different |
| 80 | + from calling setReturnCode() which let you return a specific response body. |
| 81 | + Calling sendError() will end the transaction and any attempt to write data |
| 82 | + or set headers will be an error. |
| 83 | + \param code HHTP return code value |
| 84 | + \param message An informative error message |
| 85 | +%End |
| 86 | + |
| 87 | + virtual QIODevice *io(); |
| 88 | + |
| 89 | +%Docstring |
| 90 | + Return the underlying QIODevice |
| 91 | + :rtype: QIODevice |
| 92 | +%End |
| 93 | + |
| 94 | + virtual void finish(); |
| 95 | + |
| 96 | +%Docstring |
| 97 | + Finish the response, ending the transaction |
| 98 | +%End |
| 99 | + |
| 100 | + virtual void flush(); |
| 101 | + |
| 102 | +%Docstring |
| 103 | + Flushes the current output buffer to the network |
| 104 | + |
| 105 | + 'flush()' may be called multiple times. For HTTP transactions |
| 106 | + headers will be written on the first call to 'flush()'. |
| 107 | +%End |
| 108 | + |
| 109 | + virtual void clear(); |
| 110 | + |
| 111 | +%Docstring |
| 112 | + Reset all headers and content for this response |
| 113 | +%End |
| 114 | + |
| 115 | + virtual QByteArray data() const; |
| 116 | + |
| 117 | +%Docstring |
| 118 | + Get the data written so far |
| 119 | + |
| 120 | + This is implementation dependent: some implementations may not |
| 121 | + give access to the underlying and return an empty array. |
| 122 | + |
| 123 | + Note that each call to 'flush' may empty the buffer and in case |
| 124 | + of streaming process you may get partial content |
| 125 | + :rtype: QByteArray |
| 126 | +%End |
| 127 | + |
| 128 | + virtual void truncate(); |
| 129 | + |
| 130 | +%Docstring |
| 131 | + Truncate data |
| 132 | + |
| 133 | + Clear internal buffer |
| 134 | +%End |
| 135 | + |
| 136 | + QByteArray body() const; |
| 137 | +%Docstring |
| 138 | + Return body |
| 139 | + :rtype: QByteArray |
| 140 | +%End |
| 141 | + |
| 142 | + |
| 143 | + private: |
| 144 | + QgsBufferServerResponse( const QgsBufferServerResponse & ) ; |
| 145 | +}; |
| 146 | + |
| 147 | +/************************************************************************ |
| 148 | + * This file has been generated automatically from * |
| 149 | + * * |
| 150 | + * src/server/qgsbufferserverresponse.h * |
| 151 | + * * |
| 152 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 153 | + ************************************************************************/ |
0 commit comments