|
1 /* |
|
2 * Copyright (c) 2002-2005 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 API for presence events |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MCAPRESENCEOBSERVER_H |
|
20 #define MCAPRESENCEOBSERVER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 #include "MCAPresence.h" |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /** |
|
29 * Class that wishes to receive events about changed presence flags |
|
30 * in friends-list. |
|
31 * |
|
32 * |
|
33 * @lib CAPresence.lib |
|
34 * @since 1.2 |
|
35 */ |
|
36 class MCAPresenceObserver |
|
37 { |
|
38 |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Gets called when presence state of a friend/friends |
|
43 * from friends-list changes. When client receives multiple updates |
|
44 * at once, this will still get called only once. |
|
45 */ |
|
46 virtual void HandlePresenceChange() = 0; |
|
47 |
|
48 /** |
|
49 * Gets called when presence subscription failes. This is used when subscription |
|
50 * request has originated from somewhere else than UI itself. |
|
51 * @param aWVId UserID of failed subscription. |
|
52 */ |
|
53 virtual void HandleSubscriptionError( |
|
54 const TDesC& aWVId, |
|
55 const TInt aErrorCode ) = 0; |
|
56 |
|
57 /** |
|
58 * Gets called when own presence status changes |
|
59 */ |
|
60 virtual void HandleOwnStatusChange( MCAPresence::TPresenceStatus aStatus ) = 0; |
|
61 |
|
62 |
|
63 protected: |
|
64 |
|
65 /** |
|
66 * Destructor. |
|
67 */ |
|
68 virtual ~MCAPresenceObserver() {}; |
|
69 }; |
|
70 |
|
71 #endif // MCAPRESENCEOBSERVER_H |
|
72 |
|
73 // End of File |