Update contrib.
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_e32server.h"
19 #include "T_RDevUsbcClientData.h"
22 _LIT(KT_Connectivity, "RDevUsbcClient");
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.
32 CT_e32Server* CT_e32Server::NewL()
34 CT_e32Server* server = new (ELeave) CT_e32Server();
35 CleanupStack::PushL(server);
37 CleanupStack::Pop(server);
44 * Much simpler, uses the new Rendezvous() call to sync with the client
48 #if (defined __DATA_CAGING__)
49 RProcess().DataCaging(RProcess::EDataCagingOn);
50 RProcess().SecureApi(RProcess::ESecureApiOn);
52 CActiveScheduler* sched=NULL;
53 sched=new(ELeave) CActiveScheduler;
54 CActiveScheduler::Install(sched);
55 CT_e32Server* server = NULL;
57 // Create the CTestServer derived server
58 TRAPD(err,server = CT_e32Server::NewL());
61 // Sync with the client and enter the active scheduler
62 RProcess::Rendezvous(KErrNone);
72 * @return - Standard Epoc error code on process exit
74 * Process entry point. Called by client using RProcess API
76 GLDEF_C TInt E32Main()
79 CTrapCleanup* cleanup = CTrapCleanup::New();
85 #if (defined TRAP_IGNORE)
96 CDataWrapper* CT_e32Server::CT_e32Block::CreateDataL(const TDesC& aData)
98 CDataWrapper* wrapper=NULL;
100 if( KT_Connectivity() == aData )
102 wrapper=CT_RDevUsbcClientData::NewL();