|
1 // Copyright (c) 1997-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 <ss_pman.h> |
|
17 #include <es_ver.h> |
|
18 #include <commschan.h> |
|
19 #include <comms-infras/ss_log.h> |
|
20 #include <comms-infras/ss_thread.h> |
|
21 #include <comms-infras/ss_roles.h> |
|
22 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
23 #include <es_sock_internal.h> |
|
24 #endif |
|
25 #include <comms-infras/sockmes.h> |
|
26 #include "ss_secpol.h" |
|
27 |
|
28 using namespace CommsFW; |
|
29 |
|
30 //_LIT(KSocketServerName, "!Socket-Server"); |
|
31 |
|
32 /*static*/ CSocketServer* CSocketServer::NewL(CWorkerThread* aOwnerThread) |
|
33 // |
|
34 // Create a new CSocketServer. |
|
35 // |
|
36 { |
|
37 CSocketServer* self = new (ELeave) CSocketServer(aOwnerThread, EActiveIpcPriority); |
|
38 return self; |
|
39 } |
|
40 |
|
41 CSocketServer::CSocketServer(CWorkerThread* aOwnerThread, TInt aPriority) |
|
42 /** |
|
43 Constructor. |
|
44 */ |
|
45 : CCommonServer(aPriority, aOwnerThread, ESock::SocketServerPolicy, ESharableSessions, SOCKET_SERVER_NAME) |
|
46 { |
|
47 } |
|
48 |
|
49 CSocketServer::~CSocketServer() |
|
50 // |
|
51 // Destructor. |
|
52 // |
|
53 { |
|
54 } |
|
55 |
|
56 CSession2* CSocketServer::DoNewSessionL(const TProcessId& aProcessId, const TUidType& aProcessUid) const |
|
57 /* |
|
58 Create a new client on this server. |
|
59 */ |
|
60 { |
|
61 #ifdef _DEBUG |
|
62 if(!iPostBootChecksRun) |
|
63 { |
|
64 iPostBootChecksRun = ETrue; |
|
65 if(WorkerThread().Player()) |
|
66 { |
|
67 static_cast<CPlayer*>(WorkerThread().Player())->RunPostBootChecks(); |
|
68 } |
|
69 } |
|
70 #endif |
|
71 return CSockSession::NewL(aProcessId, aProcessUid, WorkerThread().PitBoss().NextSessionUniqueId()); |
|
72 } |
|
73 |
|
74 TVersion CSocketServer::CurrentVersion() const |
|
75 /* |
|
76 Create a new client on this server. |
|
77 */ |
|
78 { |
|
79 return TVersion(KES32MajorVersionNumber,KES32MinorVersionNumber,KES32BuildVersionNumber); |
|
80 } |
|
81 |
|
82 CSocketScheduler* CSocketScheduler::New() |
|
83 /** |
|
84 Create and install the active scheduler. |
|
85 */ |
|
86 { |
|
87 |
|
88 CSocketScheduler *pA=new CSocketScheduler; |
|
89 __ASSERT_ALWAYS(pA!=NULL,Fault(EMainSchedulerError)); |
|
90 CSocketScheduler::Install(pA); |
|
91 return pA; |
|
92 } |
|
93 |