equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2002 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 |
|
19 #ifndef RMMATEMPFILE_H |
|
20 #define RMMATEMPFILE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <f32file.h> |
|
24 #include <e32std.h> |
|
25 |
|
26 // CLASS DECLARATION |
|
27 /** |
|
28 * This is used to create and delete temporary files. |
|
29 */ |
|
30 NONSHARABLE_CLASS(RMMATempFile): public RSessionBase |
|
31 { |
|
32 public: |
|
33 /** |
|
34 * Default constructor. |
|
35 */ |
|
36 RMMATempFile(); |
|
37 |
|
38 /** |
|
39 * Connects to systemams server. This method must be called before |
|
40 * other methods may be used. |
|
41 */ |
|
42 void ConnectL(); |
|
43 |
|
44 /** |
|
45 * Creates temp file to server. After this call reference to file can |
|
46 * be obtained with File() method. |
|
47 */ |
|
48 void CreateL(); |
|
49 |
|
50 /** |
|
51 * Return reference to created file. |
|
52 * @return Reference to created file object. |
|
53 */ |
|
54 RFile& File(); |
|
55 |
|
56 /** |
|
57 * Sets midlet suite. Used to create temp file folder in systemams |
|
58 * server. |
|
59 * @param aMIDletSuiteID midlet suite id |
|
60 */ |
|
61 void SetMIDletSuiteID(TInt aMIDletSuiteID); |
|
62 |
|
63 /** |
|
64 * Closes server session and deletes temp file. |
|
65 */ |
|
66 void Close(); |
|
67 |
|
68 private: |
|
69 // temp file's path |
|
70 TFileName iFileName; |
|
71 |
|
72 // file created in CreateL method. |
|
73 RFile iFile; |
|
74 |
|
75 // Handle to file. |
|
76 TInt iFileHandle; |
|
77 |
|
78 // midlet suite id |
|
79 TInt iMidletSuiteID; |
|
80 }; |
|
81 |
|
82 #endif // RMMATEMPFILE_H |
|