KVIrc  4.9.2
DeveloperAPIs
KvsObject_http.h
Go to the documentation of this file.
1 #ifndef _CLASS_HTTP_H_
2 #define _CLASS_HTTP_H_
3 //=============================================================================
4 //
5 // File : KvsObject_http.h
6 // Creation date : Fry Sep 5 18:13:45 2008 GMT by Carbone Alesssandro
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2008 Alessandro Carbone (elfonol at gmail dot com)
10 //
11 // This program is FREE software. You can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
16 // This program is distributed in the HOPE that it will be USEFUL,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 // See the GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, write to the Free Software Foundation,
23 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 //
25 //=============================================================================
26 
27 //===============================================================
28 #include "object_macros.h"
29 
30 class QHttp;
32 
33 #include <QFile>
34 #include <QHash>
35 #include <QSslError>
36 
38 {
39  Q_OBJECT
40 public:
42 protected:
44  QHash<int, QFile *> getDict;
45  bool m_bAbort;
47 
48 protected:
67  void redirect(QString & file, const QHttpResponseHeader & r);
68 
69 #ifndef QT_NO_OPENSSL
72 #endif
73 
74 protected slots:
75  void slotRequestFinished(int id, bool error);
76  void slotDone(bool error);
77  void slotRequestStarted(int id);
78  void slotDataSendProgress(int done, int total);
79  void slotDataReadProgress(int done, int total);
80 #ifndef QT_NO_OPENSSL
81  void slotSslErrors(QList<QSslError>);
82 #endif
84  void slotReadyRead(const QHttpResponseHeader & r);
85  void slotStateChanged(int state);
86 };
87 
88 #endif //_CLASS_HTTP_H_
bool functionRequestStartedEvent(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:415
bool functionSetHost(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:216
void slotReadyRead(const QHttpResponseHeader &r)
Definition: KvsObject_http.cpp:517
void redirect(QString &file, const QHttpResponseHeader &r)
Definition: KvsObject_http.cpp:473
char s char s char s s s s s char char c s *s c s s s d c s *s d c d d d d c
Definition: KviIrcNumericCodes.h:391
bool functionDoneEvent(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:451
void slotRequestStarted(int id)
Definition: KvsObject_http.cpp:420
bool functionSetProxy(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:269
Definition: KviKvsObjectFunctionCall.h:33
bool functionReadAll(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:351
Definition: KviKvsObject.h:50
void slotDataReadProgress(int done, int total)
Definition: KvsObject_http.cpp:427
bool functionPost(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:318
bool functionErrorString(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:357
bool functionResponseHeaderReceivedEvent(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:463
void slotRequestFinished(int id, bool error)
Definition: KvsObject_http.cpp:380
void slotDone(bool error)
Definition: KvsObject_http.cpp:456
bool functionDataReadProgressEvent(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:434
bool functionSetUser(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:257
bool functionStateChangedEvent(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:568
void done()
Definition: KviKvs.cpp:50
bool functionRequestFinishedEvent(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:374
void slotDataSendProgress(int done, int total)
Definition: KvsObject_http.cpp:439
void slotSslErrors(QList< QSslError >)
Definition: KvsObject_http.cpp:582
bool functionAbort(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:344
void slotStateChanged(int state)
Definition: KvsObject_http.cpp:546
#define KVSO_DECLARE_OBJECT(__className)
Definition: object_macros.h:33
bool functionIgnoreSslErrors(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:576
#define r
Definition: detector.cpp:82
bool functionCurrentId(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:251
bool m_bAbort
Definition: KvsObject_http.h:45
The QHttp class provides an implementation of the HTTP protocol.
Definition: qhttp.h:168
bool functionReadyReadEvent(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:468
bool m_bEnableForceRedirect
Definition: KvsObject_http.h:46
QHttp * m_pHttp
Definition: KvsObject_http.h:43
Definition: KvsObject_http.h:37
bool functionFollowRedirect(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:363
QHash< int, QFile * > getDict
Definition: KvsObject_http.h:44
bool functionSslErrorsEvent(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:595
The QHttpResponseHeader class contains response header information for HTTP.
Definition: qhttp.h:114
void slotResponseHeaderReceived(const QHttpResponseHeader &r)
Definition: KvsObject_http.cpp:484
bool functionDataSendProgressEvent(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:446
bool functionGet(KviKvsObjectFunctionCall *c)
Definition: KvsObject_http.cpp:285