|
1 /* |
|
2 * Copyright (c) 2004 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 listen NWSessionSlot operation events. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __MPENGNWSESSIONOPERATIONOBSERVER2_H |
|
19 #define __MPENGNWSESSIONOPERATIONOBSERVER2_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <E32Std.h> |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 class CPEngNWSessionSlot2; |
|
26 class MPEngTransactionStatus2; |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 // CLASS DECLARATION |
|
32 /** |
|
33 * Observer interface to receive NWSessionSlot |
|
34 * operation completion events. |
|
35 * |
|
36 * @since 3.0 |
|
37 */ |
|
38 class MPEngNWSessionOperationObserver2 |
|
39 { |
|
40 public: //Observer methods |
|
41 |
|
42 /** |
|
43 * Operation complete handler. |
|
44 * |
|
45 * Called by CPEngNWSessionSlot2 to handle NWSessionSlot |
|
46 * operation complete. If this method leaves, error code is |
|
47 * reported back to HandleNWSessionOperationNotifyError(). |
|
48 * |
|
49 * @since 3.0 |
|
50 * @param aStatus Transaction status container holding result from |
|
51 * operation. Container ownership remains on the NWSessionSlot object. |
|
52 * @param aNWSessionSlot The NWSessionSlot object where notification |
|
53 * is coming from. No ownership transferred. |
|
54 * @param aNWSessionSlotOperation ID of the completed NWSessionSlot |
|
55 * operation. Operation IDs are listed in |
|
56 * PEngPresenceEngineConsts2.h TPEngNWSessionSlotOperations |
|
57 * enumeration. Client can use operation ID to figure |
|
58 * out what operation completed. |
|
59 */ |
|
60 virtual void HandleNWSessionOperationCompleteL( |
|
61 MPEngTransactionStatus2& aStatus, |
|
62 CPEngNWSessionSlot2& aNWSessionSlot, |
|
63 TInt aNWSessionSlotOperation ) = 0; |
|
64 |
|
65 |
|
66 /** |
|
67 * Failure handler. |
|
68 * |
|
69 * Called to handle leave errors from |
|
70 * HandleNWSessionOperationCompleteL(). |
|
71 * |
|
72 * @since 3.0 |
|
73 * @param aError The leave error from operation complete handling. |
|
74 * @param aNWSessionSlot The NWSessionSlot object which event |
|
75 * handling failed. |
|
76 * @param aNWSessionSlotOperation ID of the completed NWSessionSlot |
|
77 * operation. Operation IDs are listed in |
|
78 * PEngPresenceEngineConsts2.h TPEngNWSessionSlotOperations |
|
79 * enumeration. Client can use operation ID to figure |
|
80 * out what operation completed. |
|
81 */ |
|
82 virtual void HandleNWSessionOperationNotifyError( |
|
83 TInt aError, |
|
84 CPEngNWSessionSlot2& aNWSessionSlot, |
|
85 TInt aNWSessionSlotOperation ) = 0; |
|
86 |
|
87 |
|
88 |
|
89 private: //Extensions |
|
90 |
|
91 /** |
|
92 * Reserved virtual table slots for future use. |
|
93 * Do not implement these. |
|
94 * |
|
95 * @since 3.0 |
|
96 */ |
|
97 virtual TInt NWSessionOperationReserved() { |
|
98 return KErrNotSupported; |
|
99 } |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 protected: //Destructor |
|
105 |
|
106 /** |
|
107 * Protected destructor. |
|
108 * Observers can't be destroyed via this interface. |
|
109 */ |
|
110 virtual ~MPEngNWSessionOperationObserver2() { } |
|
111 |
|
112 }; |
|
113 |
|
114 |
|
115 |
|
116 #endif //__MPENGNWSESSIONOPERATIONOBSERVER2_H |
|
117 |
|
118 |
|
119 |
|
120 //End of file |
|
121 |