|
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: Presence Service Connection group list subscription implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CPSCGROUPLISTSUBSCRIPTIONITEM_H |
|
19 #define CPSCGROUPLISTSUBSCRIPTIONITEM_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include "presenceinfoimp.h" |
|
23 #include "ximpsubscriptionitem.h" |
|
24 #include "presencetypehelpers.h" |
|
25 #include "ximpsubscriptionitembase.h" |
|
26 |
|
27 class MXIMPItemParentBase; |
|
28 class MXIMPPscContext; |
|
29 class CDesC16Array; |
|
30 class CPresentityGroupInfoImp; |
|
31 |
|
32 /** |
|
33 * PSC group list subscription implementation |
|
34 * |
|
35 * @since S60 v3.2 |
|
36 */ |
|
37 class CGroupListSubscriptionItem : public CXIMPSubscriptionItemBase |
|
38 { |
|
39 |
|
40 public: // Construction and destruction |
|
41 |
|
42 /** |
|
43 * Construction |
|
44 * @param aParent. Parent has to be informed when this object is deleted by RemoveMe method. |
|
45 */ |
|
46 static CGroupListSubscriptionItem* NewLC( MXIMPItemParentBase& aParent ); |
|
47 |
|
48 /** |
|
49 * Destruction |
|
50 * - Remember to inform parent about delete. |
|
51 */ |
|
52 ~CGroupListSubscriptionItem(); |
|
53 |
|
54 private: // Construction and destruction |
|
55 |
|
56 /** |
|
57 * Construction |
|
58 * @param aParent. Parent has to be informed when this object is deleted by RemoveMe method. |
|
59 */ |
|
60 CGroupListSubscriptionItem( MXIMPItemParentBase& aParent ); |
|
61 |
|
62 /** |
|
63 * Construction |
|
64 */ |
|
65 void ConstructL(); |
|
66 |
|
67 public: // New methods |
|
68 |
|
69 /** |
|
70 * Set the new list of groups. Will create and set |
|
71 * the temporary lists for created, deleted and updated lists. |
|
72 * Ownership is transferred! |
|
73 * @param aGroupList The list of groups |
|
74 */ |
|
75 IMPORT_C void SetNewListL( RPrGrpInfoImpArray* aGroupList ); |
|
76 |
|
77 /** |
|
78 * Set the created list of groups. Will set |
|
79 * other lists accordingly. If there are no new elements (=no created groups), |
|
80 * will simply update the display names of the existing groups, i.e. |
|
81 * HandlePresentityGroupDisplayNameUpdatedL call handling. |
|
82 * Ownership is transferred! |
|
83 * @param aGroupList The list of groups |
|
84 */ |
|
85 IMPORT_C void SetCreatedListL( RPrGrpInfoImpArray* aGroupList ); |
|
86 |
|
87 /** |
|
88 * Set the deleted list of groups. Will set |
|
89 * other lists accordingly. |
|
90 * Ownership is transferred! |
|
91 * @param aGroupList The list of groups |
|
92 */ |
|
93 IMPORT_C void SetDeletedListL( RPrGrpInfoImpArray* aGroupList ); |
|
94 |
|
95 /** |
|
96 * Remove the temporary lists. |
|
97 */ |
|
98 IMPORT_C void Clean(); |
|
99 |
|
100 public: // From MXIMPSubscriptionItem |
|
101 |
|
102 /** |
|
103 * @see MXIMPSubscriptionItem |
|
104 */ |
|
105 void SynthesiseSubscriptionEventToL( MXIMPPscContext* aContext, TBool aForceEvent ); |
|
106 |
|
107 private: // From CXIMPSubscriptionItemBase |
|
108 |
|
109 /** |
|
110 * @see CXIMPSubscriptionItemBase |
|
111 */ |
|
112 void CleanExpired(); |
|
113 |
|
114 |
|
115 private: // Data |
|
116 |
|
117 /** |
|
118 * Current list of groups. |
|
119 * Owned. |
|
120 */ |
|
121 RPrGrpInfoImpArray* iCurrentList; |
|
122 |
|
123 /** |
|
124 * List of created groups (new since last update). |
|
125 * Owned. |
|
126 */ |
|
127 RPrGrpInfoImpArray* iCreated; |
|
128 |
|
129 /** |
|
130 * List of deleted groups (removed since last update). |
|
131 * Owned. |
|
132 */ |
|
133 RPrGrpInfoImpArray* iDeleted; |
|
134 |
|
135 /** |
|
136 * List of updated groups (same as in last update). |
|
137 * Owned. |
|
138 */ |
|
139 RPrGrpInfoImpArray* iUpdated; |
|
140 |
|
141 }; |
|
142 |
|
143 |
|
144 /* ======================================================================== */ |
|
145 |
|
146 |
|
147 |
|
148 #endif // CPSCGROUPLISTSUBSCRIPTIONITEM_H |