1 /***************************************************************************
2 * Copyright (c) 2007 Nikolaj Hald Nielsen <nhnFreespirit@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 *
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
26 #include "../servicebase.h"
27 #include "scriptableservice.h"
29 class ScriptableServiceManager
: public QObject
32 Q_CLASSINFO("D-Bus Interface", "org.kde.amarok.ScriptableServiceManager")
35 ScriptableServiceManager(QObject
* parent
);
38 void addService( ServiceBase
* service
);
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 );
61 QMap
<QString
, ScriptableService
*> m_serviceMap
;