2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #ifndef CONTENTLISTINGFACTORY_H
20 #define CONTENTLISTINGFACTORY_H
25 // FORWARD DECLARATIONS
26 class MCLFContentListingEngine;
27 class MCLFModifiableItem;
28 class MCLFSortingStyle;
29 class TResourceReader;
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>
39 * // Create a new instance of Content Listing Engine
40 * MCLFContentListingEngine* engine =
41 * ContentListingFactory::NewContentListingEngineLC();
43 * // Create a new instance of Sorting style
44 * MCLFSortingStyle* sortingStyle =
45 * ContentListingFactory::NewSortingStyleLC();
47 * // Create a new instance of Modifiable item
48 * MCLFModifiableItem* modItem =
49 * ContentListingFactory::NewModifiableItemLC();
52 * @lib ContentListingFramework.lib
55 class ContentListingFactory
57 public: // New functions
60 * Create new instance of Content Listing Engine.
62 * @return New instance of Content Listing Engine.
63 * Ownership is transferred to the client application.
65 IMPORT_C static MCLFContentListingEngine* NewContentListingEngineLC();
68 * Create new instance of Modifiable Item.
70 * @return New instance of Modifiable Item.
71 * Ownership is transferred to the client application.
73 IMPORT_C static MCLFModifiableItem* NewModifiableItemLC();
76 * Create new instance of Sorting Style.
78 * @return New instance of the Sorting Style.
79 * Ownership is transferred to the client application.
81 IMPORT_C static MCLFSortingStyle* NewSortingStyleLC();
84 * Create new instance of Sorting Style from resource of the
85 * application by using TResourceReader.
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.
93 IMPORT_C static MCLFSortingStyle* NewSortingStyleLC(
94 TResourceReader& aResource );
97 // Prohibit C++ default constructor.
98 ContentListingFactory();
99 // Prohibit Destructor.
100 ~ContentListingFactory();
104 #endif // CONTENTLISTINGFACTORY_H