|
1 /* |
|
2 * Copyright (c) 2005-2007 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: Phonebook 2 UI Service IPC client. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef RPBK2UISERVICE_H |
|
20 #define RPBK2UISERVICE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <AknServerApp.h> |
|
24 #include <Pbk2ServerAppIPC.h> |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /** |
|
29 * Phonebook 2 UI Service IPC client. |
|
30 * Responsible for handling IPC traffic with Phonebook 2 Application Server. |
|
31 */ |
|
32 class RPbk2UIService : public RAknAppServiceBase |
|
33 { |
|
34 public: // Constructor |
|
35 |
|
36 /** |
|
37 * Constructor. |
|
38 */ |
|
39 RPbk2UIService(); |
|
40 |
|
41 public: // Interface |
|
42 |
|
43 /** |
|
44 * Launches assign service. |
|
45 * |
|
46 * @param aStatus Request status. |
|
47 * @param aConfigurationPackage Buffer containing |
|
48 * configuration data. |
|
49 * @param aDataPackage Buffer containing the |
|
50 * data to assign. |
|
51 * @param aAssignInstructions Buffer for assign instructions. |
|
52 * @param aCanceled Cancel information. |
|
53 */ |
|
54 void LaunchAssignL( |
|
55 TRequestStatus& aStatus, |
|
56 HBufC8* aConfigurationPackage, |
|
57 HBufC8* aDataPackage, |
|
58 HBufC8* aAssignInstructions, |
|
59 TBool& aCanceled ); |
|
60 |
|
61 /** |
|
62 * Launches attribute assign service. |
|
63 * |
|
64 * @param aStatus Request status. |
|
65 * @param aConfigurationPackage Buffer containing |
|
66 * configuration data. |
|
67 * @param aAttributePackage The attribute to assign. |
|
68 * @param aAssignInstructions Buffer for assign instructions. |
|
69 * @param aCanceled Cancel information. |
|
70 */ |
|
71 void LaunchAttributeAssignL( |
|
72 TRequestStatus& aStatus, |
|
73 HBufC8* aConfigurationPackage, |
|
74 TPbk2AttributeAssignData& aAttributePackage, |
|
75 HBufC8* aAssignInstructions, |
|
76 TBool& aCanceled ); |
|
77 |
|
78 /** |
|
79 * Launches attribute unassign service. |
|
80 * |
|
81 * @param aStatus Request status. |
|
82 * @param aConfigurationPackage Buffer containing |
|
83 * configuration data. |
|
84 * @param aAttributePackage The attribute to unassign. |
|
85 * @param aAssignInstructions Buffer for assign instructions. |
|
86 * @param aCanceled Cancel information. |
|
87 */ |
|
88 void LaunchAttributeUnassignL( |
|
89 TRequestStatus& aStatus, |
|
90 HBufC8* aConfigurationPackage, |
|
91 TPbk2AttributeAssignData aAttributePackage, |
|
92 HBufC8* aAssignInstructions, |
|
93 TBool& aCanceled ); |
|
94 |
|
95 /** |
|
96 * Launches fetch service. |
|
97 * |
|
98 * @param aStatus Request status. |
|
99 * @param aConfigurationPackage Buffer containing |
|
100 * configuration data. |
|
101 * @param aAssignInstructions Buffer for fetch instructions. |
|
102 * @param aCanceled Cancel information. |
|
103 */ |
|
104 void LaunchFetchL( |
|
105 TRequestStatus& aStatus, |
|
106 HBufC8* aConfigurationPackage, |
|
107 HBufC8* aFetchInstructions, |
|
108 TBool& aCanceled ); |
|
109 |
|
110 /** |
|
111 * Cancels assign service. |
|
112 * |
|
113 * @param aCanceled Cancel information. |
|
114 */ |
|
115 void CancelAssign( |
|
116 TBool& aCanceled ); |
|
117 |
|
118 |
|
119 /** |
|
120 * Cancels fetch service. |
|
121 * |
|
122 * @param aCanceled Cancel information. |
|
123 */ |
|
124 void CancelFetch( |
|
125 TBool& aCanceled ); |
|
126 |
|
127 /** |
|
128 * Retrieves results. |
|
129 * |
|
130 * @param aArrayResults Buffer where the contact link array results |
|
131 * will be fetched into. |
|
132 * @param aFieldResults Buffer where the field content results |
|
133 * will be fetched into. |
|
134 */ |
|
135 void GetResultsL( |
|
136 HBufC8& aArrayResults, |
|
137 TInt& aExtraData, |
|
138 HBufC& aFieldResults ); |
|
139 |
|
140 /** |
|
141 * Retrieves result size. |
|
142 * |
|
143 * @param aArrayResultSize Buffer where the contact link array size |
|
144 * will be fetched into. |
|
145 * @param aFieldResultSize Buffer where the field content size |
|
146 * will be fetched into. |
|
147 */ |
|
148 void GetResultSizeL( |
|
149 TInt& aArrayResultSize, |
|
150 TInt& aFieldResultSize ); |
|
151 |
|
152 /** |
|
153 * Requests exit notification. |
|
154 * |
|
155 * @param aStatus Request status. |
|
156 * @param aExitCommandId Id of the exit command. |
|
157 */ |
|
158 void ExitRequestL( |
|
159 TRequestStatus& aStatus, |
|
160 TInt& aExitCommandId ); |
|
161 |
|
162 /** |
|
163 * Cancels exit notification request. |
|
164 */ |
|
165 void CancelExitRequest(); |
|
166 |
|
167 /** |
|
168 * Sends exit command to the service. |
|
169 * |
|
170 * @param aAcceptOutput Indicates whether the exit is |
|
171 * acceptable. |
|
172 * @param aExitCommandId Exit command id. |
|
173 */ |
|
174 void ExitServiceL( |
|
175 TBool aAcceptOutput, |
|
176 TInt aExitCommandId ); |
|
177 |
|
178 /** |
|
179 * Requests accept notification. |
|
180 * |
|
181 * @param aStatus Request status. |
|
182 * @param aNumContacts Number of contacts. |
|
183 * @param aContactLink Buffer for contact links. |
|
184 */ |
|
185 void AcceptRequestL( |
|
186 TRequestStatus& aStatus, |
|
187 TInt& aNumContacts, |
|
188 HBufC8& aContactLink ); |
|
189 |
|
190 /** |
|
191 * Cancels accept notification request. |
|
192 */ |
|
193 void CancelAcceptRequest(); |
|
194 |
|
195 /** |
|
196 * Sends accept command to the service. |
|
197 * |
|
198 * @param aAcceptOutput Indicates whether to accept or not. |
|
199 * @param aContactLink Buffer for contact links, can be NULL. |
|
200 */ |
|
201 void AcceptServiceL( |
|
202 TBool aAcceptOutput, |
|
203 HBufC8* aContactLink ); |
|
204 |
|
205 private: // From RAknAppServiceBase |
|
206 TUid ServiceUid() const; |
|
207 |
|
208 private: // Data |
|
209 /// Own: Configuration package |
|
210 TPtr8 iConfigurationPackagePtr; |
|
211 /// Own: Data package |
|
212 TPtr8 iDataPackagePtr; |
|
213 /// Own: Instructions |
|
214 TPtr8 iInstructionsPtr; |
|
215 /// Own: Results size for contant link array |
|
216 TPtr8 iResultArraySizePtr; |
|
217 /// Own: Results for contact links |
|
218 TPtr8 iArrayResultsPtr; |
|
219 /// Own: Cancel information |
|
220 TPtr8 iCanceledPtr; |
|
221 /// Own: Id of the exit command |
|
222 TPtr8 iExitCommandIdPtr; |
|
223 /// Own: Number of contacts |
|
224 TPtr8 iCountPtr; |
|
225 /// Own: Contact link |
|
226 TPtr8 iContactLinkPtr; |
|
227 /// Own: Results size for field content |
|
228 TPtr8 iResultFieldSizePtr; |
|
229 /// Own: Results for field content |
|
230 TPtr16 iFieldResultsPtr; |
|
231 |
|
232 }; |
|
233 |
|
234 #endif // RPBK2UISERVICE_H |
|
235 |
|
236 // End of File |