-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwpcontent.h
More file actions
79 lines (61 loc) · 1.56 KB
/
wpcontent.h
File metadata and controls
79 lines (61 loc) · 1.56 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
70
71
72
73
74
75
76
77
78
79
#ifndef WPCONTENT_H
#define WPCONTENT_H
#include <QObject>
#include "downloader.h"
#include "daye.h"
/*默认作者1号
*网址格式http://.....com
*特色图使用外链,插件
*
*
*
*/
#define FLAGFORINIT 0
#define FLAGFORCATEGORY 1
#define FLAGFORPOSTID 2
class wpcontent : public QObject
{
Q_OBJECT
public:
explicit wpcontent(QObject *parent = nullptr);
~wpcontent();
void init(QString site,QString userName,QString pwd);
void setPostData();
void publish(QString inTitle,QStringList inPicLinkList,QString inCategory);
QMap<QString,int> getCategoryList();
signals:
void finished();
void status(QString);
void wpLoginFinished();
void wpLoginFailed(QString);
void categoryGot();
private slots:
void redirected(QString u);
void downloaderFinished();
private:
QString siteUrl;
QString user;
QString passWord;
QString post_category; //文章分类编号
QString title;
QString content;
QString fifu; //特色图链接
downloader *dGet;
downloader *dPost;
downloader *d;
int flag;
QMap<QString,int> categoryList;
QStringList picLinkList;
QString _wpnonce;
QString post_ID;
QString meta_box_order_nonce;
QString closedpostboxesnonce;
QString samplepermalinknonce;
QString _ajax_nonceaddcategory;
QString _ajax_nonceaddmeta;
void login();
void getCategoryRequest();
void picLinkList2Content();
void getPostId();
};
#endif // WPCONTENT_H