|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * |
|
5 * This program is free software: you can redistribute it and/or modify |
|
6 * it under the terms of the GNU Lesser General Public License as published by |
|
7 * the Free Software Foundation, version 2.1 of the License. |
|
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 Lesser General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU Lesser General Public License |
|
15 * along with this program. If not, |
|
16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/". |
|
17 * |
|
18 * Description: |
|
19 * |
|
20 */ |
|
21 |
|
22 #ifndef XQSETTINGSMANAGER_P_H |
|
23 #define XQSETTINGSMANAGER_P_H |
|
24 |
|
25 // INCLUDES |
|
26 #include "xqsettingsmanager.h" |
|
27 #include <QHash> |
|
28 |
|
29 #include "xqsettingskey.h" |
|
30 #include "settingshandlerbase.h" |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class QVariant; |
|
34 class CCentralRepositoryHandler; |
|
35 class CPublishAndSubscribeHandler; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 class XQSettingsManagerPrivate |
|
39 : public CBase, public MSettingsHandlerObserver |
|
40 { |
|
41 public: |
|
42 XQSettingsManagerPrivate(XQSettingsManager* settingsmanager); |
|
43 ~XQSettingsManagerPrivate(); |
|
44 |
|
45 QVariant readItemValue(const XQSettingsKey& key, XQSettingsManager::Type type); |
|
46 bool writeItemValue(const XQSettingsKey& key, const QVariant& value); |
|
47 bool startMonitoring(const XQSettingsKey& key, XQSettingsManager::Type type); |
|
48 bool stopMonitoring(const XQSettingsKey& key); |
|
49 |
|
50 XQSettingsManager::Error error() const; |
|
51 |
|
52 CCentralRepositoryHandler* cenRepHandlerInstance(long int repositoryUid); |
|
53 CPublishAndSubscribeHandler* pubSubHandlerInstance(long int categoryUid); |
|
54 |
|
55 private: |
|
56 SettingsHandlerBase* handlerInstance(const XQSettingsKey& key); |
|
57 |
|
58 protected: //MSettingsHandlerObserver |
|
59 void valueChanged(const XQSettingsKey& key, XQSettingsManager::Type type); |
|
60 void itemDeleted(const XQSettingsKey& key); |
|
61 |
|
62 private: |
|
63 friend class XQCentralRepositoryUtilsPrivate; |
|
64 friend class XQPublishAndSubscribeUtilsPrivate; |
|
65 XQSettingsManager* q; |
|
66 mutable int iError; |
|
67 QHash<long int, CCentralRepositoryHandler*> m_centralRepositoryHandlers; |
|
68 QHash<long int, CPublishAndSubscribeHandler*> m_publishAndSubscribeHandlers; |
|
69 }; |
|
70 |
|
71 #endif /*XQSETTINGSMANAGER_P_H*/ |
|
72 |
|
73 // End of file |