|
1 // Copyright (c) 2005-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 /** |
|
17 @file |
|
18 @internalComponent - Internal Symbian test code |
|
19 */ |
|
20 |
|
21 #ifndef __MESSAGESERVSERVER_H |
|
22 #define __MESSAGESERVSERVER_H |
|
23 |
|
24 #include <e32base.h> |
|
25 #include "messageprovider.h" |
|
26 |
|
27 |
|
28 class CMessageServServer : public CServer2 |
|
29 { |
|
30 public: |
|
31 enum {EPriority=950}; // mpt - need to explain the magic here! |
|
32 |
|
33 public: |
|
34 static void New(MMessageProvider *aMessageProvider); |
|
35 ~CMessageServServer() {} |
|
36 virtual CSession2 *NewSessionL(const TVersion& aVersion,const RMessage2& aMessage) const; |
|
37 IMPORT_C static TInt ThreadFunction(TAny* aStarted); |
|
38 MMessageProvider* iMessageProvider; |
|
39 |
|
40 protected: |
|
41 CMessageServServer(TInt aPriority); |
|
42 |
|
43 private: |
|
44 TInt iActive; |
|
45 }; |
|
46 |
|
47 |
|
48 |
|
49 _LIT(KMessageServerName,"MessageServer"); |
|
50 // reasons for server panic |
|
51 enum TMessageServPanic |
|
52 { |
|
53 EBadRequest, |
|
54 EBadDescriptor, |
|
55 EMainSchedulerError, |
|
56 ESvrCreateServer, |
|
57 ESvrStartServer, |
|
58 ECreateTrapCleanup, |
|
59 ENotImplementedYet, |
|
60 }; |
|
61 |
|
62 // opcodes used in message passing between client and server |
|
63 enum TMessageServRqst |
|
64 { |
|
65 EMessageServSetFromString, |
|
66 EMessageServSetErrorFromString, |
|
67 EMessageServStop |
|
68 }; |
|
69 |
|
70 |
|
71 const TUint KMessageServMajorVersionNumber=0; |
|
72 const TUint KMessageServMinorVersionNumber=1; |
|
73 const TUint KMessageServBuildVersionNumber=1; |
|
74 |
|
75 |
|
76 GLDEF_C void PanicServer(TMessageServPanic aPanic); |
|
77 |
|
78 const TUint KDefaultHeapSize=0x10000; |
|
79 |
|
80 #endif |
|
81 |
|
82 |
|
83 |