|
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 __TrkSrvSession_h__ |
|
19 #define __TrkSrvSession_h__ |
|
20 |
|
21 // System includes |
|
22 #include <e32base.h> |
|
23 |
|
24 // User includes |
|
25 |
|
26 #include "trkdebugmanager.h" |
|
27 #include "trkdebugmgrcallbacks.h" |
|
28 |
|
29 // Constants |
|
30 |
|
31 // Classes referenced |
|
32 class CTrkSrvSessionEngine; |
|
33 // Enumerations |
|
34 |
|
35 |
|
36 // |
|
37 // CTrkSrvSession (header) |
|
38 // |
|
39 /** |
|
40 * This class acts as a simple wrapper around the IPC client-server framework, |
|
41 * and drives a real underlying engine, which is actually responsible for |
|
42 * fulfulling all the client requests. |
|
43 */ |
|
44 |
|
45 class CTrkSrvSession : public CSession2, public MTrkDebugMgrCallbacks |
|
46 { |
|
47 public: |
|
48 static CTrkSrvSession* NewL(CTrkDebugManager* aTrkDebugMgr); |
|
49 ~CTrkSrvSession(); |
|
50 |
|
51 public: |
|
52 void HandleServerDestruction(); |
|
53 |
|
54 public: |
|
55 //FROM CSession2 |
|
56 void DebugConnStatusChanged(TTrkConnStatus& aConnStatus); |
|
57 void DebuggingStatusChanged(TBool& aDebugging); |
|
58 |
|
59 private: |
|
60 //FROM CSession2 |
|
61 void ServiceL(const RMessage2& aMessage); |
|
62 |
|
63 |
|
64 private: |
|
65 CTrkSrvSession(CTrkDebugManager* aTrkDebugMgr); |
|
66 void ConstructL(); |
|
67 |
|
68 private: |
|
69 // CMD - TRKSERVER SPECIFIC FUNCTIONALITY |
|
70 void CmdGetVersionL(const RMessage2& aMessage); |
|
71 void CmdConnectL(const RMessage2& aMessage); |
|
72 void CmdDisConnectL(const RMessage2& aMessage); |
|
73 void CmdGetCurrentConnDataL(const RMessage2& aMessage); |
|
74 void CmdSetCurrentConnDataL(const RMessage2& aMessage); |
|
75 void CmdGetDebugConnStatusL(const RMessage2& aMessage); |
|
76 void ConnStatusNotifyL(const RMessage2& aMessage); |
|
77 void CmdGetDebugStatusL(const RMessage2& aMessage); |
|
78 void DebugStatusNotifyL(const RMessage2& aMessage); |
|
79 void CmdShutDownServer(const RMessage2& aMessage); |
|
80 void ConnStatusNotifyCancel(const RMessage2& aMessage); |
|
81 void DebugStatusNotifyCancel(const RMessage2& aMessage); |
|
82 void GetPlugAndPlayTypeL(const RMessage2& aMessage); |
|
83 void SetPlugAndPlayTypeL(const RMessage2& aMessage); |
|
84 |
|
85 private: |
|
86 /* |
|
87 * Used to transfer collections of objects between server and client. |
|
88 */ |
|
89 CBufBase* iTransferBuffer; |
|
90 |
|
91 CTrkDebugManager* iTrkDebugMgr; |
|
92 |
|
93 RMessagePtr2 iBlockedDebugState; |
|
94 RMessagePtr2 iBlockedConnState; |
|
95 TBool iPendingDebugState; |
|
96 TBool iPendingConnState; |
|
97 }; |
|
98 |
|
99 #endif |