/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. #include <QBuffer>
  23. #include <QHttp>
  24. #include <QObject>
  25. /**
  26. @author Steve Merrony
  27. */
  28. class patchExchange : public QObject {
  29. Q_OBJECT
  30. public:
  31. patchExchange( QWidget *parent = 0 );
  32. ~patchExchange();
  33. void testConnection( QString );
  34. void testUser( QString, QString, QString );
  35. void getDropdowns( QString url );
  36. QString requestStatus();
  37. void getStats( QString url );
  38. void insertPatch( QString url, QString userid, QString passwd,
  39. QString patch_name,
  40. QString origin,
  41. QString patch_type,
  42. QString description,
  43. QString isprivate,
  44. QString tags,
  45. QString hex_patch );
  46. void query( QString url, QString userid, QString passwd,
  47. QString ptype,
  48. QString since,
  49. QString contrib,
  50. QString origin,
  51. QString tags );
  52. void getDetails( QString url, QString userid, QString passwd,
  53. int patch_id );
  54. void deletePatch( QString url, QString userid, QString passwd,
  55. int patch_id );
  56. signals:
  57. void connectionState( QString );
  58. void loginState( QString );
  59. void dropdownData( QStringList );
  60. void insertResponse( QString );
  61. void queryResponse( QString );
  62. void detailsResponse( QString );
  63. void statsResponse( QString );
  64. void deleteResponse( QString );
  65. private slots:
  66. //void httpDone( bool );
  67. void finished( int, bool);
  68. void exchangeClipboardResponse( QString response );
  69. private:
  70. QHttp *http;
  71. QBuffer *html_buff;
  72. QByteArray *html_arr;
  73. QWidget *owner;
  74. int host_id, ct_id, vu_id, dd_id, ins_id, qry_id, details_id, delete_id, stats_id;
  75. };
  76. #endif