Qt 4.8
|
#include <quriloader_p.h>
Public Functions | |
virtual QNetworkReply * | createRequest (Operation op, const QNetworkRequest &req, QIODevice *outgoingData=0) |
Returns a new QNetworkReply object to handle the operation op and request req. More... | |
URILoader (QObject *const parent, const NamePool::Ptr &np, const VariableLoader::Ptr &variableLoader) | |
Public Functions inherited from QNetworkAccessManager | |
QNetworkConfiguration | activeConfiguration () const |
Returns the current active network configuration. More... | |
QAbstractNetworkCache * | cache () const |
Returns the cache that is used to store data obtained from the network. More... | |
QNetworkConfiguration | configuration () const |
Returns the network configuration that will be used to create the QNetworkSession{network session} which will be used when processing network requests. More... | |
QNetworkCookieJar * | cookieJar () const |
Returns the QNetworkCookieJar that is used to store cookies obtained from the network as well as cookies that are about to be sent. More... | |
QNetworkReply * | deleteResource (const QNetworkRequest &request) |
Sends a request to delete the resource identified by the URL of request. More... | |
QNetworkReply * | get (const QNetworkRequest &request) |
Posts a request to obtain the contents of the target request and returns a new QNetworkReply object opened for reading which emits the readyRead() signal whenever new data arrives. More... | |
QNetworkReply * | head (const QNetworkRequest &request) |
Posts a request to obtain the network headers for request and returns a new QNetworkReply object which will contain such headers. More... | |
NetworkAccessibility | networkAccessible () const |
QNetworkReply * | post (const QNetworkRequest &request, QIODevice *data) |
Sends an HTTP POST request to the destination specified by request and returns a new QNetworkReply object opened for reading that will contain the reply sent by the server. More... | |
QNetworkReply * | post (const QNetworkRequest &request, const QByteArray &data) |
Sends the contents of the data byte array to the destination specified by request. More... | |
QNetworkReply * | post (const QNetworkRequest &request, QHttpMultiPart *multiPart) |
Sends the contents of the multiPart message to the destination specified by request. More... | |
QNetworkProxy | proxy () const |
Returns the QNetworkProxy that the requests sent using this QNetworkAccessManager object will use. More... | |
QNetworkProxyFactory * | proxyFactory () const |
QNetworkReply * | put (const QNetworkRequest &request, QIODevice *data) |
Uploads the contents of data to the destination request and returnes a new QNetworkReply object that will be open for reply. More... | |
QNetworkReply * | put (const QNetworkRequest &request, const QByteArray &data) |
Sends the contents of the data byte array to the destination specified by request. More... | |
QNetworkReply * | put (const QNetworkRequest &request, QHttpMultiPart *multiPart) |
Sends the contents of the multiPart message to the destination specified by request. More... | |
QNetworkAccessManager (QObject *parent=0) | |
Constructs a QNetworkAccessManager object that is the center of the Network Access API and sets parent as the parent object. More... | |
QNetworkReply * | sendCustomRequest (const QNetworkRequest &request, const QByteArray &verb, QIODevice *data=0) |
Sends a custom request to the server identified by the URL of request. More... | |
void | setCache (QAbstractNetworkCache *cache) |
Sets the manager's network cache to be the cache specified. More... | |
void | setConfiguration (const QNetworkConfiguration &config) |
Sets the network configuration that will be used when creating the QNetworkSession{network session} to config. More... | |
void | setCookieJar (QNetworkCookieJar *cookieJar) |
Sets the manager's cookie jar to be the cookieJar specified. More... | |
void | setNetworkAccessible (NetworkAccessibility accessible) |
Overrides the reported network accessibility. More... | |
void | setProxy (const QNetworkProxy &proxy) |
Sets the proxy to be used in future requests to be proxy. More... | |
void | setProxyFactory (QNetworkProxyFactory *factory) |
Sets the proxy factory for this class to be factory. More... | |
~QNetworkAccessManager () | |
Destroys the QNetworkAccessManager object and frees up any resources. More... | |
Public Functions inherited from QObject | |
bool | blockSignals (bool b) |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). More... | |
const QObjectList & | children () const |
Returns a list of child objects. More... | |
bool | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0) |
bool | disconnect (const QObject *receiver, const char *member=0) |
void | dumpObjectInfo () |
Dumps information about signal connections, etc. More... | |
void | dumpObjectTree () |
Dumps a tree of children to the debug output. More... | |
QList< QByteArray > | dynamicPropertyNames () const |
Returns the names of all properties that were dynamically added to the object using setProperty(). More... | |
virtual bool | event (QEvent *) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. More... | |
virtual bool | eventFilter (QObject *, QEvent *) |
Filters events if this object has been installed as an event filter for the watched object. More... | |
template<typename T > | |
T | findChild (const QString &aName=QString()) const |
Returns the child of this object that can be cast into type T and that is called name, or 0 if there is no such object. More... | |
template<typename T > | |
QList< T > | findChildren (const QString &aName=QString()) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. More... | |
template<typename T > | |
QList< T > | findChildren (const QRegExp &re) const |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. More... | |
void | installEventFilter (QObject *) |
Installs an event filter filterObj on this object. More... | |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false. More... | |
void | killTimer (int id) |
Kills the timer with timer identifier, id. More... | |
virtual const QMetaObject * | metaObject () const |
Returns a pointer to the meta-object of this object. More... | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. More... | |
QString | objectName () const |
QObject * | parent () const |
Returns a pointer to the parent object. More... | |
QVariant | property (const char *name) const |
Returns the value of the object's name property. More... | |
Q_INVOKABLE | QObject (QObject *parent=0) |
Constructs an object with parent object parent. More... | |
void | removeEventFilter (QObject *) |
Removes an event filter object obj from this object. More... | |
void | setObjectName (const QString &name) |
void | setParent (QObject *) |
Makes the object a child of parent. More... | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. More... | |
void | setUserData (uint id, QObjectUserData *data) |
bool | signalsBlocked () const |
Returns true if signals are blocked; otherwise returns false. More... | |
int | startTimer (int interval) |
Starts a timer and returns a timer identifier, or returns zero if it could not start a timer. More... | |
QThread * | thread () const |
Returns the thread in which the object lives. More... | |
QObjectUserData * | userData (uint id) const |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. More... | |
Properties | |
const NamePool::Ptr | m_namePool |
const VariableLoader::Ptr | m_variableLoader |
const QString | m_variableNS |
Additional Inherited Members | |
Public Types inherited from QNetworkAccessManager | |
enum | NetworkAccessibility { UnknownAccessibility = -1, NotAccessible = 0, Accessible = 1 } |
Indicates whether the network is accessible via this network access manager. More... | |
enum | Operation { HeadOperation = 1, GetOperation, PutOperation, PostOperation, DeleteOperation, CustomOperation, UnknownOperation = 0 } |
Indicates the operation this reply is processing. More... | |
Public Slots inherited from QObject | |
void | deleteLater () |
Schedules this object for deletion. More... | |
Signals inherited from QNetworkAccessManager | |
void | authenticationRequired (QNetworkReply *reply, QAuthenticator *authenticator) |
This signal is emitted whenever a final server requests authentication before it delivers the requested contents. More... | |
void | finished (QNetworkReply *reply) |
This signal is emitted whenever a pending network reply is finished. More... | |
void | networkAccessibleChanged (QNetworkAccessManager::NetworkAccessibility accessible) |
This signal is emitted when the value of the networkAccessible property changes. More... | |
void | networkSessionConnected () |
This signal is emitted when the status of the network session changes into a usable (Connected) state. More... | |
void | proxyAuthenticationRequired (const QNetworkProxy &proxy, QAuthenticator *authenticator) |
This signal is emitted whenever a proxy requests authentication and QNetworkAccessManager cannot find a valid, cached credential. More... | |
void | sslErrors (QNetworkReply *reply, const QList< QSslError > &errors) |
This signal is emitted if the SSL/TLS session encountered errors during the set up, including certificate verification errors. More... | |
Signals inherited from QObject | |
void | destroyed (QObject *=0) |
This signal is emitted immediately before the object obj is destroyed, and can not be blocked. More... | |
Static Public Functions inherited from QObject | |
static bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
Creates a connection of the given type from the signal in the sender object to the method in the receiver object. More... | |
static bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
Disconnects signal in object sender from method in object receiver. More... | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static uint | registerUserData () |
static QString | tr (const char *sourceText, const char *comment=0, int n=-1) |
static QString | trUtf8 (const char *sourceText, const char *comment=0, int n=-1) |
Static Public Variables inherited from QObject | |
static const QMetaObject | staticMetaObject |
This variable stores the meta-object for the class. More... | |
Protected Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *) |
This event handler can be reimplemented in a subclass to receive child events. More... | |
virtual void | connectNotify (const char *signal) |
This virtual function is called when something has been connected to signal in this object. More... | |
virtual void | customEvent (QEvent *) |
This event handler can be reimplemented in a subclass to receive custom events. More... | |
virtual void | disconnectNotify (const char *signal) |
This virtual function is called when something has been disconnected from signal in this object. More... | |
QObject (QObjectPrivate &dd, QObject *parent=0) | |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. More... | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns 0. More... | |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *) |
This event handler can be reimplemented in a subclass to receive timer events for the object. More... | |
Protected Variables inherited from QObject | |
QScopedPointer< QObjectData > | d_ptr |
Static Protected Variables inherited from QObject | |
static const QMetaObject | staticQtMetaObject |
Related Functions inherited from QObject | |
T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QRegExp ®Exp)() |
T * | qobject_cast (QObject *object) |
QObjectList | |
void * | qt_find_obj_child (QObject *parent, const char *type, const QString &name) |
Returns a pointer to the object named name that inherits type and with a given parent. More... | |
Definition at line 65 of file quriloader_p.h.
URILoader::URILoader | ( | QObject *const | parent, |
const NamePool::Ptr & | np, | ||
const VariableLoader::Ptr & | variableLoader | ||
) |
Definition at line 52 of file quriloader.cpp.
|
virtual |
Returns a new QNetworkReply object to handle the operation op and request req.
The device outgoingData is always 0 for Get and Head requests, but is the value passed to post() and put() in those operations (the QByteArray variants will pass a QBuffer object).
The default implementation calls QNetworkCookieJar::cookiesForUrl() on the cookie jar set with setCookieJar() to obtain the cookies to be sent to the remote server.
The returned object must be in an open state.
Reimplemented from QNetworkAccessManager.
Definition at line 62 of file quriloader.cpp.
|
private |
Definition at line 78 of file quriloader_p.h.
Referenced by createRequest().
|
private |
Definition at line 79 of file quriloader_p.h.
Referenced by createRequest(), and URILoader().
|
private |
Definition at line 77 of file quriloader_p.h.
Referenced by createRequest().