46
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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 CXESETTINGSSTORE_H_
|
|
18 |
#define CXESETTINGSSTORE_H_
|
|
19 |
|
|
20 |
// Include Files
|
|
21 |
#include <QHash>
|
|
22 |
#include <QVariant>
|
|
23 |
#include <QMetaType>
|
|
24 |
#include "cxeerror.h"
|
|
25 |
#include "cxenamespace.h"
|
|
26 |
|
|
27 |
/*!
|
|
28 |
* Settings store intrerface.
|
|
29 |
*/
|
|
30 |
class CxeSettingsStore
|
|
31 |
{
|
|
32 |
public:
|
|
33 |
|
|
34 |
/*!
|
|
35 |
* Destructor. Needs to be virtual.
|
|
36 |
*/
|
|
37 |
virtual ~CxeSettingsStore() {};
|
|
38 |
|
|
39 |
/*!
|
|
40 |
* resets the cenrep store
|
|
41 |
*/
|
|
42 |
virtual void reset() = 0;
|
|
43 |
|
|
44 |
/*!
|
|
45 |
* Reads a value from cenrep
|
|
46 |
* \param "key" - setting key
|
|
47 |
* \param "value" - setting value read from cenrep
|
|
48 |
*/
|
|
49 |
virtual CxeError::Id get(const QString &key, QVariant &value) = 0;
|
|
50 |
|
|
51 |
/*!
|
|
52 |
* Reads a value from the settings store and starts monitoring it.
|
|
53 |
* \param "uid" - UID of the component that own setting key
|
|
54 |
* \param "key" - setting key id
|
|
55 |
* \param "type" - type of setting key
|
|
56 |
* \param "value" - setting value read from cenrep
|
|
57 |
*/
|
|
58 |
virtual void startMonitoring(long int uid, unsigned long int key, Cxe::SettingKeyType type, QVariant &value) = 0;
|
|
59 |
|
|
60 |
/*!
|
|
61 |
* Sets a new value to cenrep
|
|
62 |
* \param "key" - setting key
|
|
63 |
* \param "newValue" - new value set to the key in cenrep
|
|
64 |
*/
|
|
65 |
virtual CxeError::Id set(const QString &key,const QVariant newValue) = 0;
|
|
66 |
|
|
67 |
/*!
|
|
68 |
* Reads/loads all run-time variation settings values from cenrep
|
|
69 |
* @param QList<QString> contains list of all runtime variation key ids which we use to load values from cenrep.
|
|
70 |
* returns: QHash container, "contains" values associated with each key that are read from cenrep
|
|
71 |
* NOTE: loading runtime variation settings should be done only ONCE at start-up. Its an overhead to read variation keys
|
|
72 |
* unnecessarily multiple times as the values of the runtime keys are not changed.
|
|
73 |
* Variation keys are only used to configure camerax application.
|
|
74 |
*/
|
|
75 |
virtual QHash<QString, QVariantList> loadVariationSettings(QList<QString> &settingKeys) = 0;
|
|
76 |
};
|
|
77 |
|
|
78 |
|
|
79 |
#endif // CXESETTINGSSTORE_H_
|
|
80 |
|