First public contribution.
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
18 #include "T_KeypadDriverServer.h"
19 #include "T_KeypadDriverData.h"
22 _LIT(KT_KeypadDriver, "Keypad");
25 CT_KeypadDriverServer* CT_KeypadDriverServer::NewL()
27 * @return - Instance of the test server
28 * Same code for Secure and non-secure variants
29 * Called inside the MainL() function to create and start the
30 * CTestServer derived server.
33 CT_KeypadDriverServer* server = new (ELeave) CT_KeypadDriverServer();
34 CleanupStack::PushL(server);
36 CleanupStack::Pop(server);
44 * Much simpler, uses the new Rendezvous() call to sync with the client
47 #if (defined __DATA_CAGING__)
48 RProcess().DataCaging(RProcess::EDataCagingOn);
49 RProcess().SecureApi(RProcess::ESecureApiOn);
51 CActiveScheduler* sched=NULL;
52 sched=new(ELeave) CActiveScheduler;
53 CActiveScheduler::Install(sched);
54 CT_KeypadDriverServer* server = NULL;
56 // Create the CTestServer derived server
57 TRAPD(err,server = CT_KeypadDriverServer::NewL());
60 // Sync with the client and enter the active scheduler
61 RProcess::Rendezvous(KErrNone);
70 GLDEF_C TInt E32Main()
72 * @return - Standard Epoc error code on process exit
74 * Process entry point. Called by client using RProcess API
78 CTrapCleanup* cleanup = CTrapCleanup::New();
84 #if (defined TRAP_IGNORE)
95 CDataWrapper* CT_KeypadDriverServer::CT_KeypadDriverBlock::CreateDataL(const TDesC& aData)
97 CDataWrapper* wrapper=NULL;
99 if( KT_KeypadDriver() == aData )
101 wrapper=CT_KeypadDriverData::NewL();