2 * Copyright (c) 2010 Kaushal M <kshlmster@gmail.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 #include <QNetworkAccessManager>
26 #include <QNetworkRequest>
27 #include <QNetworkCookieJar>
30 struct SlideShareDocument;
32 class SlideShare : public QObject
37 SlideShare(QObject *parent = 0);
38 SlideShare(QString *username, QString *password, QObject *parent = 0);
39 SlideShare(QString *username, QString *password, QString *apiKey, QString *secretKey, QObject *parent);
44 void download(QString *durl);
46 void searchByTags(QString *tag);
48 void setApikey(QString *apiKey);
49 void setsecretKey(QString *secretKey);
51 void setUsername(QString *username);
52 void setPassword(QString *password);
54 void setSlideTitle(QString *title);
55 void setDescription(QString *description);
56 void setTags(QString *tags);
57 void setFormat(QString *format);
59 void setSourceFile(QString *filename);
60 void setSaveFileName(QString *saveFileName);
62 QList<SlideShareDocument> textDocList;
63 QList<SlideShareDocument> presentationList;
64 QList<SlideShareDocument> spreadsheetList;
72 QString *sourceFilename;
73 QString *saveFileName;
75 SlideShareDocument *doc;
79 QNetworkAccessManager manager;
80 QNetworkCookieJar cookieJar;
83 void getThumbnailSmall();
84 void getThumbnailBig();
93 void downloadProgress(qint64 bytesSent, qint64 bytesTotal);
94 void uploadProgress(qint64 bytesSent, qint64 bytesTotal);
102 #endif // SLIDESHARE_H