51 _LIT(KPrivateRegistryCapTestName, "Registry private interface capability test"); |
51 _LIT(KPrivateRegistryCapTestName, "Registry private interface capability test"); |
52 _LIT(KDaemonRegistryCapTestName, "Registry daemon interface capability test"); |
52 _LIT(KDaemonRegistryCapTestName, "Registry daemon interface capability test"); |
53 _LIT(KRevocationRegistryCapTestName, "Registry revocation interface capability test"); |
53 _LIT(KRevocationRegistryCapTestName, "Registry revocation interface capability test"); |
54 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
54 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
55 _LIT(KSifServerRegistryCapTestName, "Registry SIF interface security test"); |
55 _LIT(KSifServerRegistryCapTestName, "Registry SIF interface security test"); |
|
56 _LIT(KSisRegistryTCBCapTestName, "Sis Registry interface requiring TCB security test"); |
56 #endif |
57 #endif |
57 |
58 |
58 CPublicRegistryCapTest* CPublicRegistryCapTest::NewL() |
59 CPublicRegistryCapTest* CPublicRegistryCapTest::NewL() |
59 { |
60 { |
60 CPublicRegistryCapTest* self=new(ELeave) CPublicRegistryCapTest(); |
61 CPublicRegistryCapTest* self=new(ELeave) CPublicRegistryCapTest(); |
605 TRAP(err, session.DeactivateComponentL(componentId)); |
606 TRAP(err, session.DeactivateComponentL(componentId)); |
606 CheckFailL(err, _L("DeactivateComponentL")); |
607 CheckFailL(err, _L("DeactivateComponentL")); |
607 |
608 |
608 CleanupStack::PopAndDestroy(&session); |
609 CleanupStack::PopAndDestroy(&session); |
609 } |
610 } |
610 #endif |
611 |
611 |
612 CSisRegistryTCBCapTest* CSisRegistryTCBCapTest::NewL() |
612 |
613 { |
|
614 CSisRegistryTCBCapTest* self=new(ELeave) CSisRegistryTCBCapTest(); |
|
615 CleanupStack::PushL(self); |
|
616 self->ConstructL(); |
|
617 CleanupStack::Pop(self); |
|
618 return self; |
|
619 } |
|
620 |
|
621 CSisRegistryTCBCapTest::CSisRegistryTCBCapTest() |
|
622 { |
|
623 SetCapabilityRequired(ECapabilityTCB); //API requires TCB capability, so giving it |
|
624 } |
|
625 |
|
626 void CSisRegistryTCBCapTest::ConstructL() |
|
627 { |
|
628 SetNameL(KSisRegistryTCBCapTestName); |
|
629 } |
|
630 |
|
631 void CSisRegistryTCBCapTest::RunTestL() |
|
632 { |
|
633 Swi::RSisRegistrySession registrySession; |
|
634 CleanupClosePushL(registrySession); |
|
635 _LIT(regFileName,"c:\\private\\10003a3f\\import\\apps\\dummy_reg.rsc"); |
|
636 TInt err = registrySession.Connect(); |
|
637 if (KErrNone != err) |
|
638 { |
|
639 SetFail(); |
|
640 CleanupStack::PopAndDestroy(®istrySession); |
|
641 return; |
|
642 } |
|
643 |
|
644 TRAP(err, registrySession.AddAppRegInfoL(regFileName)); |
|
645 CheckFailL(err, _L("AddAppRegInfoL")); |
|
646 |
|
647 TRAP(err, registrySession.RemoveAppRegInfoL(regFileName)); |
|
648 CheckFailL(err, _L("RemoveAppRegInfoL")); |
|
649 |
|
650 CleanupStack::PopAndDestroy(®istrySession); |
|
651 } |
|
652 #endif |
|
653 |
|
654 |