|
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 content construct. |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "CPEngWVAttributeConstructBase.h" |
|
20 #include "CPEngWVAttributeModelBase.h" |
|
21 #include "CPEngWVStatusContentConstruct.h" |
|
22 #include "CPEngWVStatusContentModel.h" |
|
23 |
|
24 |
|
25 #include "MPEngXMLSerializer.h" |
|
26 #include "MPEngXMLParser.h" |
|
27 |
|
28 #include <MPEngPresenceAttrModel2.h> |
|
29 #include <E32Base.h> |
|
30 #include <S32Strm.h> |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 // DATA TYPES |
|
36 /** |
|
37 * Status content CSP name table. |
|
38 * |
|
39 * @since 3.0 |
|
40 */ |
|
41 const TWVCspAttributeNameEntry KStatusContentCspNameTable[] = |
|
42 { |
|
43 { |
|
44 EWVCspV11, |
|
45 LIT_AS_DESC8_PTR( KStatusContentXMLTag ), |
|
46 LIT_AS_DESC8_PTR( KPresenceSubListAttributesNS ) |
|
47 }, |
|
48 { |
|
49 EWVCspV12, |
|
50 LIT_AS_DESC8_PTR( KStatusContentXMLTag ), |
|
51 LIT_AS_DESC8_PTR( KPresenceSubListAttributesNS_CSP12 ) |
|
52 } |
|
53 }; |
|
54 |
|
55 |
|
56 const TInt KStatusContentCspNameTableCount = sizeof( KStatusContentCspNameTable ) / sizeof( TWVCspAttributeNameEntry ); |
|
57 |
|
58 |
|
59 |
|
60 // =============== CPEngWVStatusContentConstruct MEMBER FUNCTIONS =============== |
|
61 |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // CPEngWVStatusContentConstruct::CPEngWVStatusContentConstruct |
|
65 // C++ constructor can NOT contain any code, that |
|
66 // might leave. |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 CPEngWVStatusContentConstruct::CPEngWVStatusContentConstruct( TPEngWVCspVersion aCurrentCspVer ) |
|
70 : CPEngWVAttributeConstructBase( aCurrentCspVer, |
|
71 KStatusContentCspNameTable, |
|
72 KStatusContentCspNameTableCount ) |
|
73 { |
|
74 } |
|
75 |
|
76 |
|
77 // Destructor |
|
78 CPEngWVStatusContentConstruct::~CPEngWVStatusContentConstruct() |
|
79 { |
|
80 } |
|
81 |
|
82 |
|
83 |
|
84 // ----------------------------------------------------------------------------- |
|
85 // CPEngWVStatusContentConstruct::NewAttributeInstanceLC() |
|
86 // ----------------------------------------------------------------------------- |
|
87 // |
|
88 MPEngPresenceAttrModelTypeImp* CPEngWVStatusContentConstruct::NewAttributeInstanceLC( |
|
89 TBool aUserOwnAttribute ) const |
|
90 { |
|
91 CPEngWVStatusContentModel* model = new ( ELeave ) CPEngWVStatusContentModel( |
|
92 aUserOwnAttribute ); |
|
93 CleanupStack::PushL( model ); |
|
94 model->ResetDataL(); |
|
95 return model; |
|
96 } |
|
97 |
|
98 |
|
99 // End of File |
|
100 |
|
101 |