equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2008-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: XQSettingsManager class stub. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef XQSETTINGSMANAGER_H |
|
19 #define XQSETTINGSMANAGER_H |
|
20 |
|
21 #include <QObject> |
|
22 #include <QVariant> |
|
23 #include <QHash> |
|
24 |
|
25 class XQCentralRepositorySettingsKey : public QObject |
|
26 { |
|
27 Q_OBJECT |
|
28 |
|
29 public: |
|
30 |
|
31 |
|
32 XQCentralRepositorySettingsKey(int uid, int key) |
|
33 { |
|
34 mUid = uid; |
|
35 mKey = key; |
|
36 } |
|
37 |
|
38 int mUid; |
|
39 int mKey; |
|
40 }; |
|
41 |
|
42 class XQSettingsManager : QObject |
|
43 { |
|
44 Q_OBJECT |
|
45 |
|
46 public: |
|
47 XQSettingsManager(); |
|
48 ~XQSettingsManager(); |
|
49 |
|
50 enum Type |
|
51 { |
|
52 TypeVariant = 0, |
|
53 TypeInt, |
|
54 TypeDouble, |
|
55 TypeString, |
|
56 TypeByteArray |
|
57 }; |
|
58 |
|
59 public: |
|
60 QVariant readItemValue(XQCentralRepositorySettingsKey &key, int type); |
|
61 |
|
62 bool writeItemValue(const XQCentralRepositorySettingsKey& key, const QVariant& value); |
|
63 |
|
64 // decrease by one at beginning of every readItemValue -method. If goes below zero method fails |
|
65 static int mReadItemSucceedCounter; |
|
66 // decrease by one at beginning of every writeItemValue -method. If goes below zero method fails |
|
67 static int mWriteItemSucceedCounter; |
|
68 static QHash<int, QVariant> mWrittenValueHash; |
|
69 }; |
|
70 |
|
71 #endif // XQSETTINGSMANAGER_H |