2
* Copyright 2009 Artur Duque de Souza <asouza@kde.org>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Library General Public License as
6
* published by the Free Software Foundation; either version 2 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 Library General Public
15
* License 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.
20
#include "pastebinengine.h"
21
#include "pastebinservice.h"
23
PastebinEngine::PastebinEngine(QObject* parent, const QVariantList& args)
24
: Plasma::DataEngine(parent, args)
29
void PastebinEngine::init()
31
Plasma::DataEngine::Data data;
32
data.insert("pastebin.ca", PastebinService::PASTEBINCA);
33
data.insert("pastebin.com", PastebinService::PASTEBINCOM);
34
setData("textservers", data);
37
data.insert("imgur", PastebinService::IMGUR);
38
data.insert("imagebin.ca", PastebinService::IMAGEBINCA);
39
data.insert("imagashack", PastebinService::IMAGESHACK);
40
data.insert("simplesttimagehosting", PastebinService::SIMPLESTIMAGEHOSTING);
41
setData("imageservers", data);
44
Plasma::Service *PastebinEngine::serviceForSource(const QString &source)
47
PastebinService *service = new PastebinService(this);
48
service->setParent(this);
52
K_EXPORT_PLASMA_DATAENGINE(pastebin, PastebinEngine)