|
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 __CTCFILEHANDLERSESSION_H__ |
|
19 #define __CTCFILEHANDLERSESSION_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 class CTcFileHandlerServer; |
|
26 |
|
27 // CLASS DEFINITION |
|
28 /** |
|
29 * CTcFileHandlerSession implements the client-server session of the FileHandler. |
|
30 * One object instance of this class is created for each connected client. |
|
31 */ |
|
32 class CTcFileHandlerSession |
|
33 #ifdef __IPC_V2_PRESENT__ |
|
34 : public CSession2 |
|
35 #else |
|
36 : public CSession |
|
37 #endif |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Static constructor. |
|
43 * |
|
44 * @param aServer Pointer to the server object owning us. |
|
45 * @return An initialised instance of this class. |
|
46 */ |
|
47 static CTcFileHandlerSession* NewL( CTcFileHandlerServer* aServer ); |
|
48 |
|
49 /// Destructor |
|
50 ~CTcFileHandlerSession(); |
|
51 |
|
52 private: // Constructors |
|
53 |
|
54 /** |
|
55 * Constructor. |
|
56 * |
|
57 */ |
|
58 CTcFileHandlerSession(); |
|
59 |
|
60 |
|
61 /** |
|
62 * 2nd phase constructor |
|
63 * |
|
64 * @param aServer Pointer to the server object owning us. |
|
65 */ |
|
66 void ConstructL( CTcFileHandlerServer* aServer ); |
|
67 |
|
68 void DoCreateFileL( const RMessage2& aMessage ) const; |
|
69 void DoCopyFileL( const RMessage2& aMessage ) const; |
|
70 void DoDeleteFileL( const RMessage2& aMessage ) const; |
|
71 |
|
72 void ReadFileNameL( TInt aItcArgIndex, |
|
73 const RMessage2& aMessage, |
|
74 TFileName& aFileName ) const; |
|
75 |
|
76 HBufC8* ReadLC( TInt aItcArgIndex, |
|
77 const RMessage2& aMessage ) const; |
|
78 |
|
79 public: // from CSession |
|
80 |
|
81 void ServiceL( const RMessage2& aMessage ); |
|
82 |
|
83 private: // Data |
|
84 |
|
85 /// Pointer to our owner. Not owned. |
|
86 CTcFileHandlerServer* iFileHandlerServer; |
|
87 |
|
88 /// Client application name and path. Owned. |
|
89 TFileName iAppName; |
|
90 |
|
91 }; |
|
92 |
|
93 #endif // __CTCFILEHANDLERSESSION_H__ |