|
1 /* |
|
2 * Copyright (c) 2006 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: SIMPLE engine presencelist |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef simplepresencelist_H |
|
22 #define simplepresencelist_H |
|
23 |
|
24 #include <e32std.h> |
|
25 #include "simplecommon.h" |
|
26 #include "msimplepresencelist.h" |
|
27 |
|
28 // FORWARD DECLARATION |
|
29 class CSimpleNamespace; |
|
30 class CSimpleMeta; |
|
31 class CBodyPart; |
|
32 |
|
33 /** |
|
34 * CSimplePresenceList |
|
35 * |
|
36 * SIMPLE Engine presence list |
|
37 * |
|
38 * @lib simplexmlutils |
|
39 * @since S60 v3.1 |
|
40 */ |
|
41 |
|
42 class CSimplePresenceList : public CBase, public MSimplePresenceList |
|
43 { |
|
44 |
|
45 public: |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 * @since S60 v3.1 |
|
50 * @param aData MIME multipart data |
|
51 * @param aBoundary MIME multipart boundary |
|
52 * @param aStart MIME multipart start content-id |
|
53 * @return CSimplePresenceList |
|
54 */ |
|
55 static CSimplePresenceList* NewL( |
|
56 const TDesC8& aData, const TDesC8& aBoundary, const TDesC8& aStart ); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 */ |
|
61 virtual ~CSimplePresenceList(); |
|
62 |
|
63 |
|
64 // from base class MSimplePresenceList |
|
65 |
|
66 |
|
67 /** |
|
68 * Destructor. |
|
69 * @since Series60 3.1 |
|
70 */ |
|
71 void Close(); |
|
72 |
|
73 |
|
74 /** |
|
75 * Getter for the Metadata document. |
|
76 * @since Series60 3.1 |
|
77 * @return metadata document. |
|
78 */ |
|
79 MSimpleMeta* MetaData(); |
|
80 |
|
81 /** |
|
82 * Getting the child elements of this element. |
|
83 * |
|
84 * @since Series60 3.1 |
|
85 * @param aDocuments an array of presence entities. This is an empty array if there |
|
86 * are no entities. OUT. |
|
87 */ |
|
88 void GetDocuments( RPointerArray<MSimpleDocument>& aDocuments ); |
|
89 |
|
90 /** |
|
91 * Getting the sub-lists |
|
92 * |
|
93 * @since Series60 3.1 |
|
94 * @param aLists array of presence sub lists. OUT. |
|
95 */ |
|
96 void GetSubLists( RPointerArray<MSimplePresenceList>& aLists ); |
|
97 |
|
98 |
|
99 protected: |
|
100 |
|
101 |
|
102 private: |
|
103 |
|
104 /** |
|
105 * ClenupStack operation |
|
106 * aPtrArray RPointerArray<CBodyPart> |
|
107 */ |
|
108 static void ResetAndDestroy( TAny* aPtrArray ); |
|
109 |
|
110 /** |
|
111 * DoConstructL |
|
112 * Handles XML parsing of MIME multiparts |
|
113 * @param aParts MIME multipart parts |
|
114 * @param aStart MIME multipart start content-id |
|
115 */ |
|
116 void DoConstructL( RPointerArray<CBodyPart>& aParts, const TDesC8& aStart ); |
|
117 |
|
118 /** |
|
119 * Two-phase constructor |
|
120 * @param aData MIME multipart data |
|
121 * @param aBoundary MIME multipart boundary |
|
122 * @param aStart MIME multipart start content-id |
|
123 */ |
|
124 void ConstructL( |
|
125 const TDesC8& aData, const TDesC8& aBoundary, const TDesC8& aStart ); |
|
126 |
|
127 /** |
|
128 * constructor |
|
129 */ |
|
130 CSimplePresenceList(); |
|
131 |
|
132 private: // data |
|
133 |
|
134 /** |
|
135 * Meta data of RLMI |
|
136 * Own. |
|
137 */ |
|
138 CSimpleMeta* iMeta; |
|
139 |
|
140 /** |
|
141 * Sub presence lists |
|
142 */ |
|
143 RPointerArray<CSimplePresenceList> iPresList; |
|
144 |
|
145 /** |
|
146 * Presence documents in root level |
|
147 */ |
|
148 RPointerArray<CSimpleDocument> iDocuments; |
|
149 }; |
|
150 |
|
151 #endif // simplepresencelist_H |
|
152 |
|
153 // End of File |