|
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 the License "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 * Declaration of class CFavouritesSrvFile. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef FAVOURITES_SRV_FILE_H |
|
22 #define FAVOURITES_SRV_FILE_H |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 #include <e32base.h> |
|
27 #include <f32file.h> |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Server side file object for Favourites Engine. |
|
33 */ |
|
34 NONSHARABLE_CLASS(CFavouritesSrvFile): public CBase |
|
35 { |
|
36 public: // construct / destruct |
|
37 |
|
38 /** |
|
39 * Two phased constructor. |
|
40 */ |
|
41 static CFavouritesSrvFile* NewL(); |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 inline virtual ~CFavouritesSrvFile(); |
|
47 |
|
48 public: // new methods |
|
49 |
|
50 void SetName(TParse aParse); |
|
51 |
|
52 /** |
|
53 * Open existing file with shared read-access. |
|
54 * @param aName File name. |
|
55 */ |
|
56 void OpenL(); |
|
57 |
|
58 /** |
|
59 * Create new file / replace existing with exclusive write-access. |
|
60 * Existing content of the file, if any, is lost. |
|
61 * @param aName File name. |
|
62 */ |
|
63 void ReplaceL(); |
|
64 |
|
65 /** |
|
66 * Transfer handles to client. |
|
67 * @param aMessage Message. |
|
68 */ |
|
69 void TransferToClientL( const RMessage2& aMessage ); |
|
70 |
|
71 private: // construct |
|
72 |
|
73 /** |
|
74 * Constructor. |
|
75 */ |
|
76 inline CFavouritesSrvFile(); |
|
77 |
|
78 /** |
|
79 * Second phase constructor. |
|
80 */ |
|
81 void ConstructL(); |
|
82 |
|
83 private: // Data |
|
84 |
|
85 TParse iFileName; // The name of the file |
|
86 |
|
87 RFs iFs; ///< File Server session handle. |
|
88 RFile iFile; ///< File handle. |
|
89 }; |
|
90 |
|
91 #include "FavouritesSrvFile.inl" |
|
92 |
|
93 #endif |
|
94 |
|
95 // End of File |