|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __TrkTcbSrvSession_h__ |
|
19 #define __TrkTcbSrvSession_h__ |
|
20 |
|
21 // System includes |
|
22 #include <e32base.h> |
|
23 |
|
24 // User includes |
|
25 // Constants |
|
26 |
|
27 // Classes referenced |
|
28 class CTrkTcbSrvSessionEngine; |
|
29 // Enumerations |
|
30 |
|
31 |
|
32 // |
|
33 // CTrkTcbSrvSession (header) |
|
34 // |
|
35 /** |
|
36 * This class acts as a simple wrapper around the IPC client-server framework, |
|
37 * and drives a real underlying engine, which is actually responsible for |
|
38 * fulfulling all the client requests. |
|
39 */ |
|
40 |
|
41 class CTrkTcbSrvSession : public CSession2 |
|
42 { |
|
43 public: |
|
44 static CTrkTcbSrvSession* NewL(); |
|
45 ~CTrkTcbSrvSession(); |
|
46 |
|
47 private: |
|
48 CTrkTcbSrvSession(); |
|
49 void ConstructL(); |
|
50 |
|
51 public: |
|
52 void HandleServerDestruction(); |
|
53 |
|
54 private: |
|
55 |
|
56 |
|
57 |
|
58 private: |
|
59 //FROM CSession2 |
|
60 void ServiceL(const RMessage2& aMessage); |
|
61 |
|
62 private: |
|
63 TBool DoServiceL(); |
|
64 |
|
65 inline const RMessage2& Message() const { return *iMessage; } |
|
66 |
|
67 private: |
|
68 // CMD - TRKTCBSERVER SPECIFIC FUNCTIONALITY |
|
69 TBool CmdOpenFileL(); |
|
70 TBool CmdReadFileL(); |
|
71 TBool CmdWriteFileL(); |
|
72 TBool CmdCloseFileL(); |
|
73 TBool CmdPositionFileL(); |
|
74 TBool CmdShutDownServer(); |
|
75 |
|
76 |
|
77 private: |
|
78 /* |
|
79 * Used to transfer collections of objects between server and client. |
|
80 */ |
|
81 CBufBase* iTransferBuffer; |
|
82 |
|
83 CTrkTcbSrvSessionEngine* iSessionEngine; |
|
84 |
|
85 const RMessage2* iMessage; |
|
86 }; |
|
87 |
|
88 #endif |