KNewStuff
dxs.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KNEWSTUFF2_DXS_DXS_H
00022 #define KNEWSTUFF2_DXS_DXS_H
00023
00024 #include <knewstuff2/core/entry.h>
00025 #include <QtCore/QObject>
00026
00027 #include <kurl.h>
00028
00029 class QDomNode;
00030
00031 namespace KNS
00032 {
00033
00034 class Soap;
00035 class Category;
00036 class Feed;
00037 class Provider;
00038
00050 class Dxs : public QObject
00051 {
00052 Q_OBJECT
00053 public:
00054 Dxs(QObject* parent, KNS::Provider * provider);
00055 ~Dxs();
00056 void setEndpoint(KUrl endpoint);
00057
00061 void call_info();
00062
00066 void call_categories();
00067
00073 void call_entries(QString category, QString feed);
00074
00079 void call_comments(int id);
00080
00085 void call_changes(int id);
00086
00091 void call_history(int id);
00092
00097 void call_removal(int id);
00098
00104 void call_subscription(int id, bool subscribe);
00105
00111 void call_comment(int id, QString comment);
00112
00118 void call_rating(int id, int rating);
00119
00120 Provider *provider();
00121
00122 signals:
00123 void signalInfo(QString provider, QString server, QString version);
00124 void signalCategories(QList<KNS::Category*> categories);
00125 void signalEntries(KNS::Entry::List entries, Feed * feed);
00126 void signalComments(QStringList comments);
00127 void signalChanges(QStringList comments);
00128 void signalHistory(QStringList entries);
00129 void signalRemoval(bool success);
00130 void signalSubscription(bool success);
00131 void signalComment(bool success);
00132 void signalRating(bool success);
00133 void signalFault();
00134 void signalError();
00135
00136 private slots:
00141 void slotResult(QDomNode node, int jobid);
00142
00146 void slotError();
00147
00148 private:
00149 Soap *m_soap;
00150 KUrl m_endpoint;
00151 Provider *m_provider;
00152 QMap<int, Feed*> m_jobfeeds;
00153 };
00154
00155 }
00156
00157 #endif