Remoto - VFS: VFS_httpd_responder Class Reference
Remoto - VFS

Holds the request and response objects for future use. More...

#include <VFS_httpd.h>

Inheritance diagram for VFS_httpd_responder:
VFS_httpd_browser_responder

Signals

void done ()
 signal that this responder is complete, and can be deleted More...
 

Public Member Functions

 VFS_httpd_responder (QHttpRequest *req, QHttpResponse *resp)
 
virtual ~VFS_httpd_responder ()
 VFS_httpd_responder destructor. More...
 
virtual void respond ()
 Send an http response back to the client. More...
 
virtual void validatePath (QUrl url)
 Validates the incoming path. More...
 

Public Attributes

QHttpRequest * _m_req
 http request object More...
 
QHttpResponse * _m_resp
 http response object More...
 
QString _mime
 mime type to send More...
 
QString _path
 path component of url More...
 
quint64 _size
 the size of the response data More...
 
int _status
 http status More...
 
QUrl _url
 requested url More...
 

Protected Slots

virtual void accumulate (const QByteArray &)
 This seems to be used during an http push request. More...
 

Protected Member Functions

virtual QByteArray errorPage ()
 The default error page. More...
 

Detailed Description

Holds the request and response objects for future use.

If any processing or extra work is to be done, it will be in a subclass of this object.

Definition at line 44 of file VFS_httpd.h.

Constructor & Destructor Documentation

◆ VFS_httpd_responder()

VFS_httpd_responder::VFS_httpd_responder ( QHttpRequest *  req,
QHttpResponse *  resp 
)
Parameters
reqrequest object
respresponse object

Definition at line 206 of file VFS_httpd.cpp.

◆ ~VFS_httpd_responder()

VFS_httpd_responder::~VFS_httpd_responder ( )
virtual

VFS_httpd_responder destructor.

This also deletes the m_req and m_resp pointers.

Definition at line 221 of file VFS_httpd.cpp.

Member Function Documentation

◆ accumulate

void VFS_httpd_responder::accumulate ( const QByteArray &  data)
protectedvirtualslot

This seems to be used during an http push request.

Parameters
dataData to accumulate

This is unused, but may be usful in another implementation, if subclassed.

Definition at line 279 of file VFS_httpd.cpp.

◆ done

void VFS_httpd_responder::done ( )
signal

signal that this responder is complete, and can be deleted

◆ errorPage()

QByteArray VFS_httpd_responder::errorPage ( )
protectedvirtual

The default error page.

Returns
The error page html

Should be subclassed if you want something fancy.

Definition at line 296 of file VFS_httpd.cpp.

◆ respond()

void VFS_httpd_responder::respond ( )
virtual

Send an http response back to the client.

This also creates the connections needed to delete this responder once it has completed.

Reimplemented in VFS_httpd_browser_responder.

Definition at line 236 of file VFS_httpd.cpp.

◆ validatePath()

void VFS_httpd_responder::validatePath ( QUrl  url)
virtual

Validates the incoming path.

Parameters
urlThe url

The base class definition always returns http 403:forbidden. It should be subclassed.

Reimplemented in VFS_httpd_browser_responder.

Definition at line 263 of file VFS_httpd.cpp.

Member Data Documentation

◆ _m_req

QHttpRequest* VFS_httpd_responder::_m_req

http request object

Definition at line 54 of file VFS_httpd.h.

◆ _m_resp

QHttpResponse* VFS_httpd_responder::_m_resp

http response object

Definition at line 55 of file VFS_httpd.h.

◆ _mime

QString VFS_httpd_responder::_mime

mime type to send

Definition at line 59 of file VFS_httpd.h.

◆ _path

QString VFS_httpd_responder::_path

path component of url

Definition at line 58 of file VFS_httpd.h.

◆ _size

quint64 VFS_httpd_responder::_size

the size of the response data

Definition at line 60 of file VFS_httpd.h.

◆ _status

int VFS_httpd_responder::_status

http status

Definition at line 61 of file VFS_httpd.h.

◆ _url

QUrl VFS_httpd_responder::_url

requested url

Definition at line 57 of file VFS_httpd.h.


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