|
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: Represents a set of filter properties |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef T_GLXFILTERPROPERTIES_H |
|
22 #define T_GLXFILTERPROPERTIES_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <glxmediaid.h> |
|
26 #include <glxfiltergeneraldefs.h> |
|
27 #include <mpxcollectionpath.h> // for deep copying the path |
|
28 // FORWARD DECLARATIONS |
|
29 |
|
30 // CONSTANTS |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 |
|
35 class TGlxFilterProperties |
|
36 { |
|
37 public: |
|
38 inline TGlxFilterProperties () : |
|
39 iSortOrder(EGlxFilterSortOrderNotUsed), |
|
40 iSortDirection(EGlxFilterSortDirectionNotUsed), |
|
41 iIncludeCameraAlbum(ETrue), |
|
42 iMinCount(0), |
|
43 iContainsItem(0), |
|
44 iExcludeAnimation(EFalse), |
|
45 iLastCaptureDate(EFalse), |
|
46 iMaxCount(KMaxTUint), |
|
47 iThumbnailLoadability(0,0), |
|
48 iPath(NULL), |
|
49 iItemType(EGlxFilterVideoAndImages), |
|
50 iPromoteSystemItems(EFalse), |
|
51 iOrigin(EGlxFilterOriginNotUsed), |
|
52 iUri(NULL), |
|
53 iStartDate(0), |
|
54 iEndDate(0), |
|
55 iNoDRM(EFalse) |
|
56 {} |
|
57 |
|
58 /** |
|
59 * Destructor |
|
60 */ |
|
61 inline ~TGlxFilterProperties () |
|
62 { |
|
63 delete iPath; |
|
64 } |
|
65 |
|
66 /** |
|
67 * overloaded assignment operator |
|
68 * |
|
69 * @param aFilterProperties, assigned object |
|
70 * @return TGlxFilterProperties object after deep copying the path. |
|
71 */ |
|
72 inline TGlxFilterProperties& operator=(const TGlxFilterProperties& aFilterProperties) |
|
73 { |
|
74 if(this != &aFilterProperties) |
|
75 { |
|
76 iSortOrder = aFilterProperties.iSortOrder; |
|
77 iSortDirection = aFilterProperties.iSortDirection; |
|
78 iIncludeCameraAlbum = aFilterProperties.iIncludeCameraAlbum; |
|
79 iMinCount = aFilterProperties.iMinCount; |
|
80 iContainsItem = aFilterProperties.iContainsItem; |
|
81 iExcludeAnimation = aFilterProperties.iExcludeAnimation; |
|
82 iLastCaptureDate = aFilterProperties.iLastCaptureDate; |
|
83 iMaxCount = aFilterProperties.iMaxCount; |
|
84 iThumbnailLoadability = aFilterProperties.iThumbnailLoadability; |
|
85 iItemType = aFilterProperties.iItemType; |
|
86 iPromoteSystemItems = aFilterProperties.iPromoteSystemItems; |
|
87 iOrigin = aFilterProperties.iOrigin; |
|
88 iUri = aFilterProperties.iUri; |
|
89 iStartDate = aFilterProperties.iStartDate; |
|
90 iEndDate = aFilterProperties.iEndDate; |
|
91 iNoDRM = aFilterProperties.iNoDRM; |
|
92 |
|
93 // creating a copy of iPath |
|
94 if(aFilterProperties.iPath) |
|
95 { |
|
96 const CMPXCollectionPath* path = aFilterProperties.iPath; |
|
97 iPath = CMPXCollectionPath::NewL(*path); |
|
98 } |
|
99 else |
|
100 { |
|
101 iPath = NULL; |
|
102 } |
|
103 } |
|
104 return *this; |
|
105 } |
|
106 /** |
|
107 * Copy constructor |
|
108 * |
|
109 * @param aFilterProperties, assigned object |
|
110 */ |
|
111 inline TGlxFilterProperties(const TGlxFilterProperties& aFilterProperties) |
|
112 { |
|
113 iSortOrder = aFilterProperties.iSortOrder; |
|
114 iSortDirection = aFilterProperties.iSortDirection; |
|
115 iIncludeCameraAlbum = aFilterProperties.iIncludeCameraAlbum; |
|
116 iMinCount = aFilterProperties.iMinCount; |
|
117 iContainsItem = aFilterProperties.iContainsItem; |
|
118 iExcludeAnimation = aFilterProperties.iExcludeAnimation; |
|
119 iLastCaptureDate = aFilterProperties.iLastCaptureDate; |
|
120 iMaxCount = aFilterProperties.iMaxCount; |
|
121 iThumbnailLoadability = aFilterProperties.iThumbnailLoadability; |
|
122 iItemType = aFilterProperties.iItemType; |
|
123 iPromoteSystemItems = aFilterProperties.iPromoteSystemItems; |
|
124 iOrigin = aFilterProperties.iOrigin; |
|
125 iUri = aFilterProperties.iUri; |
|
126 iStartDate = aFilterProperties.iStartDate; |
|
127 iEndDate = aFilterProperties.iEndDate; |
|
128 iNoDRM = aFilterProperties.iNoDRM; |
|
129 |
|
130 // creating a copy of iPath |
|
131 if(aFilterProperties.iPath) |
|
132 { |
|
133 const CMPXCollectionPath* path = aFilterProperties.iPath; |
|
134 iPath = CMPXCollectionPath::NewL(*path); |
|
135 } |
|
136 else |
|
137 { |
|
138 iPath = NULL; |
|
139 } |
|
140 } |
|
141 public: |
|
142 TGlxFilterSortOrder iSortOrder; |
|
143 TGlxFilterSortDirection iSortDirection; |
|
144 TBool iIncludeCameraAlbum; |
|
145 TInt iMinCount; |
|
146 TGlxMediaId iContainsItem; |
|
147 TBool iExcludeAnimation; |
|
148 TBool iLastCaptureDate; |
|
149 TInt iMaxCount; |
|
150 TSize iThumbnailLoadability; |
|
151 CMPXCollectionPath* iPath; |
|
152 TGlxFilterItemType iItemType; |
|
153 TBool iPromoteSystemItems; |
|
154 TGlxFilterOrigin iOrigin; |
|
155 const TDesC* iUri; |
|
156 TTime iStartDate; |
|
157 TTime iEndDate; |
|
158 TBool iNoDRM; |
|
159 }; |
|
160 |
|
161 |
|
162 #endif // T_GLXFILTERPROPERTIES_H |