|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalTechnology |
|
19 */ |
|
20 |
|
21 #ifndef CMTPFSENTRYCACHE_H |
|
22 #define CMTPFSENTRYCACHE_H |
|
23 |
|
24 #include <f32file.h> |
|
25 #include "mtpdebug.h" |
|
26 |
|
27 /** |
|
28 This class is used to cache the fs entry information of the big file (>1G) which is being |
|
29 copied/moved in fs. The cache information is used to send response to getobjectproplist |
|
30 and getobjectinfo |
|
31 |
|
32 @internalTechnology |
|
33 */ |
|
34 class CMTPFSEntryCache : public CBase |
|
35 { |
|
36 public: |
|
37 IMPORT_C static CMTPFSEntryCache* NewL(); |
|
38 IMPORT_C ~CMTPFSEntryCache(); |
|
39 |
|
40 IMPORT_C TBool IsOnGoing() const; |
|
41 IMPORT_C void SetOnGoing(TBool aOnGoing); |
|
42 IMPORT_C TUint32 TargetHandle() const; |
|
43 IMPORT_C void SetTargetHandle(TUint32 aHandle); |
|
44 IMPORT_C TEntry& FileEntry(); |
|
45 IMPORT_C void SetFileEntry(const TEntry& aEntry); |
|
46 |
|
47 private: |
|
48 CMTPFSEntryCache(); |
|
49 void ConstructL(); |
|
50 |
|
51 private: |
|
52 /** |
|
53 Indicate if a big file copy/move is ongoing |
|
54 */ |
|
55 TBool iIsOngoing; |
|
56 |
|
57 /** |
|
58 The handle of target big file that is being copied/moved |
|
59 */ |
|
60 TUint32 iTargetHandle; |
|
61 |
|
62 /** |
|
63 The fake file entry of target big file that is being copied/moved |
|
64 Since the target big file is not created in file system, this fake entry is |
|
65 used to return to getobjectproplist and getobjectinfo operations |
|
66 */ |
|
67 TEntry iFileEntry; |
|
68 /** |
|
69 FLOGGER debug trace member variable. |
|
70 */ |
|
71 __FLOG_DECLARATION_MEMBER_MUTABLE; |
|
72 }; |
|
73 |
|
74 #endif // CMTPFSENTRYCACHE_H |