|
1 /* |
|
2 * Copyright (c) 2005 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: Contains profile item data |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NSMLDMITEMDATA_H |
|
20 #define NSMLDMITEMDATA_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include <e32base.h> |
|
25 #include "NSmlDMdef.h" |
|
26 |
|
27 // CLASS DECLARATION |
|
28 |
|
29 /** |
|
30 * CNSmlDMItemData |
|
31 * |
|
32 * Base class for holding Setting data |
|
33 */ |
|
34 NONSHARABLE_CLASS (CNSmlDMItemData) : public CBase |
|
35 { |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Constructor |
|
40 */ |
|
41 CNSmlDMItemData() : iHeader( 0 ), iValue( 0 ) { } |
|
42 |
|
43 /** |
|
44 * Destructor |
|
45 */ |
|
46 virtual ~CNSmlDMItemData(); |
|
47 |
|
48 /** |
|
49 * Set header value of the settings item |
|
50 * @param const TDesC& aData - Setting item header value |
|
51 * @return - |
|
52 */ |
|
53 void SetHeader( const TDesC& aData ); |
|
54 |
|
55 /** |
|
56 * Set value of the settings item |
|
57 * @param const TDesC& aData - Setting item value |
|
58 * @return - |
|
59 */ |
|
60 void SetValue( const TDesC& aData ); |
|
61 /** |
|
62 * Set value of the port item |
|
63 * @param const TInt aPort - Port number |
|
64 * @return - |
|
65 */ |
|
66 void SetValue( TInt aPort ); |
|
67 |
|
68 /** |
|
69 * Return header text |
|
70 * @param - |
|
71 * @return - String pointer to the setting item header value |
|
72 */ |
|
73 HBufC* Header() const; |
|
74 |
|
75 /** |
|
76 * Get setting item value text |
|
77 * @param - |
|
78 * @return - String pointer to the setting item value |
|
79 */ |
|
80 HBufC* Value() const; |
|
81 |
|
82 /** |
|
83 * Format Setting item to listbox |
|
84 * @param aConvert ETrue creates language specific conversion. |
|
85 * @return - |
|
86 */ |
|
87 virtual HBufC* ItemToListLC( TBool aConvert ); |
|
88 |
|
89 public: |
|
90 |
|
91 TBool iMandatory; |
|
92 |
|
93 protected: |
|
94 |
|
95 /** |
|
96 * Private second constructor |
|
97 */ |
|
98 void ConstructL(); |
|
99 |
|
100 protected: |
|
101 HBufC* iHeader; |
|
102 HBufC* iValue; |
|
103 }; |
|
104 |
|
105 /** |
|
106 * CNSmlDMItemData |
|
107 * |
|
108 * Base class for holding profile data |
|
109 */ |
|
110 NONSHARABLE_CLASS (CNSmlDMProfileData) : public CNSmlDMItemData |
|
111 { |
|
112 public: |
|
113 |
|
114 enum TNSmlItemType |
|
115 { |
|
116 ENSmlTypeIAP, |
|
117 ENSmlTypeText, |
|
118 ENSmlTypeList, |
|
119 ENSmlTypeListYesNo, |
|
120 ENSmlTypeTime, |
|
121 ENSmlTypeNumber, |
|
122 ENSmlTypeSecret, |
|
123 ENSmlTypehttpListYesNo |
|
124 }; |
|
125 /** |
|
126 * Create object |
|
127 * @param - |
|
128 * @return - |
|
129 */ |
|
130 static CNSmlDMProfileData* NewLC(); |
|
131 |
|
132 /** |
|
133 * Destructor |
|
134 */ |
|
135 virtual ~CNSmlDMProfileData() { } |
|
136 |
|
137 TInt iLength; |
|
138 TInt iResource; |
|
139 TNSmlItemType iItemType; |
|
140 TBuf<KNSmlMaxItemLength> iValue; |
|
141 TInt iNumberData; |
|
142 TBool iLatinInput; |
|
143 TInt iIndex; |
|
144 TBool iHidden; |
|
145 TBool iWapAPInUse; |
|
146 TInt iItemId; |
|
147 }; |
|
148 |
|
149 #endif // NSMLDMITEMDATA_H |
|
150 |
|
151 |
|
152 // End of File |