securitydialogs/lockapp/src/lockappserver.cpp
branchRCL_3
changeset 22 03674e5abf46
parent 0 164170e6151a
equal deleted inserted replaced
21:09b1ac925e3f 22:03674e5abf46
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Server implementation that responds to client API in lockclient
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #include "lockappserver.h"
       
    20 #include "lockappsession.h"
       
    21 #include <lockappclientserver.h>
       
    22 #include <coemain.h>
       
    23 
       
    24 // ---------------------------------------------------------------------------
       
    25 // Two-phased constructor.
       
    26 // ---------------------------------------------------------------------------
       
    27 CLockAppServer* CLockAppServer::NewL( const TDesC& aFixedServerName )
       
    28 	{
       
    29 
       
    30 	CLockAppServer* self = new (ELeave) CLockAppServer();
       
    31 	CleanupStack::PushL( self );
       
    32 	self->SetPriority( EActivePriorityIpcEventsHigh );
       
    33 	self->ConstructL( aFixedServerName );
       
    34 	CleanupStack::Pop( self );
       
    35 	return self;
       
    36 	}
       
    37 
       
    38 // ---------------------------------------------------------------------------
       
    39 // Constructor.
       
    40 // ---------------------------------------------------------------------------
       
    41 CLockAppServer::CLockAppServer( )
       
    42 	{
       
    43 
       
    44 	// no implementation required
       
    45 	}
       
    46 
       
    47 // ---------------------------------------------------------------------------
       
    48 // From @c CApaAppServer. Creates LockApp Session, only one type of
       
    49 // service is supported by the server.
       
    50 // ---------------------------------------------------------------------------
       
    51 CApaAppServiceBase* CLockAppServer::CreateServiceL( TUid aServiceType ) const
       
    52 	{
       
    53 
       
    54 	// only one service is offered through server
       
    55 	if ( aServiceType == KLockAppServiceUid )
       
    56 		{
       
    57 		return new (ELeave) CLockAppSession();
       
    58 		}
       
    59 	else
       
    60 		{
       
    61 		return CApaAppServer::CreateServiceL( aServiceType );
       
    62 		}
       
    63 	}
       
    64 
       
    65 // ---------------------------------------------------------------------------
       
    66 // From @c CApaAppServer. Creates a new client session, version
       
    67 // numbering not supported.
       
    68 // ---------------------------------------------------------------------------
       
    69 CSession2* CLockAppServer::NewSessionL( const TVersion&, const RMessage2& ) const
       
    70 	{
       
    71 
       
    72 	return new (ELeave) CLockAppSession();
       
    73 	}