|
qTbot 0.2.123.6f57966
qTbot is base back end library for your c++ Qt projects.
|
The iRequest class Is main interface for all custom requests. More...
#include <irequest.h>


Public Types | |
| enum | RequestMethod { Get , Post , Upload } |
| RequestMethod This is the list of supported request types. More... | |
| enum | RequestPriority { NoPriority = 0 , LowPriority = 1 , NormalPriority = 2 , HighPriority = 3 , UngeredPriority = 4 , MaxPriorityValue = 0xff } |
| The RequestPriority enum This is the list of request execution priorities on the client side. More... | |
Public Member Functions | |
| iRequest () | |
| iRequest default constructor. | |
| virtual QString | makeUpload () const |
| makeUpload This method prepares the data to upload. | |
| virtual QString | baseAddress () const =0 |
| baseAddress This method returns the base domain of the remote server. | |
| virtual RequestMethod | method () const =0 |
| method returns the method of the request. | |
| const QString & | request () const |
| request Returns the current request command. | |
| void | setRequest (const QString &newRequest) |
| setRequest sets a custom request command | |
| const QMap< QString, QVariant > & | args () const |
| args This method returns the the current list of arguments | |
| void | addArg (const QString &key, const QVariant &val) |
| addArg This method pushes a new argument to the arguments list | |
| void | setArgs (const QMap< QString, QVariant > &newArgs) |
| setArgs For some requests the list of arguments is possible to build only after the constructor. | |
| QString | argsToUrl () const |
| argsToUrl This method converts the arguments to a URL string. | |
| QSharedPointer< QHttpMultiPart > | argsToMultipartFormData () const |
| argsToMultipartFormData This method generates multipart/form-data request data. | |
| RequestPriority | priority () const |
| priority This is the priority of executing this request on the client. | |
| void | setPriority (RequestPriority newPriority) |
| setPriority This method sets a new priority for the request. | |
The iRequest class Is main interface for all custom requests.
Definition at line 32 of file irequest.h.
RequestMethod This is the list of supported request types.
| Enumerator | |
|---|---|
| Get | Get general get request, all request data is sent as a url line. |
| Post | Post general post request. |
| Upload | Upload this is a post request to upload big data to telegram. |
Definition at line 43 of file irequest.h.
The RequestPriority enum This is the list of request execution priorities on the client side.
Definition at line 61 of file irequest.h.
| qTbot::iRequest::iRequest | ( | ) |
iRequest default constructor.
Definition at line 15 of file irequest.cpp.
| void qTbot::iRequest::addArg | ( | const QString & | key, |
| const QVariant & | val ) |
addArg This method pushes a new argument to the arguments list
| key | This is the new argument key |
| val | This is the new argument value. |
Definition at line 34 of file irequest.cpp.

| const QMap< QString, QVariant > & qTbot::iRequest::args | ( | ) | const |
args This method returns the the current list of arguments
Definition at line 30 of file irequest.cpp.

| QSharedPointer< QHttpMultiPart > qTbot::iRequest::argsToMultipartFormData | ( | ) | const |
argsToMultipartFormData This method generates multipart/form-data request data.
Definition at line 58 of file irequest.cpp.

| QString qTbot::iRequest::argsToUrl | ( | ) | const |
argsToUrl This method converts the arguments to a URL string.
Definition at line 42 of file irequest.cpp.


|
pure virtual |
baseAddress This method returns the base domain of the remote server.
Implemented in qTbot::TelegrammDownloadFile, and qTbot::TelegramSingleRquest.
|
virtual |
makeUpload This method prepares the data to upload.
Definition at line 20 of file irequest.cpp.

|
pure virtual |
method returns the method of the request.
Implemented in qTbot::TelegramSendFile, and qTbot::TelegramSingleRquest.


| iRequest::RequestPriority qTbot::iRequest::priority | ( | ) | const |
priority This is the priority of executing this request on the client.
Definition at line 94 of file irequest.cpp.

| const QString & qTbot::iRequest::request | ( | ) | const |
request Returns the current request command.
Definition at line 102 of file irequest.cpp.

| void qTbot::iRequest::setArgs | ( | const QMap< QString, QVariant > & | newArgs | ) |
setArgs For some requests the list of arguments is possible to build only after the constructor.
| newArgs | This is the new list of arguments. |
Definition at line 38 of file irequest.cpp.

| void qTbot::iRequest::setPriority | ( | RequestPriority | newPriority | ) |
setPriority This method sets a new priority for the request.
| newPriority | This is the new priority of the request. |
Definition at line 98 of file irequest.cpp.

| void qTbot::iRequest::setRequest | ( | const QString & | newRequest | ) |
setRequest sets a custom request command
| newRequest | the new custom command of the request. |
Definition at line 106 of file irequest.cpp.
