Changeset View
Changeset View
Standalone View
Standalone View
src/services/ServicePluginManager.h
Show All 39 Lines | 39 | public: | |||
---|---|---|---|---|---|
40 | 40 | | |||
41 | static ServicePluginManager *instance(); | 41 | static ServicePluginManager *instance(); | ||
42 | static void destroy(); | 42 | static void destroy(); | ||
43 | 43 | | |||
44 | /** | 44 | /** | ||
45 | * Load any services that are configured to be loaded. | 45 | * Load any services that are configured to be loaded. | ||
46 | * Unload any services that have been switched off. | 46 | * Unload any services that have been switched off. | ||
47 | */ | 47 | */ | ||
48 | void setFactories( const QList<Plugins::PluginFactory*> &factories ); | 48 | void setFactories( const QList<QSharedPointer<Plugins::PluginFactory> > &factories ); | ||
49 | 49 | | |||
50 | public Q_SLOTS: | 50 | public Q_SLOTS: | ||
51 | QStringList loadedServices() const; | 51 | QStringList loadedServices() const; | ||
52 | QStringList loadedServiceNames() const; | 52 | QStringList loadedServiceNames() const; | ||
53 | QString serviceDescription( const QString &service ); | 53 | QString serviceDescription( const QString &service ); | ||
54 | QString serviceMessages( const QString &service ); | 54 | QString serviceMessages( const QString &service ); | ||
55 | QString sendMessage( const QString &service, const QString &message ); | 55 | QString sendMessage( const QString &service, const QString &message ); | ||
56 | 56 | | |||
57 | private: | 57 | private: | ||
58 | static ServicePluginManager* s_instance; | 58 | static ServicePluginManager* s_instance; | ||
59 | ServicePluginManager(); | 59 | ServicePluginManager(); | ||
60 | ~ServicePluginManager(); | 60 | ~ServicePluginManager(); | ||
61 | 61 | | |||
62 | Q_DISABLE_COPY( ServicePluginManager ) | 62 | Q_DISABLE_COPY( ServicePluginManager ) | ||
63 | 63 | | |||
64 | /** The list of currently set factories. | 64 | /** The list of currently set factories. | ||
65 | * Note: the PluginManager owns the pointers. | 65 | * Note: the PluginManager owns the pointers. | ||
66 | */ | 66 | */ | ||
67 | QList<Plugins::PluginFactory*> m_factories; | 67 | QList<QSharedPointer<Plugins::PluginFactory> > m_factories; | ||
68 | 68 | | |||
69 | private Q_SLOTS: | 69 | private Q_SLOTS: | ||
70 | void slotNewService( ServiceBase *newService); | 70 | void slotNewService( ServiceBase *newService); | ||
71 | void slotRemoveService( ServiceBase *removedService ); | 71 | void slotRemoveService( ServiceBase *removedService ); | ||
72 | }; | 72 | }; | ||
73 | 73 | | |||
74 | 74 | | |||
75 | #endif //AMAROK_SERVICEPLUGINMANAGER_H | 75 | #endif //AMAROK_SERVICEPLUGINMANAGER_H | ||
76 | 76 | |