|
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 receive reactive authorization notifications. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __MPENGREACTAUTHOBSERVER_H |
|
19 #define __MPENGREACTAUTHOBSERVER_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <E32Std.h> |
|
23 |
|
24 |
|
25 //FORWARD DECLARATIONS |
|
26 class CPEngReactAuthNotifier; |
|
27 class MPEngAuthorizationRequest; |
|
28 class MPEngAuthorizationStatus; |
|
29 |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Observer interface to receive reactive authorization events. |
|
35 * Observer is registered to CPEngReactAuthNotifier. |
|
36 * |
|
37 * With this API clients can |
|
38 * 1. Receive notifications from new pending |
|
39 * reactive authorization requests. |
|
40 * |
|
41 * 2. Receive notifications from network server reactive |
|
42 * authorization status responses. |
|
43 * |
|
44 * @since 3.0 |
|
45 */ |
|
46 class MPEngReactAuthObserver |
|
47 { |
|
48 public: //Observer methods |
|
49 |
|
50 /** |
|
51 * Reactive authorization request handler. |
|
52 * |
|
53 * Called by CPEngReactAuthNotifier to handle new reactive |
|
54 * authorization requests received from the network server. |
|
55 * State of the authorization requests is EPEngAuthPending. |
|
56 * |
|
57 * If this method leaves, error code is |
|
58 * reported back to HandleReactAuthError(). |
|
59 * |
|
60 * @since 3.0 |
|
61 * @param aNotifier The notifier source where notification |
|
62 * is coming from. No ownership transferred. |
|
63 * @param aPendingAuthReqs The pending authorization requests. |
|
64 */ |
|
65 virtual void HandlePendingAuthorizationReqL( |
|
66 CPEngReactAuthNotifier& aNotifier, |
|
67 TArray< MPEngAuthorizationRequest* >& aPendingAuthReqs ) = 0; |
|
68 |
|
69 |
|
70 /** |
|
71 * Reactive authorization status handler. |
|
72 * |
|
73 * Called by CPEngReactAuthNotifier to handle |
|
74 * reactive authorization status notifications |
|
75 * received from the network server. |
|
76 * |
|
77 * If this method leaves, error code is |
|
78 * reported back to HandleReactAuthError(). |
|
79 * |
|
80 * @since 3.0 |
|
81 * @param aNotifier The notifier source where notification |
|
82 * is coming from. No ownership transferred. |
|
83 * @param aAuthStatuses The new authorization statuses. |
|
84 */ |
|
85 virtual void HandlerAuthorizationStatusL( |
|
86 CPEngReactAuthNotifier& aNotifier, |
|
87 TArray< const MPEngAuthorizationStatus* > aAuthStatuses ) = 0; |
|
88 |
|
89 |
|
90 |
|
91 /** |
|
92 * Notification failure handler. |
|
93 * |
|
94 * @since 3.0 |
|
95 * |
|
96 * @param aError The error from Presence Engine internal |
|
97 * reactive authorization event handling |
|
98 * (e.g. out of memory) or leave error from |
|
99 * HandlePendingAuthorizationReqL() or |
|
100 * HandlerAuthorizationStatusL(). |
|
101 * @param aNotifier The notifier of which event handling failed. |
|
102 * No ownership transferred. |
|
103 */ |
|
104 virtual void HandleReactAuthError( |
|
105 TInt aError, |
|
106 CPEngReactAuthNotifier& aNotifier ) = 0; |
|
107 |
|
108 |
|
109 private: //Extensions |
|
110 |
|
111 /** |
|
112 * Reserved virtual table slots for future use. |
|
113 * Do not implement this. |
|
114 * |
|
115 * @since 3.0 |
|
116 */ |
|
117 virtual TInt ReactAuthObserverReserved() { |
|
118 return KErrNotSupported; |
|
119 } |
|
120 |
|
121 |
|
122 |
|
123 protected: //Destructor |
|
124 |
|
125 /** |
|
126 * Protected destructor. |
|
127 * Observers can't be destroyed via this interface. |
|
128 */ |
|
129 virtual ~MPEngReactAuthObserver() { } |
|
130 |
|
131 }; |
|
132 |
|
133 |
|
134 |
|
135 #endif //__MPENGREACTAUTHOBSERVER_H |
|
136 |
|
137 |
|
138 //End of file |
|
139 |
|
140 |
|
141 |