60
|
1 |
/*
|
|
2 |
* Copyright (c) 2008-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: This class browses file system
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
#ifndef C_GLXCOLLECTIONPLUGINMONTHS_H
|
|
23 |
#define C_GLXCOLLECTIONPLUGINMONTHS_H
|
|
24 |
|
|
25 |
// INCLUDES
|
|
26 |
#include <e32cmn.h>
|
|
27 |
#include "glxcollectionpluginbase.h"
|
|
28 |
|
|
29 |
/**
|
|
30 |
* @internal reviewed 14/06/2007 by Alex Birkett
|
|
31 |
*/
|
|
32 |
|
|
33 |
// FORWARD DECLARATIONS
|
|
34 |
|
|
35 |
// CONSTANTS
|
|
36 |
const TInt KGlxCollectionMonthsLevel = KGlxCollectionRootLevel + 1;
|
|
37 |
const TInt KGlxCollectionMonthContentsLevel = KGlxCollectionRootLevel + 2;
|
|
38 |
const TInt KGlxCollectionMonthFSLevel = KGlxCollectionRootLevel + 3;
|
|
39 |
// CLASS DECLARATION
|
|
40 |
|
|
41 |
/**
|
|
42 |
* CGlxCollectionPluginMonths class
|
|
43 |
*
|
|
44 |
* Plug-in basically provides browsing.
|
|
45 |
* @ingroup collection_component_design
|
|
46 |
*/
|
|
47 |
NONSHARABLE_CLASS(CGlxCollectionPluginMonths) : public CGlxCollectionPluginBase
|
|
48 |
{
|
|
49 |
public: // Constructors and destructor
|
|
50 |
/**
|
|
51 |
* Two-phased constructor
|
|
52 |
*
|
|
53 |
* @param aObs observer
|
|
54 |
* @return object of constructed
|
|
55 |
*/
|
|
56 |
static CGlxCollectionPluginMonths* NewL(TAny* aObs);
|
|
57 |
|
|
58 |
/**
|
|
59 |
* Destructor
|
|
60 |
*/
|
|
61 |
~CGlxCollectionPluginMonths();
|
|
62 |
|
|
63 |
private:
|
|
64 |
/**
|
|
65 |
* Constructor
|
|
66 |
* @param aObs MMPXCollectionPluginObserver instance
|
|
67 |
*/
|
|
68 |
CGlxCollectionPluginMonths(MMPXCollectionPluginObserver* aObs);
|
|
69 |
/**
|
|
70 |
* 2nd stage Constructor
|
|
71 |
*/
|
|
72 |
void ConstructL();
|
|
73 |
|
|
74 |
private:
|
|
75 |
/**
|
|
76 |
* Checks to see if any additional attributes are required to construct required
|
|
77 |
* CPI specific attribute
|
|
78 |
*
|
|
79 |
* @param aCpiAttribute CPI specific attribute to be constructed later
|
|
80 |
* @param aAttributeArray modifiable list of attributes to be retrieved from data source
|
|
81 |
*/
|
|
82 |
void CpiAttributeAdditionalAttributesL(const TMPXAttribute& aCpiAttribute,
|
|
83 |
RArray<TMPXAttribute>& aAttributeArray);
|
|
84 |
|
|
85 |
/**
|
|
86 |
* Modifies the response to include all requested CPI specific attributes or Leaves.
|
|
87 |
*
|
|
88 |
* @param aResponse Data Source constructed response to which CPI specific attributes should be added (also contains any required data)
|
|
89 |
* @param aCpiAttributes list of CPI specific attributes to be constructed
|
|
90 |
*/
|
|
91 |
void HandleCpiAttributeResponseL(CMPXMedia* aResponse,
|
|
92 |
TArray<TMPXAttribute> aCpiAttributes, TArray<TGlxMediaId> aMediaIds);
|
|
93 |
|
|
94 |
/**
|
|
95 |
* Modifies the response to include all requested CPI specific attributes or Leaves.
|
|
96 |
*
|
|
97 |
* @param aResponse Data Source constructed response to which CPI specific attributes should be added (also contains any required data)
|
|
98 |
* @param aCpiAttributes list of CPI specific attributes to be constructed
|
|
99 |
* @param aMediaId CPI specific media Id
|
|
100 |
*/
|
|
101 |
void HandleCpiAttributeResponseL(CMPXMedia* aResponse,
|
|
102 |
TArray<TMPXAttribute> aCpiAttributes, TGlxMediaId aMediaId);
|
|
103 |
|
|
104 |
TBool IsUpdateMessageIgnored(CMPXMessage& aMessage);
|
|
105 |
|
|
106 |
TGlxFilterProperties DefaultFilter(TInt aLevel);
|
|
107 |
|
|
108 |
private:
|
|
109 |
/**
|
|
110 |
* enum TMonthStringType
|
|
111 |
*
|
|
112 |
* This is mainly passed as a param to be used by the method
|
|
113 |
* GetMonthNameAsStringLC().
|
|
114 |
* GetMonthNameAsStringLC() manipulates and returns the months name in
|
|
115 |
* Title format or sub-title format based on this enum which is passed as
|
|
116 |
* param.
|
|
117 |
*/
|
|
118 |
enum TMonthStringType
|
|
119 |
{
|
|
120 |
EMonthNameAsSubtitle, /// Month name is desired in sub-title format
|
|
121 |
EMonthNameAsTitle /// Month name is desired in title format
|
|
122 |
};
|
|
123 |
|
|
124 |
private:
|
|
125 |
/**
|
|
126 |
* Utility method to take a TMonth param, and convert it into a string. This
|
|
127 |
* string is returned to the calling method. The returned string can contain
|
|
128 |
* the month name in sub-title or title format. Subtitle format is used in
|
|
129 |
* the list views to signify months ("Jan", "Feb", ... ). Title format is
|
|
130 |
* used in mpnth-grid views to name the view ("January", "February", ...).
|
|
131 |
*
|
|
132 |
* @param aMonth The month whose name is desired as a string.
|
|
133 |
* @param aStrType enum specified by calling method to tell how it wants the
|
|
134 |
* month string to be.
|
|
135 |
*/
|
|
136 |
HBufC* GetMonthNameAsStringLC( const TMonth& aMonth,
|
|
137 |
const TMonthStringType& aStrType);
|
|
138 |
};
|
|
139 |
|
|
140 |
#endif // C_GLXCOLLECTIONPLUGINMONTHS_H
|
|
141 |
|