1 /* |
|
2 * Copyright (c) 2002-2006 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: Goes through the list of given files |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CFILEMANAGERINDEXITERATOR_H |
|
20 #define CFILEMANAGERINDEXITERATOR_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "Mfilemanageritemiterator.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CFileManagerEngine; |
|
28 |
|
29 /** |
|
30 * Goes through the given file list. Implements the |
|
31 * MFileManagerItemIterator. |
|
32 * |
|
33 * @lib FileManagerEngine.lib |
|
34 * @since 2.0 |
|
35 */ |
|
36 NONSHARABLE_CLASS(CFileManagerIndexIterator) : |
|
37 public CBase, |
|
38 public MFileManagerItemIterator |
|
39 { |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 static CFileManagerIndexIterator* NewL( |
|
46 CFileManagerEngine& aEngine, |
|
47 CArrayFixFlat< TInt >& aIndexList, |
|
48 const TDesC& aDstDir ); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 ~CFileManagerIndexIterator(); |
|
54 |
|
55 public: // From MFileManagerItemIterator |
|
56 |
|
57 void CurrentL( |
|
58 HBufC** aSrc, HBufC** aDst, TFileManagerTypeOfItem& aItemType); |
|
59 |
|
60 TBool NextL(); |
|
61 |
|
62 private: |
|
63 |
|
64 /** |
|
65 * C++ default constructor. |
|
66 */ |
|
67 CFileManagerIndexIterator( |
|
68 CFileManagerEngine& aEngine, |
|
69 CArrayFixFlat< TInt >& aIndexList, |
|
70 const TDesC& aDstDir ); |
|
71 |
|
72 /** |
|
73 * By default Symbian 2nd phase constructor is private. |
|
74 */ |
|
75 void ConstructL(); |
|
76 |
|
77 private: |
|
78 // Index to currently processed item in given array |
|
79 TInt iCurrentIndex; |
|
80 |
|
81 // To get the full path information |
|
82 CFileManagerEngine& iEngine; |
|
83 |
|
84 // User chosen list of files |
|
85 CArrayFixFlat< TInt >& iIndexList; |
|
86 |
|
87 // Destination directory |
|
88 const TDesC& iDstDir; |
|
89 |
|
90 // Own: Source of the currently processed item with full path |
|
91 HBufC* iSrc; |
|
92 |
|
93 // Own: Destination of the currently processes item with full path |
|
94 HBufC* iDst; |
|
95 |
|
96 }; |
|
97 |
|
98 #endif // CFILEMANAGERINDEXITERATOR_H |
|