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