|
1 /* |
|
2 * Copyright (c) 2006, 2007 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: Event interface for presence watcher list content. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MXIMPFWPRESENCEWATCHERLISTEVENT_H |
|
19 #define MXIMPFWPRESENCEWATCHERLISTEVENT_H |
|
20 |
|
21 #include <e32std.h> |
|
22 #include <ximpbase.h> |
|
23 #include <presencemanagementifids.hrh> |
|
24 |
|
25 |
|
26 class MXIMPIdentity; |
|
27 class MPresenceWatcherInfo; |
|
28 class MXIMPDataSubscriptionState; |
|
29 |
|
30 |
|
31 /** |
|
32 * Event interface for presence watcher list content. |
|
33 * |
|
34 * This interface is implemented by the XIMP Framework and |
|
35 * event object is signalled to registered client observers |
|
36 * through MXIMPContextObserver observer interface. |
|
37 * This event notifies clients about changes in |
|
38 * presence watcher list content. |
|
39 * |
|
40 * Clients subscribe for this event with |
|
41 * MPresencePublishing::SubscribePresenceWatcherListL(). |
|
42 * |
|
43 * XIMP Framework signals this event when: |
|
44 * - New subscribed data is received from protocol. |
|
45 * - Data item data subscription status is updated by |
|
46 * protocol adaptation. |
|
47 * - When client unsubscribes the data item. |
|
48 * - XIMP Framework generates initial data notification |
|
49 * to client automatically after clients subscription, |
|
50 * when the initial data comes available from protocol. |
|
51 * |
|
52 * @ingroup ximppresmanagementapievents |
|
53 * @since S60 v3.2 |
|
54 */ |
|
55 class MPresenceWatcherListEvent : public MXIMPBase |
|
56 { |
|
57 public: |
|
58 /** Interface ID for the MPresenceWatcherListEvent. */ |
|
59 enum { KInterfaceId = PRES_IF_ID_PRESENCE_WATCHER_LIST_EVENT }; |
|
60 |
|
61 |
|
62 protected: |
|
63 |
|
64 /** |
|
65 * Protected destructor. |
|
66 * Object instancies can't be deleted via this interface. |
|
67 */ |
|
68 virtual ~MPresenceWatcherListEvent() {} |
|
69 |
|
70 |
|
71 public: // Access to "delta information" |
|
72 |
|
73 |
|
74 /** |
|
75 * Gets count of new presence watcher entries. |
|
76 * |
|
77 * @return The count of new presence watcher entries. |
|
78 */ |
|
79 virtual TInt NewWatchersCount() const = 0; |
|
80 |
|
81 |
|
82 |
|
83 /** |
|
84 * Gets presence watcher entry by index. |
|
85 * |
|
86 * @param [in] aIndex |
|
87 * The index of the presence watcher entry to get. |
|
88 * |
|
89 * @return The presence watcher entry from given index. |
|
90 */ |
|
91 virtual const MPresenceWatcherInfo& NewWatcher( |
|
92 TInt aIndex ) const = 0; |
|
93 |
|
94 |
|
95 |
|
96 /** |
|
97 * Gets count of dissappeared presence watcher entries. |
|
98 * |
|
99 * @return The count of dissappeared presence watcher entries. |
|
100 */ |
|
101 virtual TInt DisappearedWatchersCount() const = 0; |
|
102 |
|
103 |
|
104 |
|
105 /** |
|
106 * Gets presence watcher entry by index. |
|
107 * |
|
108 * @param [in] aIndex |
|
109 * The index of the presence watcher entry to get. |
|
110 * |
|
111 * @return The presence watcher entry from given index. |
|
112 */ |
|
113 virtual const MPresenceWatcherInfo& DisappearedWatcher( |
|
114 TInt aIndex ) const = 0; |
|
115 |
|
116 |
|
117 |
|
118 public: // Access to "current information" |
|
119 |
|
120 |
|
121 /** |
|
122 * Gets count of current presence watcher entries. |
|
123 * |
|
124 * Note that, valid "current information" is signalled only when |
|
125 * the client refreshes the event data from XIMP Framework cache, |
|
126 * by re-issuing the data subscription. In other cases, just plain |
|
127 * "delta information" is signalled to client. |
|
128 * |
|
129 * @return The count of current presence watcher entries. |
|
130 */ |
|
131 virtual TInt CurrentWatchersCount() const = 0; |
|
132 |
|
133 |
|
134 |
|
135 /** |
|
136 * Gets presence watcher entry by index. |
|
137 * |
|
138 * Note that, current information is signalled only when |
|
139 * the client refreshes the event data from XIMP Framework cache, |
|
140 * by re-issuing the data subscription. |
|
141 * |
|
142 * @param [in] aIndex |
|
143 * The index of the presence watcher entry to get. |
|
144 * |
|
145 * @return The presence watcher entry from given index. |
|
146 */ |
|
147 virtual const MPresenceWatcherInfo& CurrentWatcher( |
|
148 TInt aIndex ) const = 0; |
|
149 |
|
150 |
|
151 |
|
152 public: // Access to subscription state |
|
153 |
|
154 |
|
155 /** |
|
156 * Returns subscription state object holding |
|
157 * information about data items data subscription state. |
|
158 * |
|
159 * @return The data items data subscription state. |
|
160 * Object ownership is not returned. |
|
161 */ |
|
162 virtual const MXIMPDataSubscriptionState& DataSubscriptionState() const = 0; |
|
163 |
|
164 |
|
165 }; |
|
166 |
|
167 |
|
168 #endif // MXIMPFWPRESENCEWATCHERLISTEVENT_H |
|
169 |
|
170 |