PACK Qt Binding  $VERSION$
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Friends | List of all members
WServerReply Class Reference

reply object for the server side: contains the data sent back to the client More...

#include <server.h>

Public Member Functions

 WServerReply ()
 creates an invalid reply (500 Server Error) More...
 
 WServerReply (const WServerReply &)=default
 copies the reply object More...
 
WServerReplyoperator= (const WServerReply &)=default
 copies the reply object More...
 
bool setStatus (short code, QString str)
 sets the return status of the reply More...
 
bool setHeader (const QString &, const QString &)
 sets a specific header, Content-Length cannot be overridden More...
 
void setBody (const QString &)
 converts the string to UTF-8 and sets it as the message body More...
 
void setBody (const QByteArray &)
 sets the message body and the Content-Length header accordingly More...
 

Protected Member Functions

QByteArray toWireFormat () const
 

Friends

class WServer
 

Detailed Description

reply object for the server side: contains the data sent back to the client

Constructor & Destructor Documentation

WServerReply::WServerReply ( )

creates an invalid reply (500 Server Error)

WServerReply::WServerReply ( const WServerReply )
default

copies the reply object

Member Function Documentation

WServerReply& WServerReply::operator= ( const WServerReply )
default

copies the reply object

void WServerReply::setBody ( const QString &  b)

converts the string to UTF-8 and sets it as the message body

void WServerReply::setBody ( const QByteArray &  b)

sets the message body and the Content-Length header accordingly

bool WServerReply::setHeader ( const QString &  h,
const QString &  c 
)

sets a specific header, Content-Length cannot be overridden

bool WServerReply::setStatus ( short  code,
QString  str 
)

sets the return status of the reply

QByteArray WServerReply::toWireFormat ( ) const
protected

Friends And Related Function Documentation

friend class WServer
friend

The documentation for this class was generated from the following files: