williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
* This component and the accompanying materials are made available
|
williamr@2
|
5 |
* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@2
|
7 |
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Initial Contributors:
|
williamr@2
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@2
|
11 |
*
|
williamr@2
|
12 |
* Contributors:
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* Description:
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
*/
|
williamr@2
|
17 |
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#ifndef CONTENTLISTINGFACTORY_H
|
williamr@2
|
20 |
#define CONTENTLISTINGFACTORY_H
|
williamr@2
|
21 |
|
williamr@2
|
22 |
// INCLUDES
|
williamr@2
|
23 |
#include <e32def.h>
|
williamr@2
|
24 |
|
williamr@2
|
25 |
// FORWARD DECLARATIONS
|
williamr@2
|
26 |
class MCLFContentListingEngine;
|
williamr@2
|
27 |
class MCLFModifiableItem;
|
williamr@2
|
28 |
class MCLFSortingStyle;
|
williamr@2
|
29 |
class TResourceReader;
|
williamr@2
|
30 |
|
williamr@2
|
31 |
// CLASS DECLARATION
|
williamr@2
|
32 |
|
williamr@2
|
33 |
/**
|
williamr@2
|
34 |
* Factory for Content Listing Framework.
|
williamr@2
|
35 |
* You can create new instances of Content Listing Engines, Modifiable items
|
williamr@2
|
36 |
* and Sorting Styles by using this factory.<br><br>
|
williamr@2
|
37 |
* Example:
|
williamr@2
|
38 |
* @code
|
williamr@2
|
39 |
* // Create a new instance of Content Listing Engine
|
williamr@2
|
40 |
* MCLFContentListingEngine* engine =
|
williamr@2
|
41 |
* ContentListingFactory::NewContentListingEngineLC();
|
williamr@2
|
42 |
*
|
williamr@2
|
43 |
* // Create a new instance of Sorting style
|
williamr@2
|
44 |
* MCLFSortingStyle* sortingStyle =
|
williamr@2
|
45 |
* ContentListingFactory::NewSortingStyleLC();
|
williamr@2
|
46 |
*
|
williamr@2
|
47 |
* // Create a new instance of Modifiable item
|
williamr@2
|
48 |
* MCLFModifiableItem* modItem =
|
williamr@2
|
49 |
* ContentListingFactory::NewModifiableItemLC();
|
williamr@2
|
50 |
* @endcode
|
williamr@2
|
51 |
*
|
williamr@2
|
52 |
* @lib ContentListingFramework.lib
|
williamr@2
|
53 |
* @since S60 3.1
|
williamr@2
|
54 |
*/
|
williamr@2
|
55 |
class ContentListingFactory
|
williamr@2
|
56 |
{
|
williamr@2
|
57 |
public: // New functions
|
williamr@2
|
58 |
|
williamr@2
|
59 |
/**
|
williamr@2
|
60 |
* Create new instance of Content Listing Engine.
|
williamr@2
|
61 |
* @since S60 3.1
|
williamr@2
|
62 |
* @return New instance of Content Listing Engine.
|
williamr@2
|
63 |
* Ownership is transferred to the client application.
|
williamr@2
|
64 |
*/
|
williamr@2
|
65 |
IMPORT_C static MCLFContentListingEngine* NewContentListingEngineLC();
|
williamr@2
|
66 |
|
williamr@2
|
67 |
/**
|
williamr@2
|
68 |
* Create new instance of Modifiable Item.
|
williamr@2
|
69 |
* @since S60 3.1
|
williamr@2
|
70 |
* @return New instance of Modifiable Item.
|
williamr@2
|
71 |
* Ownership is transferred to the client application.
|
williamr@2
|
72 |
*/
|
williamr@2
|
73 |
IMPORT_C static MCLFModifiableItem* NewModifiableItemLC();
|
williamr@2
|
74 |
|
williamr@2
|
75 |
/**
|
williamr@2
|
76 |
* Create new instance of Sorting Style.
|
williamr@2
|
77 |
* @since S60 3.1
|
williamr@2
|
78 |
* @return New instance of the Sorting Style.
|
williamr@2
|
79 |
* Ownership is transferred to the client application.
|
williamr@2
|
80 |
*/
|
williamr@2
|
81 |
IMPORT_C static MCLFSortingStyle* NewSortingStyleLC();
|
williamr@2
|
82 |
|
williamr@2
|
83 |
/**
|
williamr@2
|
84 |
* Create new instance of Sorting Style from resource of the
|
williamr@2
|
85 |
* application by using TResourceReader.
|
williamr@2
|
86 |
* @since S60 3.1
|
williamr@2
|
87 |
* @param aResource Resource reader to sorting style resource.
|
williamr@2
|
88 |
* Use resource struct CLF_SORTING_STYLE. See
|
williamr@2
|
89 |
* CLFContentListing.rh
|
williamr@2
|
90 |
* @return New instance of the Sorting Style.
|
williamr@2
|
91 |
* Ownership is transferred to the client application.
|
williamr@2
|
92 |
*/
|
williamr@2
|
93 |
IMPORT_C static MCLFSortingStyle* NewSortingStyleLC(
|
williamr@2
|
94 |
TResourceReader& aResource );
|
williamr@2
|
95 |
|
williamr@2
|
96 |
private:
|
williamr@2
|
97 |
// Prohibit C++ default constructor.
|
williamr@2
|
98 |
ContentListingFactory();
|
williamr@2
|
99 |
// Prohibit Destructor.
|
williamr@2
|
100 |
~ContentListingFactory();
|
williamr@2
|
101 |
|
williamr@2
|
102 |
};
|
williamr@2
|
103 |
|
williamr@2
|
104 |
#endif // CONTENTLISTINGFACTORY_H
|
williamr@2
|
105 |
|
williamr@2
|
106 |
// End of File
|