-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwordpressapi.h
More file actions
69 lines (62 loc) · 1.87 KB
/
Copy pathwordpressapi.h
File metadata and controls
69 lines (62 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
* Copyright (c) 2010 Kaushal M <kshlmster@gmail.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 option) 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.
*/
#ifndef WORDPRESSAPI_H
#define WORDPRESSAPI_H
#include <QObject>
#include "wordpresspost.h"
#include <QDomDocument>
#include <QStringList>
class MaiaXmlRpcClient;
class QUrl;
class KoStore;
class wordpressApi : public QObject
{
Q_OBJECT
public:
wordpressApi(QString &blogUrl, QObject *parent = 0);
private:
MaiaXmlRpcClient * client;
QUrl *xmlrpcUrl;
int blogid;
QString username;
QString password;
wordpressPost post;
KoStore *store;
QDomDocument doc;
QStringList imgUrlList;
public:
void setUsername(QString &);
void setPassword(QString &);
void getBlogid();
void setBlogid(int);
void setKoStore(KoStore *);
void newPost(wordpressPost &);
void uploadImages();
void uploadImage(QString pathInStore);
private slots:
void getBlogidSlot(QVariant &);
void newPostSlot(QVariant &);
void uploadImageSlot(QVariant &);
void xmlrpcFaultSlot(int error, const QString message);
signals:
void imageUploaded();
void newPostSignal(qulonglong);
void getBlogidSignal(int);
void wordpressError();
};
#endif // WORDPRESSAPI_H