|
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 CPSCWATCHERLISTSUBSCRIPTIONITEM_H |
|
19 #define CPSCWATCHERLISTSUBSCRIPTIONITEM_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 CPresenceWatcherInfoImp; |
|
31 |
|
32 /** |
|
33 * PSC group list subscription implementation |
|
34 * |
|
35 * @since S60 v3.2 |
|
36 */ |
|
37 class CWatcherListSubscriptionItem : 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 CWatcherListSubscriptionItem* NewLC( MXIMPItemParentBase& aParent ); |
|
47 |
|
48 /** |
|
49 * Destruction |
|
50 * - Remember to inform parent about delete. |
|
51 */ |
|
52 ~CWatcherListSubscriptionItem(); |
|
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 CWatcherListSubscriptionItem( MXIMPItemParentBase& aParent ); |
|
61 |
|
62 /** |
|
63 * Construction |
|
64 */ |
|
65 void ConstructL(); |
|
66 |
|
67 public: // New methods |
|
68 |
|
69 /** |
|
70 * Resolve deltas and replace old current with new list. |
|
71 * @param aList New current list. |
|
72 */ |
|
73 IMPORT_C void SetNewListL( RPrWatLstInfoImpArray* aList ); |
|
74 |
|
75 /** |
|
76 * Remove the temporary lists. |
|
77 */ |
|
78 IMPORT_C void Clean(); |
|
79 |
|
80 public: // From MXIMPSubscriptionItem |
|
81 |
|
82 /** |
|
83 * @see MXIMPSubscriptionItem |
|
84 */ |
|
85 void SynthesiseSubscriptionEventToL( MXIMPPscContext* aContext, TBool aForceEvent ); |
|
86 |
|
87 private: // From CXIMPSubscriptionItemBase |
|
88 |
|
89 /** |
|
90 * @see CXIMPSubscriptionItemBase |
|
91 */ |
|
92 void CleanExpired(); |
|
93 |
|
94 |
|
95 private: // Data |
|
96 |
|
97 /** |
|
98 * Current list of groups. |
|
99 * Owned. |
|
100 */ |
|
101 RPrWatLstInfoImpArray* iCurrentList; |
|
102 |
|
103 /** |
|
104 * List of created groups (new since last update). |
|
105 * Owned. |
|
106 */ |
|
107 RPrWatLstInfoImpArray* iNewWatchers; |
|
108 |
|
109 /** |
|
110 * List of deleted groups (removed since last update). |
|
111 * Owned. |
|
112 */ |
|
113 RPrWatLstInfoImpArray* iDisappeared; |
|
114 |
|
115 }; |
|
116 |
|
117 |
|
118 /* ======================================================================== */ |
|
119 |
|
120 |
|
121 |
|
122 #endif // CPSCWATCHERLISTSUBSCRIPTIONITEM_H |