|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: The private implementation of the HsWidgetRegistryService. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef HSWIDGETREGISTRYSERVICE_P_H |
|
20 #define HSWIDGETREGISTRYSERVICE_P_H |
|
21 |
|
22 #include <QObject> |
|
23 #include <QSharedPointer> |
|
24 #include <QStringList> |
|
25 #include <QMap> |
|
26 #include <QFileSystemWatcher> |
|
27 |
|
28 #include "hsiwidgetprovider.h" |
|
29 |
|
30 class HsWidgetRegistryService; |
|
31 |
|
32 class HsWidgetRegistryServicePrivate : public QObject |
|
33 { |
|
34 Q_OBJECT |
|
35 |
|
36 public: |
|
37 |
|
38 HsWidgetRegistryServicePrivate(const QString &installationPath, |
|
39 HsWidgetRegistryService *ptrToPublic, QObject *parent=0); |
|
40 |
|
41 ~HsWidgetRegistryServicePrivate(); |
|
42 |
|
43 QList<HsWidgetToken> widgets(); |
|
44 |
|
45 private: |
|
46 |
|
47 Q_DISABLE_COPY(HsWidgetRegistryServicePrivate) |
|
48 |
|
49 IHsWidgetProvider *loadProviderFromPlugin(const QString &pluginName); |
|
50 |
|
51 QStringList readManifestDirectories(const QString &path); |
|
52 |
|
53 void doWidgetRemove(const QString &path, const QStringList &originalList, |
|
54 const QStringList ¤tList); |
|
55 |
|
56 QList<HsWidgetToken> readManifestFile(const QString &path); |
|
57 |
|
58 void ensureWidgetRegistryPaths(); |
|
59 |
|
60 public slots: |
|
61 |
|
62 private slots: |
|
63 |
|
64 void directoryChanged(const QString &path); |
|
65 |
|
66 void installerStateChanged(int newValue); |
|
67 |
|
68 private: |
|
69 |
|
70 QString mInstallationPath; |
|
71 |
|
72 QMap<QString,QStringList> mManifestDirectories; |
|
73 |
|
74 HsWidgetRegistryService *mPublic; |
|
75 }; |
|
76 |
|
77 #endif //HSWIDGETREGISTRYSERVICE_P_H |