more work on the dynamic scriptable service. There are some things that are fundament...
[amarok.git] / src / servicebrowser / scriptableservice / scriptableservicemanager.h
blob6e87c070452cb9a5a2c5fd3ebc7312b16eb2ee00
1 /***************************************************************************
2 * Copyright (c) 2007 Nikolaj Hald Nielsen <nhnFreespirit@gmail.com> *
3 * *
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. *
8 * *
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. *
13 * *
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 02111-1307, USA. *
18 ***************************************************************************/
20 #ifndef AMAROKSCRIPTABLESERVICEMANAGER_H
21 #define AMAROKSCRIPTABLESERVICEMANAGER_H
23 #include <QObject>
24 #include <QString>
26 #include "../servicebase.h"
27 #include "scriptableservice.h"
29 class ScriptableServiceManager : public QObject
31 Q_OBJECT
32 Q_CLASSINFO("D-Bus Interface", "org.kde.amarok.ScriptableServiceManager")
34 public:
35 ScriptableServiceManager(QObject* parent);
37 Q_SIGNALS:
38 void addService( ServiceBase * service );
40 public Q_SLOTS:
42 Q_SCRIPTABLE bool createService( const QString &name, const QString &listHeader, const QString &rootHtml);
44 Q_SCRIPTABLE bool createDynamicService( const QString &name, const QString &listHeader, const QString &rootHtml, QString callbackScript );
47 Q_SCRIPTABLE int insertTrack( const QString &serviceName, const QString &name, const QString &url, const QString &infoHtml, int albumId );
48 Q_SCRIPTABLE int insertAlbum( const QString &serviceName, const QString &name, const QString &infoHtml, const QString &callbackData);
51 Q_SCRIPTABLE void donePopulating( const QString &serviceName, int parentId );
54 /*Q_SCRIPTABLE int insertDynamicElement( const QString &name, const QString &callbackScript,
55 const QString &callbackArgument, const QString &infoHtml,
56 int parentId, const QString &serviceName); */
57 //Q_SCRIPTABLE bool updateComplete( const QString &serviceName );
59 private:
61 QMap<QString, ScriptableService *> m_serviceMap;
62 QString m_rootHtml;
64 #endif