From c601b5a27f74b16158adafe429faefbe573e64a2 Mon Sep 17 00:00:00 2001 From: Szymon Tomasz Stefanek Date: Sat, 1 Jan 2011 20:19:56 +0000 Subject: The big rename for modules. Still some details remaining. git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5284 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/objects/KvsObject_http.h | 89 ++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 src/modules/objects/KvsObject_http.h (limited to 'src/modules/objects/KvsObject_http.h') diff --git a/src/modules/objects/KvsObject_http.h b/src/modules/objects/KvsObject_http.h new file mode 100644 index 000000000..1ef5ef592 --- /dev/null +++ b/src/modules/objects/KvsObject_http.h @@ -0,0 +1,89 @@ +#ifndef _CLASS_HTTP_H_ +#define _CLASS_HTTP_H_ +//============================================================================= +// +// File : KvsObject_http.h +// Creation date : Fry Sep 5 18:13:45 2008 GMT by Carbone Alesssandro +// +// This file is part of the KVIrc irc client distribution +// Copyright (C) 2008 Alessandro Carbone (elfonol at gmail dot com) +// +// This program is FREE software. You can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your opinion) any later version. +// +// This program is distributed in the HOPE that it will be USEFUL, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +//============================================================================= + + + + +//=============================================================== +#include "object_macros.h" +#include +#include +#include +#include + +class KvsObject_http : public KviKvsObject +{ + Q_OBJECT +public: + KVSO_DECLARE_OBJECT(KvsObject_http) +protected: + QHttp *m_pHttp; + QHash getDict; + bool m_bAbort; + bool m_bEnableForceRedirect; +protected: + bool functionSetHost(KviKvsObjectFunctionCall *c); + bool functionGet(KviKvsObjectFunctionCall *c); + bool functionSetUser(KviKvsObjectFunctionCall *c); + bool functionSetProxy(KviKvsObjectFunctionCall *c); + bool functionRequestFinishedEvent(KviKvsObjectFunctionCall *c); + bool functionRequestStartedEvent(KviKvsObjectFunctionCall *c); + bool functionDataReadProgressEvent(KviKvsObjectFunctionCall *c); + bool functionDataSendProgressEvent(KviKvsObjectFunctionCall *c); + bool functionResponseHeaderReceivedEvent(KviKvsObjectFunctionCall *c); + bool functionAbort(KviKvsObjectFunctionCall *c); + bool functionDoneEvent(KviKvsObjectFunctionCall *c); + bool functionStateChangedEvent(KviKvsObjectFunctionCall *c); + bool functionReadAll(KviKvsObjectFunctionCall *c); + bool functionReadyReadEvent(KviKvsObjectFunctionCall *c); + bool functionErrorString(KviKvsObjectFunctionCall *c); + bool functionPost(KviKvsObjectFunctionCall *c); + bool functionFollowRedirect(KviKvsObjectFunctionCall *c); + bool functionCurrentId(KviKvsObjectFunctionCall *c); + void redirect(QString &file,const QHttpResponseHeader &r); + + #ifndef QT_NO_OPENSSL + bool functionIgnoreSslErrors(KviKvsObjectFunctionCall *c); + bool functionSslErrorsEvent(KviKvsObjectFunctionCall *c); + #endif + +protected slots: + void slotRequestFinished ( int id, bool error ); + void slotDone (bool error ); + void slotRequestStarted ( int id ); + void slotDataSendProgress ( int done, int total ); + void slotDataReadProgress ( int done, int total ); + #ifndef QT_NO_OPENSSL + void slotSslErrors(QList); + #endif + void slotResponseHeaderReceived(const QHttpResponseHeader &r); + void slotReadyRead(const QHttpResponseHeader &r); + void slotStateChanged ( int state); + + + +}; +#endif //_CLASS_HTTP_H_ -- cgit v1.3.1-10-gc9f91