|
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 __MESSAGESERVSESSION_H |
|
22 #define __MESSAGESERVSESSION_H |
|
23 |
|
24 #include <e32base.h> |
|
25 #include "messageservserver.h" |
|
26 |
|
27 |
|
28 /** CMessageServSession |
|
29 This class represents a session in the server. |
|
30 CSession::Client() returns the client thread. |
|
31 Functions are provided to respond appropriately to client messages. */ |
|
32 |
|
33 class CMessageServSession : public CSession2 |
|
34 { |
|
35 public: |
|
36 // construct/destruct |
|
37 CMessageServSession(CMessageServServer * aServer); |
|
38 static CMessageServSession* NewL(CMessageServServer * aServer); |
|
39 //service request |
|
40 virtual void ServiceL(const RMessage2 &aMessage); |
|
41 void DispatchMessageL(const RMessage2 &aMessage); |
|
42 |
|
43 //services available to initialize/increase/decrease/reset and return the counter value. |
|
44 void SetFromStringL(const RMessage2 &aMessage); |
|
45 // The function read Error message, filename, line number and error code from |
|
46 // the message |
|
47 void SetErrorFromStringL(const RMessage2 &aMessage); |
|
48 protected: |
|
49 // panic the client |
|
50 void PanicClient(TInt aPanic) const; |
|
51 // safewrite between client and server |
|
52 //void Write(const TAny* aPtr,const TDesC8& aDes,TInt anOffset=0); |
|
53 private: |
|
54 CMessageServServer *iMsgSvr; |
|
55 }; |
|
56 |
|
57 |
|
58 #endif |
|
59 |
|
60 |
|
61 |