hwpluginsimulation/mocksy/src/cmocksyserver.cpp
changeset 0 3553901f7fa8
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2007-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 "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include "cmocksyserver.h"
       
    17 #include "cmocksysession.h"
       
    18 
       
    19 /**
       
    20 Factory function.
       
    21 */
       
    22 EXPORT_C CServer2* CMockSYServer::NewL(const TDesC& aName, TInt aPriority, CMockSYEngine& aEngine)
       
    23 	{
       
    24 	CMockSYServer* self=new(ELeave) CMockSYServer(aPriority,aEngine);
       
    25 	CleanupStack::PushL(self);
       
    26 	self->ConstructL(aName);
       
    27 	CleanupStack::Pop(self);
       
    28 	return self;
       
    29 	}
       
    30 
       
    31 /**
       
    32 Constructor
       
    33 */
       
    34 CMockSYServer::CMockSYServer(TInt aPriority, CMockSYEngine& aEngine)
       
    35 	: CServer2(aPriority,EUnsharableSessions), iEngine(aEngine)
       
    36 	{
       
    37 	
       
    38 	}
       
    39 	
       
    40 /**
       
    41 2nd phase construction 
       
    42 */
       
    43 void CMockSYServer::ConstructL(const TDesC& aName)
       
    44 	{
       
    45 	StartL(aName);
       
    46 	}
       
    47 
       
    48 /**
       
    49 Cretae a new client session. This should really check the version number.
       
    50 */
       
    51 CSession2* CMockSYServer::NewSessionL(const TVersion& /*aVersion*/,const RMessage2& /*aMessage*/) const
       
    52 	{
       
    53 	return CMockSYSession::NewL(iEngine);
       
    54 	}