sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32test\earlyextension\t_testextension.cpp sl@0: // sl@0: // sl@0: sl@0: #include sl@0: #include sl@0: #include "d_wsdextension.h" sl@0: sl@0: RLddWsdExtension lddChan; sl@0: GLDEF_D RTest test(_L("LDD tests")); sl@0: _LIT(KLddFileName, "D_WSDEXTENSION.LDD"); sl@0: sl@0: GLDEF_C TInt E32Main() sl@0: { sl@0: test.Title(); sl@0: test.Start(_L("Testing WSD extension...\n")); sl@0: //Load logical device sl@0: TInt r = User::LoadLogicalDevice(KLddFileName); sl@0: test((r == KErrNone) || (r == KErrAlreadyExists)); sl@0: //Open the channel sl@0: r = lddChan.Open(); sl@0: test(r==KErrNone || r==KErrAlreadyExists); sl@0: sl@0: TInt data=0; sl@0: r = lddChan.Test_getStaticData(data); sl@0: test(r == KErrNone); sl@0: test(data == 0xEFEFEFEF); sl@0: test.Printf(_L("Static Data from extension as expected!!!\n")); sl@0: test.Printf(_L("Closing the channel\n")); sl@0: sl@0: lddChan.Close(); sl@0: sl@0: test.Printf(_L("Freeing logical device\n")); sl@0: r = User::FreeLogicalDevice(KLddFileName); sl@0: test(r==KErrNone); sl@0: User::After(100000); sl@0: test.End(); sl@0: test.Close(); sl@0: return r; sl@0: }