author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 24 Nov 2009 08:56:33 +0200 | |
changeset 33 | 50974a8b132e |
parent 19 | 989d2f495d90 |
permissions | -rw-r--r-- |
19 | 1 |
/* |
2 |
* Copyright (c) 2007-2007 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: Implements CLiwIterable type |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef __CMGITEMSLIST_H |
|
19 |
#define __CMGITEMSLIST_H |
|
20 |
||
21 |
#include <liwgenericparam.h> |
|
22 |
#include "mgservice.hrh" |
|
23 |
||
24 |
class MCLFItemListModel; |
|
25 |
class MgMediaItemFactory; |
|
26 |
class CMgMediaItem; |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
27 |
class CClfOperationObserver; |
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
28 |
|
19 | 29 |
/** |
30 |
* This class implements the abstract methods of CLiwIterable |
|
31 |
* class so that the user may iterate over the result |
|
32 |
* |
|
33 |
* @since Series60 v3.2 |
|
34 |
*/ |
|
35 |
NONSHARABLE_CLASS( CMgItemsList ) : public CLiwIterable |
|
36 |
{ |
|
37 |
||
38 |
public: |
|
39 |
||
40 |
/** |
|
41 |
* Two-phased constructor. |
|
42 |
* @param aItemListModel holds a reference to the item list model |
|
43 |
* @param aCmdId specifies whether the SAPI is GetFiles or GetFilesInfo |
|
44 |
* @return A pointer of type CMgItemsList |
|
45 |
*/ |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
46 |
static CMgItemsList* NewL( MCLFItemListModel* aItemListModel, CClfOperationObserver* aOperationObserver, TMgCmdId aCmdId ); |
19 | 47 |
|
48 |
/** |
|
49 |
* Destructor. |
|
50 |
*/ |
|
51 |
~CMgItemsList(); |
|
52 |
||
53 |
||
54 |
/** |
|
55 |
* Resets the iterator to point to the beginning of list |
|
56 |
* @param void |
|
57 |
* @return void |
|
58 |
*/ |
|
59 |
void Reset(); |
|
60 |
||
61 |
/** |
|
62 |
* Constructs the next media item in the form of a map |
|
63 |
* @param TLiwVariant an output parameter that contains the result |
|
64 |
* @return TBool On success this returns ETrue else returns EFalse |
|
65 |
*/ |
|
66 |
TBool NextL( TLiwVariant& aItem ); |
|
67 |
||
68 |
||
69 |
private: |
|
70 |
||
71 |
/** |
|
72 |
* Parameterised constructor |
|
73 |
* @since Series60 v3.2 |
|
74 |
* @param aItemListModel holds a reference to the item list model |
|
75 |
* @param aCmdId specifies whether the SAPI is GetFiles or GetFilesInfo |
|
76 |
*/ |
|
77 |
||
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
78 |
CMgItemsList( MCLFItemListModel* aItemListModel, CClfOperationObserver* aOperationObserver, TMgCmdId aCmdId ); |
19 | 79 |
|
80 |
private: // data |
|
81 |
||
82 |
/** |
|
83 |
* A pointer to MCLFItemListModel class |
|
84 |
*/ |
|
85 |
MCLFItemListModel* iItemListModel; |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
86 |
|
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
87 |
CClfOperationObserver* iOperationObserver; |
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
88 |
|
19 | 89 |
/** |
90 |
* Indicates whether GetFiles or GetFilesInfo SAPI is being processed |
|
91 |
*/ |
|
92 |
TMgCmdId iCmdId; |
|
93 |
/** |
|
94 |
* Gives the total number of items in list model |
|
95 |
*/ |
|
96 |
TInt iCount; |
|
97 |
/** |
|
98 |
* Gives the current item being processed |
|
99 |
*/ |
|
100 |
TInt iCurrent; |
|
101 |
/** |
|
102 |
* Store the file type of current list |
|
103 |
*/ |
|
104 |
CMgMediaItem* iMediaItem; |
|
105 |
}; |
|
106 |
||
107 |
#endif // __CMGITEMSLIST_H |