33
|
1 |
/*
|
|
2 |
* Copyright (c) 2008 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: Implementation of DM adapter test component
|
|
15 |
* This is part of omadmextensions/adapter test application.
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
#ifndef __TESTDMDDFOBJECT_H
|
|
25 |
#define __TESTDMDDFOBJECT_H
|
|
26 |
|
|
27 |
// INCLUDES
|
|
28 |
//#include <?include_file>
|
|
29 |
#include <smldmadapter.h>
|
|
30 |
|
|
31 |
// CONSTANTS
|
|
32 |
//const ?type ?constant_var = ?constant;
|
|
33 |
|
|
34 |
// MACROS
|
|
35 |
//#define ?macro ?macro_def
|
|
36 |
|
|
37 |
// DATA TYPES
|
|
38 |
//enum ?declaration
|
|
39 |
//typedef ?declaration
|
|
40 |
//extern ?data_type;
|
|
41 |
|
|
42 |
// FUNCTION PROTOTYPES
|
|
43 |
//?type ?function_name(?arg_list);
|
|
44 |
|
|
45 |
// FORWARD DECLARATIONS
|
|
46 |
class CStifLogger;
|
|
47 |
|
|
48 |
// CLASS DECLARATION
|
|
49 |
|
|
50 |
/**
|
|
51 |
* ?one_line_short_description.
|
|
52 |
* ?other_description_lines
|
|
53 |
*
|
|
54 |
* @lib ?library
|
|
55 |
* @since Series ?XX ?SeriesXX_version
|
|
56 |
*/
|
|
57 |
class CTestDmDDFObject : public CBase, public MSmlDmDDFObject
|
|
58 |
{
|
|
59 |
public: // Constructors and destructor
|
|
60 |
|
|
61 |
/**
|
|
62 |
* Two-phased constructor.
|
|
63 |
*/
|
|
64 |
static CTestDmDDFObject* NewL( CStifLogger *aLog );
|
|
65 |
static CTestDmDDFObject* NewLC( CStifLogger *aLog );
|
|
66 |
|
|
67 |
/**
|
|
68 |
* Destructor.
|
|
69 |
*/
|
|
70 |
virtual ~CTestDmDDFObject();
|
|
71 |
|
|
72 |
public: // New functions
|
|
73 |
|
|
74 |
/**
|
|
75 |
* ?member_description.
|
|
76 |
* @since Series ?XX ?SeriesXX_version
|
|
77 |
* @param ?arg1 ?description
|
|
78 |
* @return ?description
|
|
79 |
*/
|
|
80 |
//?type ?member_function( ?type ?arg1 );
|
|
81 |
|
|
82 |
virtual void SetNameL( const TDesC8& aName );
|
|
83 |
|
|
84 |
void DumpL( const TDesC8& aParentName, TBool aFullDump = ETrue );
|
|
85 |
void ExternalizeL(RWriteStream& aStream) const;
|
|
86 |
|
|
87 |
|
|
88 |
|
|
89 |
public: // Functions from base classes
|
|
90 |
|
|
91 |
//sf- *********************************
|
|
92 |
|
|
93 |
void SetAccessTypesL( TSmlDmAccessTypes aAccessTypes );
|
|
94 |
void SetDefaultValueL( const TDesC8& aDefaultValue );
|
|
95 |
void SetDescriptionL( const TDesC8& aDescription );
|
|
96 |
void SetDFFormatL( TDFFormat aFormat );
|
|
97 |
void SetOccurenceL( TOccurence aOccurence );
|
|
98 |
void SetScopeL( TScope aScope );
|
|
99 |
void SetDFTitleL( const TDesC8& aTitle );
|
|
100 |
void AddDFTypeMimeTypeL( const TDesC8& aMimeType );
|
|
101 |
void SetAsObjectGroup();
|
|
102 |
MSmlDmDDFObject& AddChildObjectL(const TDesC8& aNodeName);
|
|
103 |
MSmlDmDDFObject& AddChildObjectGroupL();
|
|
104 |
|
|
105 |
//sf- #############################
|
|
106 |
|
|
107 |
const TDesC8& Name();
|
|
108 |
TSmlDmAccessTypes AccessTypes();
|
|
109 |
const TDesC8& DefaultValue();
|
|
110 |
const TDesC8& Description();
|
|
111 |
TDFFormat DFFormat();
|
|
112 |
TOccurence Occurence();
|
|
113 |
TScope Scope();
|
|
114 |
const TDesC8& DFTitle();
|
|
115 |
const TDesC8& DFTypeMimeType();
|
|
116 |
TBool ObjectGroup();
|
|
117 |
|
|
118 |
TInt ChildObjectCount();
|
|
119 |
CTestDmDDFObject& ChildObject( TInt aIndex );
|
|
120 |
|
|
121 |
CTestDmDDFObject* FindChildObject( const TDesC8& aName );
|
|
122 |
TInt SubObjectsCount();
|
|
123 |
|
|
124 |
|
|
125 |
protected: // New functions
|
|
126 |
|
|
127 |
/**
|
|
128 |
* ?member_description.
|
|
129 |
* @since Series ?XX ?SeriesXX_version
|
|
130 |
* @param ?arg1 ?description
|
|
131 |
* @return ?description
|
|
132 |
*/
|
|
133 |
//?type ?member_function( ?type ?arg1 );
|
|
134 |
|
|
135 |
protected: // Functions from base classes
|
|
136 |
|
|
137 |
/**
|
|
138 |
* From ?base_class ?member_description
|
|
139 |
*/
|
|
140 |
//?type ?member_function();
|
|
141 |
|
|
142 |
private:
|
|
143 |
|
|
144 |
/**
|
|
145 |
* C++ default constructor.
|
|
146 |
*/
|
|
147 |
CTestDmDDFObject( CStifLogger *aLog );
|
|
148 |
|
|
149 |
/**
|
|
150 |
* By default Symbian 2nd phase constructor is private.
|
|
151 |
*/
|
|
152 |
void ConstructL();
|
|
153 |
|
|
154 |
// Prohibit copy constructor if not deriving from CBase.
|
|
155 |
// CTestDmDDFObject( const CTestDmDDFObject& );
|
|
156 |
// Prohibit assigment operator if not deriving from CBase.
|
|
157 |
// CTestDmDDFObject& operator=( const CTestDmDDFObject& );
|
|
158 |
|
|
159 |
public: // Data
|
|
160 |
// ?one_line_short_description_of_data
|
|
161 |
//?data_declaration;
|
|
162 |
|
|
163 |
protected: // Data
|
|
164 |
// ?one_line_short_description_of_data
|
|
165 |
//?data_declaration;
|
|
166 |
|
|
167 |
private: // Data
|
|
168 |
// ?one_line_short_description_of_data
|
|
169 |
//?data_declaration;
|
|
170 |
HBufC8* iName;
|
|
171 |
|
|
172 |
TSmlDmAccessTypes iAccessTypes;
|
|
173 |
HBufC8* iDefaultValue;
|
|
174 |
HBufC8* iDescription;
|
|
175 |
TDFFormat iFormat;
|
|
176 |
TOccurence iOccurence;
|
|
177 |
TScope iScope;
|
|
178 |
HBufC8* iTitle;
|
|
179 |
HBufC8* iMimeType;
|
|
180 |
TBool iObjectGroup;
|
|
181 |
|
|
182 |
RPointerArray<CTestDmDDFObject> iChildren;
|
|
183 |
|
|
184 |
|
|
185 |
// Reserved pointer for future extension
|
|
186 |
//TAny* iReserved;
|
|
187 |
|
|
188 |
public: // Friend classes
|
|
189 |
//?friend_class_declaration;
|
|
190 |
protected: // Friend classes
|
|
191 |
//?friend_class_declaration;
|
|
192 |
private: // Friend classes
|
|
193 |
//?friend_class_declaration;
|
|
194 |
/**
|
|
195 |
* Logger.
|
|
196 |
*/
|
|
197 |
CStifLogger* iLog;
|
|
198 |
|
|
199 |
};
|
|
200 |
|
|
201 |
#endif // __TESTDMDDFOBJECT_H
|
|
202 |
|
|
203 |
// End of File
|