|
1 /* |
|
2 * Copyright (c) 2002-2009 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 CONTENTLISTINGFACTORY_H |
|
20 #define CONTENTLISTINGFACTORY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32def.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class MCLFContentListingEngine; |
|
27 class MCLFModifiableItem; |
|
28 class MCLFSortingStyle; |
|
29 class TResourceReader; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Factory for Content Listing Framework. |
|
35 * You can create new instances of Content Listing Engines, Modifiable items |
|
36 * and Sorting Styles by using this factory.<br><br> |
|
37 * Example: |
|
38 * @code |
|
39 * // Create a new instance of Content Listing Engine |
|
40 * MCLFContentListingEngine* engine = |
|
41 * ContentListingFactory::NewContentListingEngineLC(); |
|
42 * |
|
43 * // Create a new instance of Sorting style |
|
44 * MCLFSortingStyle* sortingStyle = |
|
45 * ContentListingFactory::NewSortingStyleLC(); |
|
46 * |
|
47 * // Create a new instance of Modifiable item |
|
48 * MCLFModifiableItem* modItem = |
|
49 * ContentListingFactory::NewModifiableItemLC(); |
|
50 * @endcode |
|
51 * |
|
52 * @lib ContentListingFramework.lib |
|
53 * @since S60 3.1 |
|
54 */ |
|
55 class ContentListingFactory |
|
56 { |
|
57 public: // New functions |
|
58 |
|
59 /** |
|
60 * Create new instance of Content Listing Engine. |
|
61 * @since S60 3.1 |
|
62 * @return New instance of Content Listing Engine. |
|
63 * Ownership is transferred to the client application. |
|
64 */ |
|
65 IMPORT_C static MCLFContentListingEngine* NewContentListingEngineLC(); |
|
66 |
|
67 /** |
|
68 * Create new instance of Modifiable Item. |
|
69 * @since S60 3.1 |
|
70 * @return New instance of Modifiable Item. |
|
71 * Ownership is transferred to the client application. |
|
72 */ |
|
73 IMPORT_C static MCLFModifiableItem* NewModifiableItemLC(); |
|
74 |
|
75 /** |
|
76 * Create new instance of Sorting Style. |
|
77 * @since S60 3.1 |
|
78 * @return New instance of the Sorting Style. |
|
79 * Ownership is transferred to the client application. |
|
80 */ |
|
81 IMPORT_C static MCLFSortingStyle* NewSortingStyleLC(); |
|
82 |
|
83 /** |
|
84 * Create new instance of Sorting Style from resource of the |
|
85 * application by using TResourceReader. |
|
86 * @since S60 3.1 |
|
87 * @param aResource Resource reader to sorting style resource. |
|
88 * Use resource struct CLF_SORTING_STYLE. See |
|
89 * CLFContentListing.rh |
|
90 * @return New instance of the Sorting Style. |
|
91 * Ownership is transferred to the client application. |
|
92 */ |
|
93 IMPORT_C static MCLFSortingStyle* NewSortingStyleLC( |
|
94 TResourceReader& aResource ); |
|
95 |
|
96 private: |
|
97 // Prohibit C++ default constructor. |
|
98 ContentListingFactory(); |
|
99 // Prohibit Destructor. |
|
100 ~ContentListingFactory(); |
|
101 |
|
102 }; |
|
103 |
|
104 #endif // CONTENTLISTINGFACTORY_H |
|
105 |
|
106 // End of File |