|
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: Active object which ensures that current call stack is run to |
|
15 * completion before a new request is handled |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CLPDREQUESTAO_H |
|
21 #define CLPDREQUESTAO_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <lbs/epos_privacy.h> |
|
26 |
|
27 #include "lpdnotifreqinfo.h" |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CLpdVerifierPlugin; |
|
31 class RPosRequestorStack; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Active object used by the verifier plugin. |
|
37 * Ensures that current call stack is run to completion before a |
|
38 * new request is handled. Otherwise access violations might occur. |
|
39 * |
|
40 * @lib locverifierdlg.lib |
|
41 * @since 2.1 |
|
42 */ |
|
43 class CLpdRequestAO : public CActive |
|
44 { |
|
45 public: // Constructors and destructors |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 * @param aPlugin reference to the owner of this object |
|
50 * @return created object |
|
51 */ |
|
52 static CLpdRequestAO* NewL( CLpdVerifierPlugin& aPlugin ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CLpdRequestAO(); |
|
58 |
|
59 public: // New functions |
|
60 |
|
61 /** |
|
62 * Issues a request and completes it immediatelly, so that it |
|
63 * will be handled as soon as previous request is run to completion. |
|
64 */ |
|
65 void ScheduleRequest(); |
|
66 |
|
67 /** |
|
68 * To Queue up further verification cancel requests when a notification |
|
69 * request is currently running. |
|
70 */ |
|
71 void EnqueueRequestL( TPosRequestSource aSource, |
|
72 TPosVerifyCancelReason aReason, |
|
73 TPosRequestDecision aDecision, |
|
74 RPosRequestorStack* aRequestors ); |
|
75 |
|
76 private: |
|
77 |
|
78 /** |
|
79 * Private C++ default constructor. |
|
80 * @param aPlugin reference to the owner of this object |
|
81 */ |
|
82 CLpdRequestAO( CLpdVerifierPlugin& aPlugin ); |
|
83 |
|
84 private: // Functions from base classes |
|
85 |
|
86 /** |
|
87 * From CActive. |
|
88 */ |
|
89 void RunL(); |
|
90 |
|
91 /** |
|
92 * From CActive. |
|
93 */ |
|
94 void DoCancel(); |
|
95 |
|
96 private: // Data |
|
97 |
|
98 // Verifier plugin |
|
99 CLpdVerifierPlugin& iPlugin; // doesn't own |
|
100 |
|
101 // Queue of Notification Request with all the necesary information. |
|
102 RPointerArray<CLpdNotifReqInfo> iNotificationQue; |
|
103 }; |
|
104 |
|
105 #endif // CLPDREQUESTAO_H |
|
106 |
|
107 // End of File |