|
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: |
|
15 * |
|
16 */ |
|
17 #ifndef CXEFAKESETTINGS_H |
|
18 #define CXEFAKESETTINGS_H |
|
19 |
|
20 #include "cxesettings.h" |
|
21 #include "cxeerror.h" |
|
22 |
|
23 class CxeFakeSettings : public CxeSettings |
|
24 { |
|
25 |
|
26 Q_OBJECT |
|
27 |
|
28 public: |
|
29 CxeFakeSettings(); |
|
30 ~CxeFakeSettings(); |
|
31 |
|
32 public: // from CxeSettings |
|
33 |
|
34 CxeError::Id get(const QString &key, int &value) const; |
|
35 CxeError::Id get(const QString &key, QString &stringValue) const; |
|
36 void get(long int uid, unsigned long int key, Cxe::SettingKeyType type, QVariant &value) const; |
|
37 CxeError::Id set(const QString &key, int newValue); |
|
38 CxeError::Id set(const QString &key,const QString &newValue); |
|
39 CxeError::Id get(const QString &key, qreal &value) const; |
|
40 CxeError::Id set(const QString &key, qreal newValue); |
|
41 void reset(); |
|
42 |
|
43 public: // methods for unit testing |
|
44 // ?? |
|
45 |
|
46 private: // data |
|
47 QHash<QString, QVariant> mSettingKeyHash; |
|
48 QHash<QString, unsigned long int> mRuntimeKeyHash; |
|
49 |
|
50 private: |
|
51 Q_DISABLE_COPY(CxeFakeSettings) |
|
52 }; |
|
53 |
|
54 #endif /*CXEFAKESETTINGS_H*/ |
|
55 |
|
56 // end of file |