|
1 /* |
|
2 * Copyright (c) 2002 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: Authorization Manager abstract interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __MPENGAUTHORIZATIONMANAGER_H__ |
|
20 #define __MPENGAUTHORIZATIONMANAGER_H__ |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MPEngAuthorizationRequest; |
|
29 class MPEngAuthorizationStatus; |
|
30 class MPEngAuthorizationObserver; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 /** |
|
34 * Authorization Manager abstract interface |
|
35 * |
|
36 */ |
|
37 class MPEngAuthorizationManager |
|
38 { |
|
39 |
|
40 public: // New functions |
|
41 |
|
42 /** |
|
43 * Close reference |
|
44 * Clean up stack support |
|
45 * |
|
46 * @since 3.0 |
|
47 */ |
|
48 virtual void Close() = 0; |
|
49 |
|
50 /** |
|
51 * Coutn of all authorizations |
|
52 * |
|
53 * @since 3.0 |
|
54 * @return count of authorizations |
|
55 */ |
|
56 virtual TInt AuthorizationsCount() const = 0; |
|
57 |
|
58 /** |
|
59 * Get authorization request |
|
60 * |
|
61 * @since 3.0 |
|
62 * @param aIndex index of the authorization request |
|
63 * @return authorization request |
|
64 */ |
|
65 virtual MPEngAuthorizationRequest& Authorization( |
|
66 TInt aIndex ) = 0; |
|
67 |
|
68 /** |
|
69 * Coutn of pending authorizations request |
|
70 * This also includes authorizations which were |
|
71 * already responded, but server reissued them again |
|
72 * |
|
73 * @since 3.0 |
|
74 * @return count of authorizations |
|
75 */ |
|
76 virtual TInt PendingAuthorizationsCount() const = 0; |
|
77 |
|
78 /** |
|
79 * Get pending authorizations request |
|
80 * Those authorizations also includes authorizations which were |
|
81 * already responded, but server reissued them again |
|
82 * |
|
83 * @since 3.0 |
|
84 * @param aIndex index of the authorization request |
|
85 * @return authorization request |
|
86 */ |
|
87 virtual MPEngAuthorizationRequest& PendingAuthorization( |
|
88 TInt aIndex ) = 0; |
|
89 |
|
90 /** |
|
91 * Issued Authorization status count |
|
92 * Authorization which were responded by the requesting user |
|
93 * @since 3.0 |
|
94 * @return count |
|
95 */ |
|
96 virtual TInt RespondedAuthorizationsCount() const = 0; |
|
97 |
|
98 /** |
|
99 * Issued Authorization status |
|
100 * Authorization which were responded by the requesting user |
|
101 * @since 3.0 |
|
102 * @param index of the responded authorization |
|
103 * @return responded authorization |
|
104 */ |
|
105 virtual const MPEngAuthorizationStatus& RespondedAuthorization( |
|
106 TInt aIndex ) const = 0; |
|
107 |
|
108 |
|
109 /** |
|
110 * Server denied authorizations count |
|
111 * @since 3.0 |
|
112 * @return count |
|
113 */ |
|
114 virtual TInt ServerDeniedAuthorizationsCount() const = 0; |
|
115 |
|
116 /** |
|
117 * Server denied authorization |
|
118 * @since 3.0 |
|
119 * @param aIndex index of denied authorization |
|
120 * @return served denied authorization |
|
121 */ |
|
122 virtual const MPEngAuthorizationStatus& ServerDeniedAuthorization( |
|
123 TInt aIndex ) const = 0; |
|
124 |
|
125 |
|
126 /** |
|
127 * Remove all Authorization responses |
|
128 * and release lock for editing. |
|
129 * |
|
130 * Function removes all buffered authorization responses and |
|
131 * release lock which was enabled when fisrt authorization |
|
132 * response was stored. |
|
133 * |
|
134 * @since 3.0 |
|
135 */ |
|
136 virtual void RemoveAllAuthorizationResponses() = 0; |
|
137 |
|
138 /** |
|
139 * Buffer with all packed authorization responses. |
|
140 * This buffer is intended to be sent to the Transaction |
|
141 * server in order to publish buffered transactions. |
|
142 * Ownership of the buffer is transfered to the client. |
|
143 * |
|
144 * @since 3.0 |
|
145 * @return buffer with packed transaction responses. |
|
146 */ |
|
147 virtual HBufC16* BufferedTransactionsLC() = 0; |
|
148 |
|
149 |
|
150 public: // Authorization Observerving from MPEngAuthorizationManager |
|
151 |
|
152 /** |
|
153 * Register authorization observer. |
|
154 * |
|
155 * @since 3.0 |
|
156 * @param aObserver authorization observer |
|
157 */ |
|
158 virtual void RegisterAuthorizationObserverL( |
|
159 MPEngAuthorizationObserver& aObserver ) = 0; |
|
160 |
|
161 /** |
|
162 * Unregister authorization observer. |
|
163 * |
|
164 * @since 3.0 |
|
165 * @param aObserver authorization observer |
|
166 */ |
|
167 virtual void UnRegisterAuthorizationObserver( |
|
168 MPEngAuthorizationObserver& aObserver ) = 0; |
|
169 |
|
170 protected: //Destructor |
|
171 |
|
172 /** |
|
173 * Virtual inline destructor. |
|
174 * Protected destructor to prohibite deletion trough interface. |
|
175 */ |
|
176 virtual ~MPEngAuthorizationManager() {}; |
|
177 |
|
178 }; |
|
179 #endif // __MPEngAuthorizationManager_H__ |
|
180 |
|
181 // End of File |
|
182 |