|
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 #include <mtp/mtpprotocolconstants.h> |
|
17 |
|
18 #include "cmtpfsentrycache.h" |
|
19 |
|
20 |
|
21 __FLOG_STMT(_LIT8(KComponent,"MTPFSEntryCache");) |
|
22 |
|
23 // ----------------------------------------------------------------------------- |
|
24 // CMTPFSEntryCache::NewL |
|
25 // Two-phase construction method |
|
26 // ----------------------------------------------------------------------------- |
|
27 // |
|
28 EXPORT_C CMTPFSEntryCache* CMTPFSEntryCache::NewL() |
|
29 { |
|
30 CMTPFSEntryCache* self = new (ELeave) CMTPFSEntryCache(); |
|
31 CleanupStack::PushL(self); |
|
32 self->ConstructL(); |
|
33 CleanupStack::Pop(self); |
|
34 return self; |
|
35 } |
|
36 |
|
37 EXPORT_C CMTPFSEntryCache::~CMTPFSEntryCache() |
|
38 { |
|
39 __FLOG(_L8("~CMTPFSEntryCache - Entry")); |
|
40 __FLOG(_L8("~CMTPFSEntryCache - Exit")); |
|
41 __FLOG_CLOSE; |
|
42 } |
|
43 |
|
44 EXPORT_C TBool CMTPFSEntryCache::IsOnGoing() const |
|
45 { |
|
46 return iIsOngoing; |
|
47 } |
|
48 |
|
49 EXPORT_C void CMTPFSEntryCache::SetOnGoing(TBool aOnGoing) |
|
50 { |
|
51 __FLOG(_L8("SetOnGoing - Entry")); |
|
52 iIsOngoing = aOnGoing; |
|
53 __FLOG(_L8("SetOnGoing - Exit")); |
|
54 } |
|
55 |
|
56 EXPORT_C TUint32 CMTPFSEntryCache::TargetHandle() const |
|
57 { |
|
58 return iTargetHandle; |
|
59 } |
|
60 |
|
61 EXPORT_C void CMTPFSEntryCache::SetTargetHandle(TUint32 aHandle) |
|
62 { |
|
63 __FLOG(_L8("SetTargetHandle - Entry")); |
|
64 iTargetHandle = aHandle; |
|
65 __FLOG(_L8("SetTargetHandle - Exit")); |
|
66 } |
|
67 |
|
68 EXPORT_C TEntry& CMTPFSEntryCache::FileEntry() |
|
69 { |
|
70 return iFileEntry; |
|
71 } |
|
72 |
|
73 EXPORT_C void CMTPFSEntryCache::SetFileEntry(const TEntry& aEntry) |
|
74 { |
|
75 __FLOG(_L8("SetFileEntry - Entry")); |
|
76 iFileEntry = aEntry; |
|
77 __FLOG(_L8("SetFileEntry - Exit")); |
|
78 } |
|
79 |
|
80 CMTPFSEntryCache::CMTPFSEntryCache():iIsOngoing(EFalse), iTargetHandle(KMTPHandleNone) |
|
81 { |
|
82 __FLOG_OPEN(KMTPSubsystem, KComponent); |
|
83 __FLOG(_L8("CMTPFSEntryCache - Entry")); |
|
84 __FLOG(_L8("CMTPFSEntryCache - Exit")); |
|
85 } |
|
86 |
|
87 void CMTPFSEntryCache::ConstructL() |
|
88 { |
|
89 } |