|
1 // Copyright (c) 2003-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 #if !defined(__C32EXE_H__) |
|
17 #define __C32EXE_H__ |
|
18 |
|
19 /** |
|
20 @file |
|
21 |
|
22 @internalComponent |
|
23 @released |
|
24 */ |
|
25 |
|
26 #include <rsstd.h> |
|
27 #ifdef SYMBIAN_ZERO_COPY_NETWORKING |
|
28 #include <comms-infras/commsbufpondop.h> |
|
29 #else |
|
30 #include <es_mbman.h> |
|
31 #endif // SYMBIAN_ZERO_COPY_NETWORKING |
|
32 #include <mb_thread.h> |
|
33 #include "c32policy.h" |
|
34 |
|
35 namespace RootServer |
|
36 { |
|
37 |
|
38 class CC32ProviderModule : public CCommsProviderModule |
|
39 /** C32 process specific rootserver extensions. |
|
40 @internalComponent |
|
41 @released |
|
42 */ |
|
43 { |
|
44 public: |
|
45 |
|
46 static CCommsProviderModule* NewL(CRootServer* aRootServer, const TRSStartModuleParams& aParams, HBufC8* aIniData); |
|
47 |
|
48 private: |
|
49 CC32ProviderModule() : |
|
50 CCommsProviderModule(iRCFThread) |
|
51 { |
|
52 } |
|
53 virtual TInt CreateModuleThread(const TDesC& aName, TThreadFunction aOtherThreadFunction, |
|
54 TInt aStackSize, RHeap* aHeap, TAny* aModuleArgs); |
|
55 private: |
|
56 /** Thread handle of running module context. |
|
57 */ |
|
58 CommsFW::RCFThread iRCFThread; |
|
59 }; |
|
60 |
|
61 class CC32RootServer : public CRootServer |
|
62 /** C32 process specific rootserver extensions. |
|
63 @internalComponent |
|
64 @released |
|
65 */ |
|
66 { |
|
67 public: |
|
68 ~CC32RootServer(); |
|
69 |
|
70 static CRootServer* NewL(const TRootServerStartupInfo& aRootServerStartupInfo); |
|
71 |
|
72 virtual void LazyLoadL(); |
|
73 virtual TInt AdjustMBufPool(const TRSSetMBufMnr &aMBufParams); |
|
74 virtual TInt AdjustMBufSizeAllocInfo(const TRSAddMBufAllocInfo &aMBufParamsPckg); |
|
75 virtual TBool IsCallerConfigurator(const CRootServerSession* aSession, const RMessage2& aMessage); |
|
76 virtual void DisconnectSession(const CRootServerSession* aSession); |
|
77 |
|
78 virtual CSession2* NewSessionL(const TVersion &aVersion, const RMessage2& aMessage) const; |
|
79 #ifdef _DEBUG |
|
80 virtual TInt RunError( TInt aError ); |
|
81 #endif //_DEBUG |
|
82 |
|
83 private: |
|
84 CC32RootServer(TInt aPriority): |
|
85 CRootServer(aPriority,CC32RootServerPolicy) |
|
86 { |
|
87 } |
|
88 |
|
89 private: |
|
90 RArray<TRSAddMBufAllocInfoContainer> iMBufSizeAllocInfo; |
|
91 #ifdef SYMBIAN_ZERO_COPY_NETWORKING |
|
92 RCommsBufPondOp iCommsBufPond; |
|
93 #else |
|
94 TUint iInitMBufPoolSize; |
|
95 TUint iMaxMBufPoolSize; |
|
96 |
|
97 CMBufManager* iMBufManager; |
|
98 MMBufSizeAllocator *iMBufSizeAllocator; |
|
99 #endif // SYMBIAN_ZERO_COPY_NETWORKING |
|
100 const CRootServerSession* iTheConfiguratorSession; |
|
101 }; |
|
102 |
|
103 class CC32RootServerSession : public CRootServerSession |
|
104 /** C32 process specific RootServer Session extensions. |
|
105 @internalComponent |
|
106 @released |
|
107 */ |
|
108 { |
|
109 public: |
|
110 CC32RootServerSession(const CRootServer* aRootServer); |
|
111 virtual void ServiceL(const RMessage2& aMessage); |
|
112 ~CC32RootServerSession(); |
|
113 |
|
114 private: |
|
115 TInt SetMBufPoolSize(const RMessage2& aMessage); |
|
116 virtual TInt IsCallerConfigurator(const RMessage2& aMessage); |
|
117 TInt AddMBufAllocInfo(const RMessage2& aMessage); |
|
118 |
|
119 }; |
|
120 } |
|
121 #endif // __C32ROOT_H__ |