|
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: Processes requestor related data. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CLPDREQUESTORPROCESSOR_H |
|
20 #define CLPDREQUESTORPROCESSOR_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "locrequestorutilsresolver.h" |
|
24 #include <e32base.h> |
|
25 #include <eiklbv.h> |
|
26 #include <lbs/epos_rposrequestorstack.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CPosPrivacyNotifier; |
|
30 class CEikFormattedCellListBox; |
|
31 class CSelectionIndexArray; |
|
32 class CListBoxView; |
|
33 class CLpdBaseModel; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * This class reads, processes and owns requestor data. |
|
39 * @lib locverifierdlg.dll |
|
40 * @since 2.1 |
|
41 */ |
|
42 class CLpdRequestorProcessor : public CBase |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 * @return created object |
|
49 */ |
|
50 static CLpdRequestorProcessor* NewL(); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 virtual ~CLpdRequestorProcessor(); |
|
56 |
|
57 public: // New functions |
|
58 |
|
59 /** |
|
60 * Reads requestor information from the privacy notifier. |
|
61 * Uses RequestorIdValid() for id validity check. |
|
62 * Calls UpdateRuleRequestorsL(). |
|
63 * @param aPosNotifier reference |
|
64 * @return ETrue if all requestor id's were valid, EFalse otherwise. |
|
65 */ |
|
66 TBool ReadRequestorsL( const CPosPrivacyNotifier& aPosNotifier ); |
|
67 |
|
68 /** |
|
69 * Returns requestor array for reading. |
|
70 * @return array of requestors |
|
71 */ |
|
72 const RPointerArray<CPosRequestor>& Requestors() const; |
|
73 |
|
74 /** |
|
75 * Sets Type of Request |
|
76 */ |
|
77 void SetRequestType( TInt aReqType ); |
|
78 |
|
79 /** |
|
80 * Resets requestor arrays and destroys requestor objects. |
|
81 */ |
|
82 void ResetAndDestroyRequestors(); |
|
83 |
|
84 /** |
|
85 * Method for creating a formatted array with |
|
86 * icons and requestor names. |
|
87 * Used for verifier queries and notifications. |
|
88 * @param aListBox needed for formatting data |
|
89 * @return created array, ownership is transferred to caller |
|
90 */ |
|
91 CLpdBaseModel* RtorNamesForVerifNotifL( |
|
92 CEikFormattedCellListBox& aListBox ); |
|
93 |
|
94 /** |
|
95 * In case where the verifcation cancellation event is queued, it |
|
96 * is necessary to retrieve all the information needed for the |
|
97 * notification dialog. The information is present in the base class |
|
98 * of Query and Notification Interface. |
|
99 */ |
|
100 RPosRequestorStack* RetrieveRequestorsL( |
|
101 const CPosPrivacyNotifier& aPosNotifier ); |
|
102 |
|
103 |
|
104 /** |
|
105 * Read the requestors into the iRequestors memeber variable. |
|
106 * Process the requestors by resolving them with contacts information. |
|
107 * CLocRequestorUtilsResolver is used to resolve the requestors. |
|
108 */ |
|
109 void ReadRequestorsL( |
|
110 const RPosRequestorStack& aRequestors ); |
|
111 |
|
112 /** |
|
113 * Retrieves Requestor name from string passed |
|
114 */ |
|
115 TPtrC RetrieveRequestorNameL( |
|
116 const TDesC& aString ); |
|
117 /** |
|
118 * Retrieves session id from string passed |
|
119 */ |
|
120 TInt64 RetrieveSessionId( |
|
121 const TDesC& aString ); |
|
122 /** |
|
123 * Sets session id of request |
|
124 */ |
|
125 void SetSessionId( TInt64 aSessionId ); |
|
126 |
|
127 /** |
|
128 * Gets session id of request |
|
129 */ |
|
130 TInt64 GetSessionId(); |
|
131 |
|
132 |
|
133 |
|
134 protected: // Constructors and destructors |
|
135 |
|
136 /** |
|
137 * C++ constructor. |
|
138 */ |
|
139 CLpdRequestorProcessor(); |
|
140 |
|
141 protected: // New methods |
|
142 |
|
143 /** |
|
144 * Handles assert errors. Panics in debug build but leaves in release |
|
145 * build, as this component runs in EikSrv and must never panic. |
|
146 */ |
|
147 void HandleAssertErrorL() const; |
|
148 |
|
149 private: // Data |
|
150 |
|
151 // Array of currently handled requestors... |
|
152 RPointerArray<CPosRequestor> iRequestors; |
|
153 |
|
154 TInt iSuplRequest; |
|
155 |
|
156 TInt64 iSessionId; |
|
157 }; |
|
158 |
|
159 #endif // CLPDREQUESTORPROCESSOR_H |
|
160 |
|
161 // End of File |