|
1 /* |
|
2 * Copyright (c) 2004 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: See class definition below. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __CTCWATCHERSESSION_H__ |
|
19 #define __CTCWATCHERSESSION_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 class CTcCoroner; |
|
26 class CTcGrimreaper; |
|
27 class CTcWatcherServer; |
|
28 |
|
29 // CLASS DEFINITION |
|
30 /** |
|
31 * CTcWatcherSession implements the client-server session of the Watcher. |
|
32 * One object instance of this class is created for each connected client. |
|
33 */ |
|
34 class CTcWatcherSession |
|
35 #ifdef __IPC_V2_PRESENT__ |
|
36 : public CSession2 |
|
37 #else |
|
38 : public CSession |
|
39 #endif |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * Static constructor. |
|
45 * |
|
46 * @param aClient Reference to the client thread that |
|
47 * has opened this session. |
|
48 * @param aServer Pointer to the server object owning us. |
|
49 * @return An initialised instance of this class. |
|
50 */ |
|
51 static CTcWatcherSession* NewL( |
|
52 #ifndef __IPC_V2_PRESENT__ |
|
53 RThread& aClient, |
|
54 #endif |
|
55 CTcWatcherServer* aServer ); |
|
56 |
|
57 /// Destructor |
|
58 ~CTcWatcherSession(); |
|
59 |
|
60 private: // Constructors |
|
61 |
|
62 /** |
|
63 * Constructor. |
|
64 * |
|
65 * @param aClient Reference to the client thread that |
|
66 * has opened this session. |
|
67 */ |
|
68 #ifdef __IPC_V2_PRESENT__ |
|
69 CTcWatcherSession(); |
|
70 #else |
|
71 CTcWatcherSession( RThread& aClient ); |
|
72 |
|
73 /// Default constructor. Not implemented. |
|
74 CTcWatcherSession(); |
|
75 #endif |
|
76 |
|
77 /** |
|
78 * 2nd phase constructor |
|
79 * |
|
80 * @param aServer Pointer to the server object owning us. |
|
81 */ |
|
82 void ConstructL( CTcWatcherServer* aServer ); |
|
83 |
|
84 public: // from CSession |
|
85 |
|
86 #ifdef __IPC_V2_PRESENT__ |
|
87 void ServiceL( const RMessage2& aMessage ); |
|
88 #else |
|
89 void ServiceL( const RMessage& aMessage ); |
|
90 #endif |
|
91 |
|
92 private: // Data |
|
93 |
|
94 /// Pointer to our owner. Not owned. |
|
95 CTcWatcherServer* iWatcherServer; |
|
96 |
|
97 /// Client coroner. Owned. |
|
98 CTcCoroner* iCoroner; |
|
99 |
|
100 /// Client grimreaper. Owned. |
|
101 CTcGrimreaper* iGrimreaper; |
|
102 |
|
103 /// Client application name and path. Owned. |
|
104 TFileName iAppName; |
|
105 |
|
106 }; |
|
107 |
|
108 #endif // __CTCWATCHERSESSION_H__ |