void CPackagerAppUi::SetFromString(const TDesC& aString, const TText8* aString1, TInt aLineNumber) { if(serv) { serv->SetFromString(aString, aString1, aLineNumber); } }
void CPackagerAppUi::ConstructL() { CTestAppUi::ConstructL(); serv = new RMessageServ; TInt theRes = serv->Connect(); if(theRes != KErrNone) { delete serv; serv = NULL; } AutoTestManager().StartAutoTest(); }
/** @SYMTestCaseID UIF-TAppLangStarter-doTestStepL @SYMPREQ @SYMTestCaseDesc This test aims to test embedding feature of the application. @SYMTestPriority High @SYMTestStatus Implemented @SYMTestActions The dll creates a thread and starts a Message server. Once the message server is up and ready it launches the test client application, tpackage. The server installs and starts an active scheduler to service request messages received from the client and to log the information gathered from the request messages.When the server receives EMessageServSetFromString message from the client, it activates CMessageActive active object in order to output the log buffer. When client completes its work, it sends message EMessageServStop and server stops active sheduler so that server's thread might be closed. @SYMTestExpectedResults All messages send by the client should be processed by the server and outputted in the log file. */ TVerdict CTestApplicationLanguageStep::doTestStepL() // main function called by E32 { __UHEAP_MARK; SetTestStepID(_L("UIF-TAppLangStarter-doTestStepL")); CActiveScheduler* theSheduler = new CActiveScheduler; CActiveScheduler::Install(theSheduler); iMessage = CMessageActive::NewL(); iMessage->iStep = this; _LIT(KPackageAppFileName,"z:\\sys\\bin\\TAPPLANGUAGE.exe"); CApaCommandLine* cmdLine=CApaCommandLine::NewLC(); cmdLine->SetCommandL(EApaCommandViewActivate); cmdLine->SetDocumentNameL(_L("jhghjg")); cmdLine->SetExecutableNameL(KPackageAppFileName); StartThread(); RApaLsSession ls; User::LeaveIfError(ls.Connect()); CleanupClosePushL(ls); TInt err = ls.StartApp(*cmdLine); if (err != KErrNone) { TEST(EFalse); INFO_PRINTF1(_L("Failed to start application")); // If there is a problem starting the app we have to stop the // message server RMessageServ serv; TInt theRes = serv.Connect(); if(theRes == KErrNone) { serv.Stop(); serv.Close(); // Now make sure we wait until the server has stopped // Not sure this is necessary but safer while (ETrue) { TFindServer findCountServer(KMessageServerName); TFullName name; if (findCountServer.Next(name)!=KErrNone) { break; } } } } CleanupStack::PopAndDestroy(&ls); CleanupStack::PopAndDestroy(cmdLine); CActiveScheduler::Start(); delete theSheduler; delete iMessage; iMessage = NULL; REComSession::FinalClose(); RecordTestResultL(); CloseTMSGraphicsStep(); __UHEAP_MARKEND; return TestStepResult(); }