44
|
1 |
/*
|
|
2 |
* ==============================================================================
|
|
3 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
4 |
* All rights reserved.
|
|
5 |
* This component and the accompanying materials are made available
|
|
6 |
* under the terms of "Eclipse Public License v1.0"
|
|
7 |
* which accompanies this distribution, and is available
|
|
8 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
9 |
*
|
|
10 |
* Initial Contributors:
|
|
11 |
* Nokia Corporation - initial contribution.
|
|
12 |
*
|
|
13 |
* Contributors:
|
|
14 |
*
|
|
15 |
* Description:
|
|
16 |
*
|
|
17 |
* ==============================================================================
|
|
18 |
*/
|
|
19 |
|
|
20 |
#ifndef BRANCHBASE_H_
|
|
21 |
#define BRANCHBASE_H_
|
|
22 |
|
|
23 |
#include <cmmanagerext.h>
|
|
24 |
#include "smldmadapter.h"
|
|
25 |
|
|
26 |
// ------------------------------------------------------------------------------------------------
|
|
27 |
// Constants
|
|
28 |
// ------------------------------------------------------------------------------------------------
|
|
29 |
#define KConnMoAdapterUid 0x2001FE5F
|
|
30 |
|
|
31 |
/**
|
|
32 |
* Abstract base class for all ConnMO branches.
|
|
33 |
*/
|
|
34 |
class CBranchBase : public CBase
|
|
35 |
{
|
|
36 |
public:
|
|
37 |
|
|
38 |
/**
|
|
39 |
* Builds DDF structure of DM settings it governs.
|
|
40 |
*
|
|
41 |
* Implementations should build their structure using given node
|
|
42 |
* as the root node.
|
|
43 |
*
|
|
44 |
* @param aDDF Root node
|
|
45 |
*/
|
|
46 |
virtual void DDFStructureL( MSmlDmDDFObject& aDDF ) = 0;
|
|
47 |
|
|
48 |
/**
|
|
49 |
* Updates leaf node data.
|
|
50 |
*
|
|
51 |
* @param aURI Root node
|
|
52 |
* @param aLUID refrence to branch LUID
|
|
53 |
* @param aObject Leaf object data
|
|
54 |
* @param aType Type of the node
|
|
55 |
* @param aStatusRef Status reference
|
|
56 |
*/
|
|
57 |
virtual void UpdateLeafObjectL( const TDesC8& aURI,
|
|
58 |
const TDesC8& aLUID,
|
|
59 |
const TDesC8& aObject,
|
|
60 |
const TDesC8& aType,
|
|
61 |
TInt aStatusRef ) = 0;
|
|
62 |
/**
|
|
63 |
* Deletes object pointed by aURI.
|
|
64 |
*
|
|
65 |
* @param aURI Root node
|
|
66 |
* @param aLUID refrence to branch LUID
|
|
67 |
* @param aStatusRef Status reference
|
|
68 |
*/
|
|
69 |
virtual void DeleteObjectL( const TDesC8& aURI,
|
|
70 |
const TDesC8& aLUID,
|
|
71 |
TInt aStatusRef ) = 0;
|
|
72 |
|
|
73 |
/**
|
|
74 |
* Gets node data for leaf nodes and child list for parent nodes.
|
|
75 |
*
|
|
76 |
* @param aURI Root node
|
|
77 |
* @param aLUID refrence to branch LUID
|
|
78 |
* @param aObject Leaf object data
|
|
79 |
* @param aType Type of the node
|
|
80 |
* @param aResultsRef Result reference
|
|
81 |
* @param aStatusRef Status reference
|
|
82 |
*/
|
|
83 |
virtual void FetchLeafObjectL( const TDesC8& aURI,
|
|
84 |
const TDesC8& aLUID,
|
|
85 |
const TDesC8& aType,
|
|
86 |
TInt aResultsRef,
|
|
87 |
TInt aStatusRef ) = 0;
|
|
88 |
|
|
89 |
/**
|
|
90 |
* Gets the size of the data in leaf node.
|
|
91 |
*/
|
|
92 |
virtual void FetchLeafObjectSizeL( const TDesC8& aURI,
|
|
93 |
const TDesC8& aLUID,
|
|
94 |
const TDesC8& aType,
|
|
95 |
TInt aResultsRef,
|
|
96 |
TInt aStatusRef) = 0;
|
|
97 |
|
|
98 |
/**
|
|
99 |
* Gets all childs of the given node.
|
|
100 |
*/
|
|
101 |
virtual void ChildURIListL( const TDesC8& aURI,
|
|
102 |
const TDesC8& aLUID,
|
|
103 |
const CArrayFix<TSmlDmMappingInfo>& aPreviousURISegmentList,
|
|
104 |
TInt aResultsRef,
|
|
105 |
TInt aStatusRef ) = 0;
|
|
106 |
|
|
107 |
/**
|
|
108 |
* Adds node to DM tree.
|
|
109 |
*/
|
|
110 |
virtual void AddNodeObjectL( const TDesC8& aURI,
|
|
111 |
const TDesC8& aParentLUID,
|
|
112 |
TInt aStatusRef )=0;
|
|
113 |
|
|
114 |
|
|
115 |
virtual ~CBranchBase();
|
|
116 |
|
|
117 |
protected:
|
|
118 |
|
|
119 |
CBranchBase();
|
|
120 |
|
|
121 |
CBranchBase( MSmlDmCallback* aDmCallback );
|
|
122 |
|
|
123 |
/**
|
|
124 |
* This function gives all Connection Methods from Connection Method Manager.
|
|
125 |
*
|
|
126 |
* @param aCmArray Result Array.
|
|
127 |
* @param aCmManager CM Manager.
|
|
128 |
*/
|
|
129 |
void GetAllConnectionMethodsL( RArray<TUint32>& aCmArray,
|
|
130 |
RCmManagerExt& aCmManager );
|
|
131 |
|
|
132 |
/**
|
|
133 |
* This function checks if given CM ID is found from given URI segmentlist.
|
|
134 |
*
|
|
135 |
* @param aPreviousURISegmentList Array where to search.
|
|
136 |
* @param aCmId CM ID to be searched.
|
|
137 |
* @param aURISeg If match is found, the URI segment matching the CM ID is copied here.
|
|
138 |
* @return TBool ETrue if CM ID is found from array.
|
|
139 |
*/
|
|
140 |
TBool CheckPreviousURIList( const CArrayFix<TSmlDmMappingInfo>& aPreviousURISegmentList,
|
|
141 |
const TUint32 aCmId,
|
|
142 |
TDes8& aURISeg );
|
|
143 |
|
|
144 |
/**
|
|
145 |
* This function gets list of dynamic nodes for the specified URI
|
|
146 |
*
|
|
147 |
* @param aURI which to get the list for
|
|
148 |
* @param aLuid refrence to branch LUID
|
|
149 |
* @param aPreviousURISegmentList previous URI segment list
|
|
150 |
* @param aResultRef result reference
|
|
151 |
* @param aStatusRef status reference
|
|
152 |
* @param aCmManagerExt CM Manager reference
|
|
153 |
* @param aCurrentURISegmentList current URI segment list
|
|
154 |
* @param aField branch name
|
|
155 |
* @param aNodeCount number of dynamic nodes
|
|
156 |
* @aCallback pointer to DM callback
|
|
157 |
*/
|
|
158 |
void GetAllDynamicNodesL( const TDesC8& aURI,
|
|
159 |
const TDesC8& aLUID,
|
|
160 |
const CArrayFix<TSmlDmMappingInfo>& aPreviousURISegmentList,
|
|
161 |
TInt aResultsRef,
|
|
162 |
TInt aStatusRef,
|
|
163 |
RCmManagerExt& aCmManagerExt,
|
|
164 |
CBufBase& aCurrentURISegmentList,
|
|
165 |
const TDesC8& aField,
|
|
166 |
const TInt aNodeCount,
|
|
167 |
MSmlDmCallback* aCallback );
|
|
168 |
|
|
169 |
/**
|
|
170 |
* This function gets connection method
|
|
171 |
*
|
|
172 |
* @param aCmManagerExt CM Manager
|
|
173 |
* @param aCm CM Manager
|
|
174 |
* @param aCmId CM ID
|
|
175 |
* @return TBool ETrue if connection method found
|
|
176 |
*/
|
|
177 |
TBool GetConnectionMethodLC( RCmManagerExt& aCmManagerExt,
|
|
178 |
RCmConnectionMethodExt& aCm,
|
|
179 |
TUint32 aCmId );
|
|
180 |
|
|
181 |
private:
|
|
182 |
MSmlDmCallback* iCallback;
|
|
183 |
|
|
184 |
};
|
|
185 |
|
|
186 |
#endif /* BRANCHBASE_H_ */
|