|
1 /* |
|
2 * Copyright (c) 2003 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: Observer interface to get notifications from presence events. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __MIMPSCONNUIPRESENCEEVENTOBSERVERNG_H |
|
19 #define __MIMPSCONNUIPRESENCEEVENTOBSERVERNG_H |
|
20 |
|
21 #include <E32Std.h> |
|
22 #include <impspresenceconnectionuiconstsng.h> |
|
23 |
|
24 |
|
25 //FORWARD DECLARATION |
|
26 class CIMPSConnUiPresEventNotifier; |
|
27 class CPEngNWSessionSlotID2; |
|
28 |
|
29 /** |
|
30 * Observer interface to get notifcations from |
|
31 * presence events. |
|
32 * |
|
33 * This interface can be reqisterd both standard |
|
34 * event notifier (CIMPSConnUiPresEventNotifier) |
|
35 * and the client filtered event notifier |
|
36 * (CIMPSConnUiClntFilteredPresEventNotifier). |
|
37 * |
|
38 * @since 2.1 |
|
39 */ |
|
40 NONSHARABLE_CLASS( MIMPSConnUiPresenceEventObserver ) |
|
41 { |
|
42 public: //notify methods |
|
43 |
|
44 /** |
|
45 * Notifies from presence event. |
|
46 * |
|
47 * If event handling causes a leave, leave is |
|
48 * reported back to HandlePresenceEventNotifyError() |
|
49 * callback. |
|
50 * |
|
51 * @since 2.1 |
|
52 * @param aNotifier The presence notifier where this |
|
53 * event is coming from. |
|
54 * @param aEvent The presence event. |
|
55 */ |
|
56 virtual void HandlePresenceEventL( CIMPSConnUiPresEventNotifier* aNotifier, |
|
57 const CPEngNWSessionSlotID2& aSessionSlotID, |
|
58 TIMPSConnectionClient aClient, |
|
59 TIMPSPresenceServiceEvent aEvent ) = 0; |
|
60 |
|
61 |
|
62 /** |
|
63 * Called when presence event listening or event |
|
64 * handling fails. |
|
65 * |
|
66 * Here is reported both errors from handling the |
|
67 * actual event and also asynchronously the errors |
|
68 * coming from starting the presence notify. |
|
69 * |
|
70 * When reporting the error, the notifier is stopped. |
|
71 * However, the observer may restart the notifier |
|
72 * during the notify callback if desired so. |
|
73 * |
|
74 * @since 2.1 |
|
75 * @param aNotifier The presence notifier where this |
|
76 * error is coming from. |
|
77 * @param aError is the error code. |
|
78 */ |
|
79 virtual void HandlePresenceEventNotifyError( CIMPSConnUiPresEventNotifier* aNotifier, |
|
80 TInt aError ) = 0; |
|
81 }; |
|
82 |
|
83 |
|
84 #endif //__MIMPSCONNUIPRESENCEEVENTOBSERVERNG_H |