33 #include "sisregistrypackage.h" |
33 #include "sisregistrypackage.h" |
34 #include "arrayutils.h" |
34 #include "arrayutils.h" |
35 #include "hashcontainer.h" |
35 #include "hashcontainer.h" |
36 #include "dessisdataprovider.h" |
36 #include "dessisdataprovider.h" |
37 #include "siscontroller.h" |
37 #include "siscontroller.h" |
38 #include "cleanuputils.h" |
38 |
39 |
39 |
40 using namespace Swi; |
40 using namespace Swi; |
41 |
41 |
42 TInt StartSisRegistry() |
42 TInt StartSisRegistry() |
43 { |
43 { |
378 return output; |
378 return output; |
379 } |
379 } |
380 |
380 |
381 EXPORT_C void RSisRegistrySession::RetrieveLogFileL(RPointerArray<CLogEntry>& aLogEntry) |
381 EXPORT_C void RSisRegistrySession::RetrieveLogFileL(RPointerArray<CLogEntry>& aLogEntry) |
382 { |
382 { |
383 CleanupResetAndDestroyPushL(aLogEntry); |
|
384 HBufC8* buffer = SendReceiveBufferLC(EloggingFile); |
383 HBufC8* buffer = SendReceiveBufferLC(EloggingFile); |
385 |
384 |
386 RDesReadStream stream(*buffer); |
385 RDesReadStream stream(*buffer); |
387 CleanupClosePushL(stream); |
386 CleanupClosePushL(stream); |
388 TInt err; |
387 TInt err; |
407 } |
406 } |
408 while(err == KErrNone); |
407 while(err == KErrNone); |
409 } |
408 } |
410 |
409 |
411 CleanupStack::PopAndDestroy(2,buffer); //buffer,stream |
410 CleanupStack::PopAndDestroy(2,buffer); //buffer,stream |
412 CleanupStack::Pop(&aLogEntry); |
|
413 } |
411 } |
414 |
412 |
415 HBufC8* RSisRegistrySession::SendReceiveBufferLC(TInt aMessage, TPtrC8 aInputBuffer, TInt aThirdArgument) |
413 HBufC8* RSisRegistrySession::SendReceiveBufferLC(TInt aMessage, TPtrC8 aInputBuffer, TInt aThirdArgument) |
416 { |
414 { |
417 HBufC8* output = HBufC8::NewLC(KDefaultBufferSize); |
415 HBufC8* output = HBufC8::NewLC(KDefaultBufferSize); |
449 } |
447 } |
450 |
448 |
451 EXPORT_C Usif::TComponentId RSisRegistrySession::GetComponentIdForUidL(const TUid& aUid) |
449 EXPORT_C Usif::TComponentId RSisRegistrySession::GetComponentIdForUidL(const TUid& aUid) |
452 { |
450 { |
453 Usif::TComponentId componentId(0); |
451 Usif::TComponentId componentId(0); |
454 TPckg<Usif::TComponentId> componentIdPckg(componentId); |
452 TPckg<Usif::TComponentId> componentIdPckg(componentId); |
455 |
|
456 User::LeaveIfError(SendReceive(EComponentIdForUid, TIpcArgs(aUid.iUid, &componentIdPckg))); |
453 User::LeaveIfError(SendReceive(EComponentIdForUid, TIpcArgs(aUid.iUid, &componentIdPckg))); |
457 return componentId; |
454 return componentId; |
458 } |
455 } |
459 |
456 |
|
457 EXPORT_C Usif::TComponentId RSisRegistrySession::GetComponentIdForPackageL(const TDesC& aPackageName, const TDesC& aVendorName) const |
|
458 { |
|
459 Usif::TComponentId componentId(0); |
|
460 TPckg<Usif::TComponentId> componentIdPckg(componentId); |
|
461 User::LeaveIfError(SendReceive(EComponentIdForPackage, TIpcArgs(&aPackageName, &aVendorName, &componentIdPckg))); |
|
462 return componentId; |
|
463 } |
|
464 |
|
465 EXPORT_C void RSisRegistrySession::GetAppUidsForComponentL(Usif::TComponentId& aCompId, RArray<TUid>& aAppUids) |
|
466 { |
|
467 TPckgC<Usif::TComponentId> compId(aCompId); |
|
468 HBufC8* buffer = SendReceiveBufferLC(EAppUidsForComponent, static_cast<TPtrC8>(compId)); |
|
469 RDesReadStream stream(*buffer); |
|
470 CleanupClosePushL(stream); |
|
471 InternalizeArrayL(aAppUids, stream); |
|
472 CleanupStack::PopAndDestroy(2, buffer); |
|
473 } |
|
474 |
|
475 EXPORT_C void RSisRegistrySession::GetComponentIdsForUidL(TUid& aPackageUid, RArray<Usif::TComponentId>& aComponentIds) |
|
476 { |
|
477 TPckgC<TUid> pkgUid(aPackageUid); |
|
478 HBufC8* buffer = SendReceiveBufferLC(EComponentIdsForPackageUid, static_cast<TPtrC8>(pkgUid)); |
|
479 RDesReadStream stream(*buffer); |
|
480 CleanupClosePushL(stream); |
|
481 InternalizeArrayL(aComponentIds, stream); |
|
482 CleanupStack::PopAndDestroy(2, buffer); |
|
483 } |
|
484 |
|
485 EXPORT_C void RSisRegistrySession::AddAppRegInfoL(const TDesC& aAppRegFile) |
|
486 { |
|
487 TInt returnCode = SendReceive(EAddAppRegInfo, TIpcArgs(&aAppRegFile)); |
|
488 User::LeaveIfError(returnCode); |
|
489 } |
|
490 |
|
491 EXPORT_C void RSisRegistrySession::RemoveAppRegInfoL(const TDesC& aAppRegFile) |
|
492 { |
|
493 TInt returnCode = SendReceive(ERemoveAppRegInfo, TIpcArgs(&aAppRegFile)); |
|
494 User::LeaveIfError(returnCode); |
|
495 } |
|
496 |
460 #endif //SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
497 #endif //SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
461 |
498 |