localisation/apparchitecture/tef/TNonNative/TNNApp1.cpp
branchSymbian2
changeset 1 8758140453c0
child 6 c108117318cb
equal deleted inserted replaced
0:e8c1ea2c6496 1:8758140453c0
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent - Internal Symbian test code  
       
    21 */
       
    22 
       
    23 
       
    24 #include <E32STD.H>
       
    25 #include <E32BASE.H>
       
    26 #include <E32KEYS.H>
       
    27 #include <GDI.H>
       
    28 #include <W32STD.H>
       
    29 #include <COEDEF.H>
       
    30 #include <COEMAIN.H>
       
    31 #include <COEAUI.H>
       
    32 #include <COECNTRL.H>
       
    33 #include <APPARC.H>
       
    34 #include <APGWGNAM.H>
       
    35 #include <APASERVERAPP.H>
       
    36 #include <EIKENV.H>
       
    37 #include <EIKAPP.H>
       
    38 #include <EIKDOC.H>
       
    39 #include <EIKAPPUI.H>
       
    40 #include <EIKSTART.H>
       
    41 #include <EIKSERVERAPP.H>
       
    42 #include <UIKON.HRH>
       
    43 #include "TNNAPP1.H"
       
    44 #include <appfwk_test.h>
       
    45 
       
    46 TTstTransactionType gTransactionType=ETransactionType_null;
       
    47 TBool gCallMadeToNewOverload_ProcessCommandParametersL=EFalse;
       
    48 TInt gErrorWhenOpeningFile=KMinTInt;
       
    49 TBuf<50> gFileNameWithoutDriveOrPath;
       
    50 TBuf8<40> gBufferFromFile(KNullDesC8);
       
    51 
       
    52 // CTstAppService
       
    53 
       
    54 class CTstAppService : public CApaAppServiceBase
       
    55 	{
       
    56 public:
       
    57 	static CTstAppService* NewL();
       
    58 private:
       
    59 	inline CTstAppService() {}
       
    60 	// from CApaAppServiceBase
       
    61 	virtual void ServiceL(const RMessage2& aMessage);
       
    62 	};
       
    63 
       
    64 CTstAppService* CTstAppService::NewL()
       
    65 	{
       
    66 	return new(ELeave) CTstAppService;
       
    67 	}
       
    68 
       
    69 void CTstAppService::ServiceL(const RMessage2& aMessage)
       
    70 	{
       
    71 	switch (aMessage.Function())
       
    72 		{
       
    73 	case EOpcode_receiveTestResult:
       
    74 		{
       
    75 		CActiveScheduler::Stop();
       
    76 		const TBool passingFileByHandle=aMessage.Int0();
       
    77 		TBuf<50> fileNameWithoutDriveOrPath;
       
    78 		aMessage.ReadL(1, fileNameWithoutDriveOrPath);
       
    79 		TBool result=(gFileNameWithoutDriveOrPath.CompareF(fileNameWithoutDriveOrPath)==0) ? KCheckPass : KCheckFail;
       
    80 		switch (gTransactionType)
       
    81 			{
       
    82 			case ETransactionType_filePassedByName:
       
    83 				if (!gCallMadeToNewOverload_ProcessCommandParametersL)
       
    84 					{
       
    85 					result=KCheckFail;
       
    86 					}
       
    87 				if (passingFileByHandle)
       
    88 					{
       
    89 					result=KCheckFail;
       
    90 					}
       
    91 				if (gErrorWhenOpeningFile!=KErrPermissionDenied)
       
    92 					{
       
    93 					result=KCheckFail;
       
    94 					}
       
    95 				if (User::CreatorSecureId().iId!=0x101F289C) // uid of the creator app => apparctestserver!
       
    96 					{
       
    97 					result=KCheckFail;
       
    98 					}
       
    99 				break;
       
   100 
       
   101 			case ETransactionType_filePassedByHandle:
       
   102 				if (!gCallMadeToNewOverload_ProcessCommandParametersL)
       
   103 					{
       
   104 					result=KCheckFail;
       
   105 					}
       
   106 				if (!passingFileByHandle)
       
   107 					{
       
   108 					result=KCheckFail;
       
   109 					}
       
   110 				if (gErrorWhenOpeningFile!=KMinTInt)
       
   111 					{
       
   112 					result=KCheckFail;
       
   113 					}
       
   114 				if (User::CreatorSecureId().iId!=0x101F289C) // uid of the creator app => apparctestserver!
       
   115 					{
       
   116 					result=KCheckFail;
       
   117 					}
       
   118 				break;
       
   119 
       
   120 			case ETransactionType_null:
       
   121 			default:
       
   122 				User::Invariant();
       
   123 				break;
       
   124 			}
       
   125 		aMessage.Complete(result);
       
   126 		}
       
   127 		break;
       
   128 
       
   129 	default:
       
   130 		User::Leave(KErrNotSupported);
       
   131 		break;
       
   132 		}
       
   133 	}
       
   134 
       
   135 // CTstAppServer
       
   136 
       
   137 class CTstAppServer : public CEikAppServer
       
   138 	{
       
   139 public:
       
   140 	static CTstAppServer* NewL();
       
   141 private:
       
   142 	inline CTstAppServer() {}
       
   143 	// from CApaAppServer
       
   144 	virtual CApaAppServiceBase* CreateServiceL(TUid aServiceUid) const;
       
   145 	virtual TCustomResult CreateServiceSecurityCheckL(TUid aServiceUid, const RMessage2& aMessage, TInt& aAction, TSecurityInfo& aMissingSecurityInfo);
       
   146 	};
       
   147 
       
   148 CTstAppServer* CTstAppServer::NewL()
       
   149 	{ // static
       
   150 	CTstAppServer* const appServer=new(ELeave) CTstAppServer;
       
   151 	CleanupStack::PushL(appServer);
       
   152 	appServer->ConstructL(KLitServerName);
       
   153 	CleanupStack::Pop(appServer);
       
   154 	return appServer;
       
   155 	}
       
   156 
       
   157 CApaAppServiceBase* CTstAppServer::CreateServiceL(TUid aServiceUid) const
       
   158 	{
       
   159 	if ((aServiceUid.iUid==KTstServiceUid_nonSecure.iUid) ||
       
   160 		(aServiceUid.iUid==KTstServiceUid_secure.iUid))
       
   161 		{
       
   162 		return CTstAppService::NewL();
       
   163 		}
       
   164 	User::Leave(KErrNotSupported);
       
   165 	return NULL;
       
   166 	}
       
   167 
       
   168 CPolicyServer::TCustomResult CTstAppServer::CreateServiceSecurityCheckL(TUid aServiceUid, const RMessage2& aMessage, TInt& aAction, TSecurityInfo& aMissingSecurityInfo)
       
   169 	{
       
   170 	if ((aServiceUid.iUid==KTstServiceUid_secure.iUid) && (aMessage.SecureId().iId!=0x101F289C))  // uid of the creator app => apparctestserver!
       
   171 		{
       
   172 		return EFail;
       
   173 		}
       
   174 	return CEikAppServer::CreateServiceSecurityCheckL(aServiceUid, aMessage, aAction, aMissingSecurityInfo);
       
   175 	}
       
   176 
       
   177 // CTstControl
       
   178 
       
   179 class CTstControl : public CCoeControl
       
   180 	{
       
   181 public:
       
   182 	static CTstControl* NewL();
       
   183 	virtual ~CTstControl();
       
   184 private:
       
   185 	CTstControl();
       
   186 	void ConstructL();
       
   187 	// from CCoeControl
       
   188 	virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aEventCode);
       
   189 	virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
       
   190 	virtual void Draw(const TRect& aRectangle) const;
       
   191 private:
       
   192 	CTstAppServer* iAppServer;
       
   193 	};
       
   194 
       
   195 CTstControl* CTstControl::NewL()
       
   196 	{ // static
       
   197 	CTstControl* const control=new(ELeave) CTstControl;
       
   198 	CleanupStack::PushL(control);
       
   199 	control->ConstructL();
       
   200 	CleanupStack::Pop(control);
       
   201 	return control;
       
   202 	}
       
   203 
       
   204 CTstControl::~CTstControl()
       
   205 	{
       
   206 	delete iAppServer;
       
   207 	iEikonEnv->RemoveFromStack(this);
       
   208 	}
       
   209 
       
   210 CTstControl::CTstControl()
       
   211 	{
       
   212 	}
       
   213 
       
   214 void CTstControl::ConstructL()
       
   215 	{
       
   216 	RWsSession& windowServerSession=iCoeEnv->WsSession();
       
   217 	windowServerSession.SetAutoFlush(ETrue);
       
   218 	CreateWindowL();
       
   219 	EnableDragEvents();
       
   220 	ClaimPointerGrab();
       
   221 	RDrawableWindow& window=*DrawableWindow();
       
   222 	window.SetOrdinalPosition(0);
       
   223 	window.SetShadowHeight(3);
       
   224 	CWsScreenDevice& screenDevice=*iCoeEnv->ScreenDevice();
       
   225 	const TSize screenSize(screenDevice.SizeInPixels());
       
   226 	SetExtent(TPoint(20, 20), TSize(screenSize.iWidth-40, screenSize.iHeight-40));
       
   227 	iEikonEnv->AddDialogLikeControlToStackL(this);
       
   228 	iAppServer=CTstAppServer::NewL();
       
   229 	ActivateL();
       
   230 	}
       
   231 
       
   232 TKeyResponse CTstControl::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aEventCode)
       
   233 	{
       
   234 	if (aEventCode==EEventKey)
       
   235 		{
       
   236 		switch (aKeyEvent.iCode)
       
   237 			{
       
   238 		case EKeyEscape:
       
   239 			iEikonEnv->EikAppUi()->HandleCommandL(EEikCmdExit);
       
   240 			break;
       
   241 			}
       
   242 		}
       
   243 	return EKeyWasConsumed;
       
   244 	}
       
   245 
       
   246 void CTstControl::HandlePointerEventL(const TPointerEvent& aPointerEvent)
       
   247 	{
       
   248 	CCoeControl::HandlePointerEventL(aPointerEvent);
       
   249 	}
       
   250 
       
   251 void CTstControl::Draw(const TRect&) const
       
   252 	{
       
   253 	CWindowGc& graphicsContext=SystemGc();
       
   254 	graphicsContext.SetPenStyle(CGraphicsContext::ESolidPen);
       
   255 	graphicsContext.SetPenColor(KRgbRed);
       
   256 	graphicsContext.SetBrushStyle(CGraphicsContext::ESolidBrush);
       
   257 	graphicsContext.SetBrushColor(KRgbGray);
       
   258 	TRect rectangle(TPoint(0, 0), Rect().Size());
       
   259 	graphicsContext.DrawRect(rectangle);
       
   260 	rectangle.Shrink(1, 1);
       
   261 	graphicsContext.SetPenColor(KRgbBlue);
       
   262 	graphicsContext.SetBrushStyle(CGraphicsContext::ENullBrush);
       
   263 
       
   264 	const TInt KGapAboveTop=40;
       
   265 	const TInt KGapBetweenLines=5;
       
   266 	const TInt KMaxLengthOfText=100;
       
   267 	TBuf<KMaxLengthOfText> text;
       
   268 
       
   269 	TInt gapLeft=5;
       
   270 	const CFont* font=iCoeEnv->NormalFont();
       
   271 	graphicsContext.UseFont(font);
       
   272 	TInt heightInPixelsPlusGapBetweenLines=font->HeightInPixels()+KGapBetweenLines;
       
   273 	TPtrC transactionType;
       
   274 	switch (gTransactionType)
       
   275 		{
       
   276 		case ETransactionType_null:
       
   277 			transactionType.Set(_L("null"));
       
   278 			break;
       
   279 		case ETransactionType_filePassedByName:
       
   280 			transactionType.Set(_L("file passed by name"));
       
   281 			break;
       
   282 		case ETransactionType_filePassedByHandle:
       
   283 			transactionType.Set(_L("file passed by handle"));
       
   284 			break;
       
   285 		default:
       
   286 			User::Invariant();
       
   287 			break;
       
   288 		}
       
   289 	text.Format(_L("Transaction type: %S"), &transactionType);
       
   290 	TInt topOfText=KGapAboveTop+font->AscentInPixels();
       
   291 	graphicsContext.DrawText(text, rectangle, topOfText, CGraphicsContext::ELeft, gapLeft);
       
   292 
       
   293 	topOfText+=heightInPixelsPlusGapBetweenLines;
       
   294 	_LIT(KLit_yes, "yes");
       
   295 	_LIT(KLit_no, "no");
       
   296 	text.Format(_L("ProcessCommandParametersL(CApaCommandLine&) called: %S"), gCallMadeToNewOverload_ProcessCommandParametersL? &KLit_yes: &KLit_no);
       
   297 	graphicsContext.DrawText(text, rectangle, topOfText, CGraphicsContext::ELeft, gapLeft);
       
   298 
       
   299 	topOfText+=heightInPixelsPlusGapBetweenLines;
       
   300 	text.Format(_L("Error when opening file: %d"), gErrorWhenOpeningFile);
       
   301 	graphicsContext.DrawText(text, rectangle, topOfText, CGraphicsContext::ELeft, gapLeft);
       
   302 
       
   303 	topOfText+=heightInPixelsPlusGapBetweenLines;
       
   304 	text=_L("File contents: {");
       
   305 	const TInt bufferLength=gBufferFromFile.Length();
       
   306 	for (TInt i=0; i<bufferLength; ++i)
       
   307 		{
       
   308 		if (KMaxLengthOfText-text.Length()<5)
       
   309 			{
       
   310 			break;
       
   311 			}
       
   312 		text.AppendFormat(_L("\\x%02x"), gBufferFromFile[i]);
       
   313 		}
       
   314 	text.Append('}');
       
   315 	graphicsContext.DrawText(text, rectangle, topOfText, CGraphicsContext::ELeft, gapLeft);
       
   316 
       
   317 	graphicsContext.DiscardFont();
       
   318 	}
       
   319 
       
   320 // CTstAppUi
       
   321 
       
   322 class CTstAppUi : public CEikAppUi
       
   323 	{
       
   324 public:
       
   325 	static CTstAppUi* NewL();
       
   326 	inline CTstControl* Control() {return iControl;}
       
   327 private:
       
   328 	inline CTstAppUi() {}
       
   329 	virtual ~CTstAppUi();
       
   330 	// from MEikCommandObserver
       
   331 	virtual void ProcessCommandL(TInt);
       
   332 	// from MEikMenuObserver
       
   333 	virtual void RestoreMenuL(CCoeControl*, TInt, TMenuType);
       
   334 	virtual void DynInitMenuPaneL(TInt, CEikMenuPane*);
       
   335 	virtual void DynInitMenuBarL(TInt, CEikMenuBar*);
       
   336 	// from CEikAppUi
       
   337 	virtual void ConstructL();
       
   338 	virtual TBool ProcessCommandParametersL(TApaCommand, TFileName& aDocumentName, const TDesC8&);
       
   339 	virtual TBool ProcessCommandParametersL(CApaCommandLine& aCommandLine);
       
   340 	virtual void HandleCommandL(TInt aCommand);
       
   341 	virtual void OpenFileL(const TDesC&);
       
   342 	virtual void CreateFileL(const TDesC&);
       
   343 private:
       
   344 	CTstControl* iControl;
       
   345 	};
       
   346 
       
   347 CTstAppUi* CTstAppUi::NewL()
       
   348 	{ // static
       
   349 	return new(ELeave) CTstAppUi;
       
   350 	}
       
   351 
       
   352 CTstAppUi::~CTstAppUi()
       
   353 	{
       
   354 	delete iControl;
       
   355 	}
       
   356 
       
   357 void CTstAppUi::ProcessCommandL(TInt)
       
   358 	{
       
   359 	User::Invariant();
       
   360 	}
       
   361 
       
   362 void CTstAppUi::RestoreMenuL(CCoeControl*, TInt, TMenuType)
       
   363 	{
       
   364 	User::Invariant();
       
   365 	}
       
   366 
       
   367 void CTstAppUi::DynInitMenuPaneL(TInt, CEikMenuPane*)
       
   368 	{
       
   369 	User::Invariant();
       
   370 	}
       
   371 
       
   372 void CTstAppUi::DynInitMenuBarL(TInt, CEikMenuBar*)
       
   373 	{
       
   374 	User::Invariant();
       
   375 	}
       
   376 
       
   377 void CTstAppUi::ConstructL()
       
   378 	{
       
   379 	BaseConstructL(ENoAppResourceFile|ENoScreenFurniture);
       
   380 	iControl=CTstControl::NewL();
       
   381 	}
       
   382 
       
   383 TBool CTstAppUi::ProcessCommandParametersL(TApaCommand, TFileName& aDocumentName, const TDesC8&)
       
   384 	{
       
   385 	aDocumentName.SetLength(0);
       
   386 	return EFalse;
       
   387 	}
       
   388 
       
   389 TBool CTstAppUi::ProcessCommandParametersL(CApaCommandLine&)
       
   390 	{
       
   391 	gCallMadeToNewOverload_ProcessCommandParametersL=ETrue;
       
   392 	iControl->DrawNow();
       
   393 	return ETrue;
       
   394 	}
       
   395 
       
   396 void CTstAppUi::HandleCommandL(TInt aCommand)
       
   397 	{
       
   398 	switch (aCommand)
       
   399 		{
       
   400 	case EEikCmdExit:
       
   401 		Exit();
       
   402 		break;
       
   403 	default:
       
   404 		User::Invariant();
       
   405 		}
       
   406 	}
       
   407 
       
   408 void CTstAppUi::OpenFileL(const TDesC&)
       
   409 	{
       
   410 	User::Invariant();
       
   411 	}
       
   412 
       
   413 void CTstAppUi::CreateFileL(const TDesC&)
       
   414 	{
       
   415 	User::Invariant();
       
   416 	}
       
   417 
       
   418 // CTstDocument
       
   419 
       
   420 class CTstDocument : public CEikDocument
       
   421 	{
       
   422 public:
       
   423 	static CTstDocument* NewL(CEikApplication& aApplication);
       
   424 	inline CTstAppUi* TstAppUi() {return STATIC_CAST(CTstAppUi*, iAppUi);}
       
   425 private:
       
   426 	inline CTstDocument(CEikApplication& aApplication) :CEikDocument(aApplication) {}
       
   427 	// from CApaDocument
       
   428 	virtual CFileStore* CreateFileStoreLC(RFs&, const TDesC&);
       
   429 	virtual void EditL(MApaEmbeddedDocObserver*, TBool);
       
   430 	virtual void PrintL(const CStreamStore&);
       
   431 	virtual void SaveL();
       
   432 	virtual void StoreL(CStreamStore&, CStreamDictionary&) const;
       
   433 	// from CEikDocument
       
   434 	virtual CEikAppUi* CreateAppUiL();
       
   435 	virtual CFileStore* OpenFileL(TBool aDoOpen, const TDesC& aFileName, RFs& aFsSession);
       
   436 	virtual void OpenFileL(CFileStore*& aFileStore, RFile& aFile);
       
   437 	virtual void UpdateTaskNameL(CApaWindowGroupName* aWindowGroupName);
       
   438 	};
       
   439 
       
   440 CTstDocument* CTstDocument::NewL(CEikApplication& aApplication)
       
   441 	{ // static
       
   442 	return new(ELeave) CTstDocument(aApplication);
       
   443 	}
       
   444 
       
   445 CFileStore* CTstDocument::CreateFileStoreLC(RFs&, const TDesC&)
       
   446 	{
       
   447 	User::Invariant();
       
   448 	return NULL;
       
   449 	}
       
   450 
       
   451 void CTstDocument::EditL(MApaEmbeddedDocObserver*, TBool)
       
   452 	{
       
   453 	User::Invariant();
       
   454 	}
       
   455 
       
   456 void CTstDocument::PrintL(const CStreamStore&)
       
   457 	{
       
   458 	User::Invariant();
       
   459 	}
       
   460 
       
   461 void CTstDocument::SaveL()
       
   462 	{
       
   463 	SetChanged(EFalse);
       
   464 	}
       
   465 
       
   466 void CTstDocument::StoreL(CStreamStore&, CStreamDictionary&) const
       
   467 	{
       
   468 	User::Invariant();
       
   469 	}
       
   470 
       
   471 CEikAppUi* CTstDocument::CreateAppUiL()
       
   472 	{
       
   473 	return CTstAppUi::NewL();
       
   474 	}
       
   475 
       
   476 CFileStore* CTstDocument::OpenFileL(TBool aDoOpen, const TDesC& aFileName, RFs& aFsSession)
       
   477 	{
       
   478 	if (!aDoOpen)
       
   479 		{
       
   480 		User::Leave(KErrNotSupported);
       
   481 		}
       
   482 	gFileNameWithoutDriveOrPath=TParsePtrC(aFileName).NameAndExt();
       
   483 	RFile file;
       
   484 	CleanupClosePushL(file);
       
   485 	APPFWK_NEGATIVE_PLATSEC_START;
       
   486 	gErrorWhenOpeningFile=file.Open(aFsSession, aFileName, EFileShareReadersOnly|EFileStream|EFileRead);
       
   487 	APPFWK_NEGATIVE_PLATSEC_FINISH;
       
   488 	if (gErrorWhenOpeningFile==KErrNone)
       
   489 		{
       
   490 		User::LeaveIfError(file.Read(gBufferFromFile));
       
   491 		}
       
   492 	CleanupStack::PopAndDestroy(&file);
       
   493 	gTransactionType=ETransactionType_filePassedByName;
       
   494 	TstAppUi()->Control()->DrawNow();
       
   495 	return NULL;
       
   496 	}
       
   497 
       
   498 void CTstDocument::OpenFileL(CFileStore*& aFileStore, RFile& aFile)
       
   499 	{
       
   500 	User::LeaveIfError(aFile.Name(gFileNameWithoutDriveOrPath));
       
   501 	User::LeaveIfError(aFile.Read(gBufferFromFile));
       
   502 	gTransactionType=ETransactionType_filePassedByHandle;
       
   503 	TstAppUi()->Control()->DrawNow();
       
   504 	aFileStore=NULL;
       
   505 	}
       
   506 
       
   507 void CTstDocument::UpdateTaskNameL(CApaWindowGroupName* aWindowGroupName)
       
   508 	{
       
   509 	CEikDocument::UpdateTaskNameL(aWindowGroupName);
       
   510 	}
       
   511 
       
   512 // CTstApplication
       
   513 
       
   514 class CTstApplication : public CEikApplication
       
   515 	{
       
   516 public:
       
   517 	static CTstApplication* New();
       
   518 private:
       
   519 	inline CTstApplication() {}
       
   520 	// from CApaApplication
       
   521 	virtual TUid AppDllUid() const;
       
   522 	virtual CDictionaryStore* OpenIniFileLC(RFs&) const;
       
   523 	// from CEikApplication
       
   524 	virtual void GetDefaultDocumentFileName(TFileName& aDocumentName) const;
       
   525 	virtual TFileName BitmapStoreName() const;
       
   526 	virtual TFileName ResourceFileName() const;
       
   527 	virtual CApaDocument* CreateDocumentL();
       
   528 	virtual void NewAppServerL(CApaAppServer*& aAppServer);
       
   529 	};
       
   530 
       
   531 CTstApplication* CTstApplication::New()
       
   532 	{ // static
       
   533 	return new CTstApplication;
       
   534 	}
       
   535 
       
   536 TUid CTstApplication::AppDllUid() const
       
   537 	{
       
   538 	return TUid::Uid(0x10207f92);
       
   539 	}
       
   540 
       
   541 CDictionaryStore* CTstApplication::OpenIniFileLC(RFs&) const
       
   542 	{
       
   543 	return NULL; // must not leave anything on the clean-up stack if it returns NULL
       
   544 	}
       
   545 
       
   546 void CTstApplication::GetDefaultDocumentFileName(TFileName& aDocumentName) const
       
   547 	{
       
   548 	aDocumentName.SetLength(0);
       
   549 	}
       
   550 
       
   551 TFileName CTstApplication::BitmapStoreName() const
       
   552 	{
       
   553 	return KNullDesC();
       
   554 	}
       
   555 
       
   556 TFileName CTstApplication::ResourceFileName() const
       
   557 	{
       
   558 	return KNullDesC();
       
   559 	}
       
   560 
       
   561 CApaDocument* CTstApplication::CreateDocumentL() // must return non-NULL
       
   562 	{
       
   563 	return CTstDocument::NewL(*this);
       
   564 	}
       
   565 
       
   566 void CTstApplication::NewAppServerL(CApaAppServer*& aAppServer)
       
   567 	{
       
   568 	// this doesn't get called by the framework as we're not launching the server via the server-differentiator in CApaCommandLine, we launching the server as a fixed-name server so we have to call this function ourselves instead
       
   569 	CEikApplication::NewAppServerL(aAppServer);
       
   570 	}
       
   571 
       
   572 // stand-alone functions
       
   573 
       
   574 LOCAL_C CApaApplication* NewApplication()
       
   575 	{
       
   576 	return CTstApplication::New();
       
   577 	}
       
   578 
       
   579 GLDEF_C TInt E32Main()
       
   580 	{
       
   581 	return EikStart::RunApplication(NewApplication);
       
   582 	}