44
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 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: Manages always-on settings in Central Repository.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef NSMLDMALWAYSONSETTINGSTORE_H
|
|
20 |
#define NSMLDMALWAYSONSETTINGSTORE_H
|
|
21 |
|
|
22 |
#include "nsmldmalwaysonadapter.h"
|
|
23 |
|
|
24 |
#include <centralrepository.h>
|
|
25 |
|
|
26 |
const TInt KDefaultLuid = 1;
|
|
27 |
|
|
28 |
class CNSmlDmAOAdapter;
|
|
29 |
class CSmlDmAOCommandElement;
|
|
30 |
|
|
31 |
/**
|
|
32 |
* Setting Store is used for managing settings in CentralRepository
|
|
33 |
*
|
|
34 |
* The class provides functions for executing commands
|
|
35 |
* and sets of commands that involve manipulation of
|
|
36 |
* data in CentralRepository.
|
|
37 |
*
|
|
38 |
* @lib nsmldmalwaysonadapter
|
|
39 |
* @since S60 v3.2
|
|
40 |
*/
|
|
41 |
class CNSmlDmAOSettingStore : public CBase
|
|
42 |
{
|
|
43 |
|
|
44 |
public:
|
|
45 |
|
|
46 |
static CNSmlDmAOSettingStore * NewL( CNSmlDmAOAdapter* aAdapter );
|
|
47 |
|
|
48 |
virtual ~CNSmlDmAOSettingStore();
|
|
49 |
|
|
50 |
/**
|
|
51 |
* Executes the argument command.
|
|
52 |
*
|
|
53 |
* @since S60 v3.2
|
|
54 |
* @param aCmd Command to be executed
|
|
55 |
* @param aLUID LUID of the VENDORCONFIG which command is referring.
|
|
56 |
*/
|
|
57 |
void ExecuteCmdL( CSmlDmAOCommandElement& aCmd, TUint aLuid);
|
|
58 |
|
|
59 |
/**
|
|
60 |
* Fetches all VENDORCONFIGs and inserts id of each VENDORCONFIG
|
|
61 |
* into the argument array (in practise there is only one VENDORCONFIG)
|
|
62 |
*
|
|
63 |
* @since S60 v3.2
|
|
64 |
* @param aLUIDArray Array for VENDORCONFIG ids
|
|
65 |
*/
|
|
66 |
void GetVendorConfigsL( RArray<TUint32>& aLUIDArray );
|
|
67 |
|
|
68 |
private:
|
|
69 |
|
|
70 |
CNSmlDmAOSettingStore( CNSmlDmAOAdapter * aAdapter );
|
|
71 |
|
|
72 |
void ConstructL();
|
|
73 |
|
|
74 |
//----------- Commands for managing leaf nodes -------------------//
|
|
75 |
|
|
76 |
/**
|
|
77 |
* Executes VENDORCONFIG commands. The valid commands include
|
|
78 |
* get. With get commands the iData
|
|
79 |
* memeber is used to pass fetched data back to caller.
|
|
80 |
* After execution of command the function fills in the status
|
|
81 |
* in aCmd.iStatus memeber and sets aCmd.iExecuted as True. The function
|
|
82 |
* leaves if command can not be executed for some reason.
|
|
83 |
*
|
|
84 |
* @param aCmd The command to be executed
|
|
85 |
* @param aLuid The id of the VENDORCONFIG
|
|
86 |
*/
|
|
87 |
void ExecuteVendorConfigCmdL( CSmlDmAOCommandElement& aCmd, TUint aLuid );
|
|
88 |
|
|
89 |
/**
|
|
90 |
* Executes NAME commands. The valid commands include
|
|
91 |
* update and get. With update commands data is read from the
|
|
92 |
* iData memeber of the argument command. With get commands the iData
|
|
93 |
* memeber is used to pass fetched data back to caller.
|
|
94 |
* After execution of command the function fills in the status
|
|
95 |
* in aCmd.iStatus memeber and sets aCmd.iExecuted as True. The function
|
|
96 |
* leaves if command can not be executed for some reason.
|
|
97 |
*
|
|
98 |
* @param aCmd The command to be executed
|
|
99 |
* @param aCenrep Pointer to PdpContextManager2 repository
|
|
100 |
*/
|
|
101 |
void ExecuteNameCmdL( CSmlDmAOCommandElement& aCmd,
|
|
102 |
CRepository* aCenrep );
|
|
103 |
|
|
104 |
|
|
105 |
/**
|
|
106 |
* Executes AWON-PDPC commands. The valid commands include
|
|
107 |
* update and get. With update commands data is read from the
|
|
108 |
* iData memeber of the argument command. With get commands the iData
|
|
109 |
* memeber is used to pass fetched data back to caller.
|
|
110 |
* After execution of command the function fills in the status
|
|
111 |
* in aCmd.iStatus memeber and sets aCmd.iExecuted as True. The function
|
|
112 |
* leaves if command can not be executed for some reason.
|
|
113 |
*
|
|
114 |
* @param aCmd The command to be executed
|
|
115 |
* @param aCenrep Pointer to PdpContextManager2 repository
|
|
116 |
*/
|
|
117 |
void ExecuteAwonPdpcCmdL( CSmlDmAOCommandElement& aCmd,
|
|
118 |
CRepository* aCenrep );
|
|
119 |
|
|
120 |
|
|
121 |
/**
|
|
122 |
* Executes T-RETRY commands. The valid commands include
|
|
123 |
* update and get. With update commands data is read from the
|
|
124 |
* iData memeber of the argument command. With get commands the iData
|
|
125 |
* memeber is used to pass fetched data back to caller.
|
|
126 |
* After execution of command the function fills in the status
|
|
127 |
* in aCmd.iStatus memeber and sets aCmd.iExecuted as True. The function
|
|
128 |
* leaves if command can not be executed for some reason.
|
|
129 |
*
|
|
130 |
* @param aCmd The command to be executed
|
|
131 |
* @param aCenrep Pointer to PdpContextManager2 repository
|
|
132 |
*/
|
|
133 |
void ExecuteTRetryCmdL( CSmlDmAOCommandElement& aCmd,
|
|
134 |
CRepository* aCenrep );
|
|
135 |
|
|
136 |
/**
|
|
137 |
* Parses integer from descriptor
|
|
138 |
*
|
|
139 |
* @param aPtr Descriptor containing value
|
|
140 |
* @param aInt Value as integer
|
|
141 |
*/
|
|
142 |
void ParseIntegerL( const TDesC& aPtr, TInt& aInt );
|
|
143 |
|
|
144 |
/**
|
|
145 |
* Parses settings for home network and visited network
|
|
146 |
*
|
|
147 |
* @param aInt Interger containing home & visited network setting
|
|
148 |
* @param aHplmn "1" when always-on enabled in hplmn, otherwise "0"
|
|
149 |
* @param aVplmn "1" when always-on enabled in vplmn, otherwise "0"
|
|
150 |
*/
|
|
151 |
void ParseAwonPdpcValuesL( const TInt aInt, TInt& aHplmn, TInt& aVplmn );
|
|
152 |
|
|
153 |
private: //data
|
|
154 |
|
|
155 |
/**
|
|
156 |
* Pointer to the adapter. This is used for
|
|
157 |
* querying data from DM framework when necessary
|
|
158 |
* and using helper functions. Not own.
|
|
159 |
*/
|
|
160 |
CNSmlDmAOAdapter* iAdapter;
|
|
161 |
|
|
162 |
};
|
|
163 |
|
|
164 |
|
|
165 |
#endif // NSMLDMALWAYSONSETTINGSTORE_H
|