|
1 /* |
|
2 * Copyright (c) 2004 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: WV Status Text attribute constructor. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CPENGWVTHUMBNAILCONSTRUCT_H |
|
19 #define CPENGWVTHUMBNAILCONSTRUCT_H |
|
20 |
|
21 // INCLUDES |
|
22 #include "CPEngWVAttributeConstructBase.h" |
|
23 #include "CPEngWVAttributeModelBase.h" |
|
24 #include <PEngWVPresenceAttributes2.h> |
|
25 #include <E32Base.h> |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 /** |
|
31 * WV Thumbnail attribute constructor. |
|
32 * |
|
33 * @lib PEngAttrLib |
|
34 * @since 3.0 |
|
35 */ |
|
36 NONSHARABLE_CLASS( CPEngWVThumbnailConstruct ) : public CPEngWVAttributeConstructBase |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * C++ constructor. |
|
42 */ |
|
43 CPEngWVThumbnailConstruct( TPEngWVCspVersion aCurrentCspVer ); |
|
44 |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 virtual ~CPEngWVThumbnailConstruct(); |
|
50 |
|
51 |
|
52 |
|
53 public: // Functions from MPEngPresenceAttrConstructorTypeImp |
|
54 |
|
55 /** |
|
56 * From MPEngPresenceAttrConstructorTypeImp. |
|
57 * |
|
58 * @since 3.0 |
|
59 */ |
|
60 MPEngPresenceAttrModelTypeImp* NewAttributeInstanceLC( TBool aUserOwnAttribute ) const; |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 public: //Attribute model implementation |
|
66 |
|
67 /** |
|
68 * WV Thumbnail attribute implementation. |
|
69 * |
|
70 * @lib PEngAttrLib |
|
71 * @since 3.0 |
|
72 */ |
|
73 NONSHARABLE_CLASS( CPEngWVThumbnailModel ) : public CPEngWVAttributeModelBase |
|
74 { |
|
75 public: // Constructors and destructor |
|
76 |
|
77 /** |
|
78 * Destructor. |
|
79 */ |
|
80 ~CPEngWVThumbnailModel(); |
|
81 |
|
82 |
|
83 /** |
|
84 * C++ constructor. |
|
85 */ |
|
86 CPEngWVThumbnailModel( TBool aUserOwnAttribute ); |
|
87 |
|
88 |
|
89 public: // From MPEngPresenceAttrModelTypeImp |
|
90 |
|
91 |
|
92 /** |
|
93 * From MPEngPresenceAttrModelTypeImp. |
|
94 */ |
|
95 TBool SetDataL( TInt* aIntData, |
|
96 const TDesC8* a8Data, |
|
97 const TDesC16* a16Data, |
|
98 TInt aField, |
|
99 TInt aGroup ); |
|
100 |
|
101 TBool GetData( TInt* aIntData, |
|
102 TPtrC8* a8Data, |
|
103 TPtrC16* a16Data, |
|
104 TInt aField, |
|
105 TInt aGroup ) const; |
|
106 |
|
107 |
|
108 void EncodeDataToXmlL( MPEngXMLSerializer& aSerializer ) const; |
|
109 |
|
110 void DecodeDataFromXmlL( MPEngXMLParser& aParser, |
|
111 const TDesC8& aValueBlock ); |
|
112 |
|
113 void ResetDataL(); |
|
114 TInt DataExternalizeSize() const; |
|
115 void ExternalizeDataL( RWriteStream& aStream ) const; |
|
116 void InternalizeDataL( RReadStream& aStream ); |
|
117 |
|
118 |
|
119 |
|
120 private: // Private helpers |
|
121 |
|
122 TBool SetData8L( const TDesC8& aData, TInt aField ); |
|
123 TBool GetData8( TInt aField, TPtrC8& aData ) const; |
|
124 TBool SetData16L( const TDesC16& aData, TInt aField ); |
|
125 TBool GetData16( TInt aField, TPtrC16& aData ) const; |
|
126 |
|
127 |
|
128 |
|
129 private: //Data |
|
130 |
|
131 //OWN: Freeform thumbnail field |
|
132 HBufC8* iDesC8Buf0; |
|
133 |
|
134 //OWN: Freeform thumbnail field |
|
135 HBufC8* iDesC8Buf1; |
|
136 |
|
137 //OWN: Freeform thumbnail field |
|
138 HBufC8* iDesC8Buf2; |
|
139 |
|
140 //OWN: Freeform thumbnail field |
|
141 HBufC16* iDesC16Buf0; |
|
142 |
|
143 //OWN: Freeform thumbnail field |
|
144 HBufC16* iDesC16Buf1; |
|
145 |
|
146 //OWN: Freeform thumbnail field |
|
147 HBufC16* iDesC16Buf2; |
|
148 |
|
149 }; |
|
150 }; |
|
151 |
|
152 #endif //CPENGWVTHUMBNAILCONSTRUCT_H |
|
153 |
|
154 // End of File |
|
155 |