datacommsserver/esockserver/ssock/ss_connectionserver.cpp
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2006-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 <es_sock.h>
       
    17 #include <es_panic.h>
       
    18 #include "ss_connectionserver.h"
       
    19 #include <comms-infras/es_connectionservermessages.h>
       
    20 #include "ss_connectionsession.h"
       
    21 #include <ss_pman.h>
       
    22 #include <es_ver.h>
       
    23 #include <commschan.h>
       
    24 #include <comms-infras/ss_thread.h>
       
    25 #include <comms-infras/ss_roles.h>
       
    26 #include "ss_secpol.h"
       
    27 
       
    28 using namespace ESock;
       
    29 using namespace CommsFW;
       
    30 
       
    31 
       
    32 
       
    33 /*static*/ CConnectionServer* CConnectionServer::NewL(CWorkerThread* aOwnerThread)
       
    34 //
       
    35 // Create a new CConnectionServer.
       
    36 //
       
    37 	{
       
    38 	CConnectionServer* server = new (ELeave) CConnectionServer(aOwnerThread, EActiveIpcPriority);
       
    39 	CleanupStack::PushL(server);
       
    40 	server->ConstructL();
       
    41 	CleanupStack::Pop(server);
       
    42 	return server;
       
    43 	}
       
    44 
       
    45 
       
    46 
       
    47 void CConnectionServer::ConstructL()
       
    48 	{
       
    49 	}
       
    50 
       
    51 CConnectionServer::CConnectionServer(CWorkerThread* aOwnerThread, TInt aPriority)
       
    52 /**
       
    53  Constructor.
       
    54 */
       
    55 	: CCommonServer(aPriority, aOwnerThread, ConnectionServerPolicy, ESharableSessions, KConnectionServerName)
       
    56 	{
       
    57 	__DECLARE_NAME(_S("CConnectionServer"));
       
    58 	}
       
    59 
       
    60 CConnectionServer::~CConnectionServer()
       
    61 //
       
    62 // Destructor.
       
    63 //
       
    64 	{
       
    65 	}
       
    66 
       
    67 TVersion CConnectionServer::CurrentVersion() const
       
    68 	{
       
    69 	return TVersion(KES32MajorVersionNumber,KES32MinorVersionNumber,KES32BuildVersionNumber);
       
    70 	}
       
    71 
       
    72 CSession2* CConnectionServer::DoNewSessionL(const TProcessId& aProcessId, const TUidType& aProcessUid) const
       
    73 /*
       
    74  Create a new client on this server.
       
    75 */
       
    76 	{
       
    77 		return CConnectionSession::NewL(aProcessId, aProcessUid, WorkerThread().PitBoss().NextSessionUniqueId());
       
    78 	}
       
    79 
       
    80 
       
    81 
       
    82