1
/***************************************************************************
2
* Copyright (C) 2009 by Kai Dombrowe <just89@gmx.de> *
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 *
16
* Free Software Foundation, Inc., *
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
18
***************************************************************************/
29
#include <kdemacros.h>
32
#include <QtCore/QObject>
33
#include <QtCore/QString>
34
#include <QtCore/QPointer>
42
class QXmlStreamReader;
43
class KDE_EXPORT BlipService : public KYouBlip::Service
49
BlipService(QObject *parent = 0);
54
QString upload(const BlipVideo *video, const QString &account, const QString &password);
55
QString search(const QString &term);
60
void cancelUpload(const QString &id);
69
typedef QPair<JobType, QString> JobData;
71
QHash<KJob*, JobData> m_jobs;
73
BlipVideo *readEntry(QXmlStreamReader *reader);
77
void jobFinished(KJob *job, const QByteArray &data);
81
void error(const QString &reason, const QString &id);
82
void uploadFinished(const KUrl &link, const QString &id);
83
void canceled(const QString &id);
84
void searchFinished(const QList<BlipVideo*> &videos, const QString &id);
90
#endif // BlipService_H