19 #include <caf/caf.h> |
19 #include <caf/caf.h> |
20 #include <caf/cafpanic.h> |
20 #include <caf/cafpanic.h> |
21 #include <caf/dirstreamable.h> |
21 #include <caf/dirstreamable.h> |
22 #include "f32agentmanager.h" |
22 #include "f32agentmanager.h" |
23 #include "f32defaultattributes.h" |
23 #include "f32defaultattributes.h" |
24 #include "f32agentui.h" |
24 #include <caf/f32agentui.h> |
25 |
25 |
26 using namespace ContentAccess; |
26 using namespace ContentAccess; |
27 |
27 |
28 CF32AgentManager* CF32AgentManager::NewL() |
28 CF32AgentManager* CF32AgentManager::NewL() |
29 { |
29 { |
203 } |
203 } |
204 |
204 |
205 return TF32DefaultAttributes::GetStringAttributeSet(aAttributeSet, aVirtualPath.URI()); |
205 return TF32DefaultAttributes::GetStringAttributeSet(aAttributeSet, aVirtualPath.URI()); |
206 } |
206 } |
207 |
207 |
|
208 TInt CF32AgentManager::GetAttribute(TInt aAttribute, TInt& aValue, RFile& aFile, const TDesC& aUniqueId) |
|
209 { |
|
210 // Check that the client hasn't specified some incorrect UniqueId |
|
211 if(TF32DefaultAttributes::CheckUniqueId(aUniqueId) != KErrNone) |
|
212 { |
|
213 return KErrNotFound; |
|
214 } |
|
215 |
|
216 return TF32DefaultAttributes::GetAttribute(aAttribute, aValue, aFile); |
|
217 } |
|
218 |
|
219 TInt CF32AgentManager::GetAttributeSet(RAttributeSet& aAttributeSet, RFile& aFile, const TDesC& aUniqueId) |
|
220 { |
|
221 // Check that the client hasn't specified some incorrect UniqueId |
|
222 if(TF32DefaultAttributes::CheckUniqueId(aUniqueId) != KErrNone) |
|
223 { |
|
224 return KErrNotFound; |
|
225 } |
|
226 |
|
227 return TF32DefaultAttributes::GetAttributeSet(aAttributeSet, aFile); |
|
228 } |
|
229 |
|
230 TInt CF32AgentManager::GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet, RFile& aFile, const TDesC& aUniqueId) |
|
231 { |
|
232 // Check that the client hasn't specified some incorrect UniqueId |
|
233 if(TF32DefaultAttributes::CheckUniqueId(aUniqueId) != KErrNone) |
|
234 { |
|
235 return KErrNotFound; |
|
236 } |
|
237 |
|
238 return TF32DefaultAttributes::GetStringAttributeSet(aStringAttributeSet, aFile); |
|
239 } |
|
240 |
|
241 TInt CF32AgentManager::GetStringAttribute(TInt aAttribute, TDes& aValue, RFile& aFile, const TDesC& aUniqueId) |
|
242 { |
|
243 // Check that the client hasn't specified some incorrect UniqueId |
|
244 if(TF32DefaultAttributes::CheckUniqueId(aUniqueId) != KErrNone) |
|
245 { |
|
246 return KErrNotFound; |
|
247 } |
|
248 |
|
249 return TF32DefaultAttributes::GetStringAttribute(aAttribute, aValue, aFile); |
|
250 } |
|
251 |
|
252 |
208 void CF32AgentManager::NotifyStatusChange(const TDesC& , TEventMask , TRequestStatus& aStatus) |
253 void CF32AgentManager::NotifyStatusChange(const TDesC& , TEventMask , TRequestStatus& aStatus) |
209 { |
254 { |
210 TRequestStatus* ptr = &aStatus; |
255 TRequestStatus* ptr = &aStatus; |
211 User::RequestComplete(ptr, KErrCANotSupported); |
256 User::RequestComplete(ptr, KErrCANotSupported); |
212 } |
257 } |
237 } |
282 } |
238 } |
283 } |
239 |
284 |
240 void CF32AgentManager::DisplayInfoL(TDisplayInfo aInfo, const TVirtualPathPtr& aVirtualPath) |
285 void CF32AgentManager::DisplayInfoL(TDisplayInfo aInfo, const TVirtualPathPtr& aVirtualPath) |
241 { |
286 { |
|
287 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
|
288 RFile64 file; |
|
289 #else |
242 RFile file; |
290 RFile file; |
|
291 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
243 |
292 |
244 // Check that the client hasn't specified some incorrect UniqueId |
293 // Check that the client hasn't specified some incorrect UniqueId |
245 User::LeaveIfError(TF32DefaultAttributes::CheckUniqueId(aVirtualPath.UniqueId())); |
294 User::LeaveIfError(TF32DefaultAttributes::CheckUniqueId(aVirtualPath.UniqueId())); |
246 |
295 |
247 // Open the file as read only |
296 // Open the file as read only |
249 CleanupClosePushL(file); |
298 CleanupClosePushL(file); |
250 AgentUiL().DisplayInfoL(aInfo, file); |
299 AgentUiL().DisplayInfoL(aInfo, file); |
251 CleanupStack::PopAndDestroy(&file); |
300 CleanupStack::PopAndDestroy(&file); |
252 } |
301 } |
253 |
302 |
|
303 void CF32AgentManager::DisplayInfoL(TDisplayInfo aInfo, RFile& aFile, const TDesC& aUniqueId) |
|
304 { |
|
305 // Check that the client hasn't specified some incorrect UniqueId |
|
306 User::LeaveIfError(TF32DefaultAttributes::CheckUniqueId(aUniqueId)); |
|
307 |
|
308 // Open the file as read only |
|
309 AgentUiL().DisplayInfoL(aInfo, aFile); |
|
310 } |
|
311 |
|
312 |
254 TInt CF32AgentManager::AgentSpecificCommand(TInt , const TDesC8& , TDes8& ) |
313 TInt CF32AgentManager::AgentSpecificCommand(TInt , const TDesC8& , TDes8& ) |
255 { |
314 { |
256 return KErrCANotSupported; |
315 return KErrCANotSupported; |
257 } |
316 } |
258 |
317 |