diff -r e8c1ea2c6496 -r 8758140453c0 localisation/apparchitecture/tef/t_winchainChild_Application.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/localisation/apparchitecture/tef/t_winchainChild_Application.cpp Thu Jan 21 12:53:44 2010 +0000 @@ -0,0 +1,207 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Source file for the implementation of the +// application class - CChainChildApplication +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "t_winChainChild.h" + + +/** The function is called by the UI framework to ask for the + application's UID. The returned value is defined by the + constant KUidTChainChildApp and must match the second value + defined in the project definition file. +*/ +TUid CChainChildApplication::AppDllUid() const + { + return KUidTChainChildApp; + } + +/** This function is called by the UI framework at + application start-up. It creates an instance of the + document class. +*/ +CApaDocument* CChainChildApplication::CreateDocumentL() + { + return new (ELeave) CChainChildDocument(*this); + } + + LOCAL_C CApaApplication* NewApplication() + { + return new CChainChildApplication; + } + +TFileName CChainChildApplication::BitmapStoreName() const + { + return KNullDesC(); + } + +TFileName CChainChildApplication::ResourceFileName() const + { + return KNullDesC(); + } + + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication( NewApplication ); + } + + + +/** The constructor of the document class just passes the + supplied reference to the constructor initialisation list. + The document has no real work to do in this application. +*/ +CChainChildDocument::CChainChildDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + + +/** This is called by the UI framework as soon as the + document has been created. It creates an instance + of the ApplicationUI. The Application UI class is + an instance of a CEikAppUi derived class. +*/ +CEikAppUi* CChainChildDocument::CreateAppUiL() + { + return new(ELeave) CChainChildAppUi; + } + +#include +/** The second phase constructor of the application UI class. + The application UI creates and owns the one and only view. +*/ +void CChainChildAppUi::ConstructL() + { + //CEikAppUi::ConstructL(); + CEikAppUi::BaseConstructL(ENoAppResourceFile|ENoScreenFurniture); + } + +// Check if parent ID is the KExoticOrdinalPriority +TInt CMyAppService::TestL(TInt aParentWindowGroupID) + { + CCoeEnv* coeEnv = CCoeEnv::Static(); + + + TInt wgCount=coeEnv->WsSession().NumWindowGroups(KExoticOrdinalPriority); + + RDebug::Print(_L("Child - TestL: wgCount = %d"), wgCount); + + RArray* wgIds=new(ELeave) RArray(wgCount); + CleanupStack::PushL(wgIds); + User::LeaveIfError(coeEnv->WsSession().WindowGroupList(KExoticOrdinalPriority,wgIds)); + + TBool testPassed=EFalse; + + // The root identifier of this window + TInt rootIdentifier = coeEnv->RootWin().Identifier(); + + RDebug::Print(_L("Child - TestL: rootIdentifier = %d"), rootIdentifier); + + RDebug::Print(_L("Child - TestL: Entering loop..")); + // Go through all window group IDs looking for the current one + for (TInt i=0;i