|
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 User Availability attribute constructor. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CPENGWVUSERAVAILABILITYCONSTRUCT_H |
|
19 #define CPENGWVUSERAVAILABILITYCONSTRUCT_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 * WV User Availability attribute constructor. |
|
31 * |
|
32 * @lib PEngAttrLib |
|
33 * @since 3.0 |
|
34 */ |
|
35 NONSHARABLE_CLASS( CPEngWVUserAvailabilityConstruct ) : public CPEngWVAttributeConstructBase |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * C++ constructor. |
|
41 */ |
|
42 CPEngWVUserAvailabilityConstruct( TPEngWVCspVersion aCurrentCspVer ); |
|
43 |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CPEngWVUserAvailabilityConstruct(); |
|
49 |
|
50 |
|
51 |
|
52 public: // Functions from MPEngPresenceAttrConstructorTypeImp |
|
53 |
|
54 /** |
|
55 * From MPEngPresenceAttrConstructorTypeImp. |
|
56 * |
|
57 * @since 3.0 |
|
58 */ |
|
59 MPEngPresenceAttrModelTypeImp* NewAttributeInstanceLC( TBool aUserOwnAttribute ) const; |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 private: //Attribute model implementation |
|
65 |
|
66 /** |
|
67 * WV User Availability attribute implementation. |
|
68 * |
|
69 * @lib PEngAttrLib |
|
70 * @since 3.0 |
|
71 */ |
|
72 NONSHARABLE_CLASS( CPEngWVUserAvailabilityModel ) : public CPEngWVAttributeModelBase |
|
73 { |
|
74 public: // Constructors and destructor |
|
75 |
|
76 /** |
|
77 * Destructor. |
|
78 */ |
|
79 ~CPEngWVUserAvailabilityModel(); |
|
80 |
|
81 |
|
82 /** |
|
83 * C++ constructor. |
|
84 */ |
|
85 CPEngWVUserAvailabilityModel( TBool aUserOwnAttribute ); |
|
86 |
|
87 |
|
88 public: // From MPEngPresenceAttrModelTypeImp |
|
89 |
|
90 |
|
91 /** |
|
92 * From MPEngPresenceAttrModelTypeImp. |
|
93 */ |
|
94 TBool SetDataL( TInt* aIntData, |
|
95 const TDesC8* a8Data, |
|
96 const TDesC16* a16Data, |
|
97 TInt aField, |
|
98 TInt aGroup ); |
|
99 |
|
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 private: //Data |
|
119 |
|
120 //OWN: Availability |
|
121 TPEngWVUserAvailabilityValues iAvailability; |
|
122 }; |
|
123 |
|
124 }; |
|
125 |
|
126 #endif //CPENGWVUSERAVAILABILITYCONSTRUCT_H |
|
127 |
|
128 // End of File |
|
129 |