PageRenderTime 39ms CodeModel.GetById 28ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/patchexchange.h

http://ewitool.googlecode.com/
C++ Header | 85 lines | 53 code | 9 blank | 23 comment | 0 complexity | 2a95be2e4b00cbb2b731168fab0d09b2 MD5 | raw file
 1/***************************************************************************
 2 *   Copyright (C) 2008 by Steve Merrony   *
 3 *   steve@brahma   *
 4 *                                                                         *
 5 *   This program is free software; you can redistribute it and/or modify  *
 6 *   it under the terms of the GNU General Public License as published by  *
 7 *   the Free Software Foundation; either version 3 of the License, or     *
 8 *   (at your option) any later version.                                   *
 9 *                                                                         *
10 *   This program is distributed in the hope that it will be useful,       *
11 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13 *   GNU General Public License for more details.                          *
14 *                                                                         *
15 *   You should have received a copy of the GNU General Public License     *
16 *   along with this program; if not, write to the                         *
17 *   Free Software Foundation, Inc.,                                       *
18 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19 ***************************************************************************/
20#ifndef PATCHEXCHANGE_H
21#define PATCHEXCHANGE_H
22
23#include <QBuffer>
24#include <QHttp>
25#include <QObject>
26
27/**
28	@author Steve Merrony 
29*/
30class patchExchange : public QObject {
31		Q_OBJECT
32
33	public:
34		patchExchange( QWidget *parent = 0 );
35		~patchExchange();
36
37		void testConnection( QString );
38		void testUser( QString, QString, QString );
39		void getDropdowns( QString url );
40		QString requestStatus();
41		void getStats( QString url );
42		void insertPatch( QString url, QString userid, QString passwd, 
43						  QString patch_name, 
44						  QString origin, 
45						  QString patch_type, 
46						  QString description,
47						  QString isprivate,
48						  QString tags,
49						  QString hex_patch );
50		void query( QString url, QString userid, QString passwd, 
51				   QString ptype,
52				   QString since,
53				   QString contrib,
54				   QString origin,
55				   QString tags );
56		void getDetails( QString url, QString userid, QString passwd, 
57						 int patch_id );
58		void deletePatch( QString url, QString userid, QString passwd, 
59						 int patch_id );
60		
61	signals:
62		void connectionState( QString );
63		void loginState( QString );
64		void dropdownData( QStringList );
65		void insertResponse( QString );
66		void queryResponse( QString );
67		void detailsResponse( QString );
68		void statsResponse( QString );
69		void deleteResponse( QString );
70		
71	private slots:
72		//void httpDone( bool );
73		void finished( int, bool);
74		void exchangeClipboardResponse( QString response );
75		
76	private:
77		QHttp *http;
78		QBuffer *html_buff;
79		QByteArray *html_arr;
80		QWidget *owner;
81		int		host_id, ct_id, vu_id, dd_id, ins_id, qry_id, details_id, delete_id, stats_id;
82		
83};
84
85#endif