|
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: XIMP Protocol Connection Host interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MXIMPFWPROTOCOLCONNECTIONHOSTOBSERVER_H |
|
19 #define MXIMPFWPROTOCOLCONNECTIONHOSTOBSERVER_H |
|
20 |
|
21 #include <e32std.h> |
|
22 |
|
23 |
|
24 class MXIMPBase; |
|
25 class MXIMPProtocolConnectionHost; |
|
26 |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * XIMP connection host observer interface. |
|
32 * All XIMP connection host events are delivered |
|
33 * through this interface back to protocol adaptation |
|
34 * implementation. |
|
35 * |
|
36 * @ingroup ximpprotocolpluginhostapi |
|
37 * @since S60 v3.2 |
|
38 */ |
|
39 class MXIMPProtocolConnectionHostObserver |
|
40 { |
|
41 protected: |
|
42 |
|
43 /** |
|
44 * Protected destructor. Observer instancies |
|
45 * can't be destroyed via this interface. |
|
46 */ |
|
47 virtual ~MXIMPProtocolConnectionHostObserver() {} |
|
48 |
|
49 |
|
50 public: |
|
51 |
|
52 |
|
53 /** |
|
54 * Event callback. |
|
55 * |
|
56 * Events are delivered as MXIMPBase typed objects. |
|
57 * Protocol adaptation can use MXIMPBase::InterfaceId() |
|
58 * to identify the real event interface type. Observer |
|
59 * can use cast methods provided in MXimpFw...Event |
|
60 * interfaces to cast to real event interface. |
|
61 * |
|
62 * @param [in] aHost |
|
63 * XIMP host object from where this event is coming. |
|
64 * Provided as reference for protocol adaptation, so |
|
65 * observer can distinguish events coming from different |
|
66 * hosts if listened in single observer. |
|
67 * |
|
68 * @param [in] aEvent |
|
69 * The event object. Client can use MXIMPBase::InterfaceId() |
|
70 * to determine correct event type and interface cast |
|
71 * methods from MXimpFw...Event interfaces to cast object |
|
72 * to real event interface. |
|
73 */ |
|
74 virtual void HandleProtocolConnectionHostEvent( |
|
75 const MXIMPProtocolConnectionHost& aHost, |
|
76 const MXIMPBase& aEvent ) = 0; |
|
77 |
|
78 |
|
79 |
|
80 /** |
|
81 * Extension point for this observer interface. |
|
82 * |
|
83 * Returns an pointer to MXIMPProtocolConnectionHostObserver |
|
84 * extension interface or NULL if the concrete observer |
|
85 * implementation doesn't support requested extension. |
|
86 * |
|
87 * @param [in] aInterfaceId |
|
88 * Interface ID identifying the requested extension |
|
89 * interface. |
|
90 * |
|
91 * @return Pointer to requested extension interface or NULL. |
|
92 */ |
|
93 virtual TAny* ProtocolConnectionHostObserverExtensionOrNull( |
|
94 TInt32 aInterfaceId ) { ( void ) aInterfaceId; return NULL; } |
|
95 |
|
96 }; |
|
97 |
|
98 |
|
99 |
|
100 #endif // MXIMPFWPROTOCOLCONNECTIONHOSTOBSERVER_H |