|
1 /* |
|
2 * Copyright (c) 2002-2006 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: Attribute filter for File Selection Dialog |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAKNATTRIBUTEFILTER_H |
|
20 #define CAKNATTRIBUTEFILTER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <MAknFileFilter.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class TEntry; |
|
28 class TResourceReader; |
|
29 |
|
30 // CLASS DEFINITION |
|
31 /** |
|
32 * A filter class that checks if attributes of a file match |
|
33 * with filter's ones. |
|
34 * |
|
35 * @lib CommonDialogs.lib |
|
36 * @since 1.2 |
|
37 */ |
|
38 NONSHARABLE_CLASS(CAknAttributeFilter) : public CBase, public MAknFileFilter |
|
39 { |
|
40 public: // Constructors and destructors |
|
41 |
|
42 /** |
|
43 * Static constructor, leaves a pointer to itself to the cleanup stack. |
|
44 * @param aReader A reference to a resource reader. |
|
45 */ |
|
46 IMPORT_C static CAknAttributeFilter* NewLC( TResourceReader& aReader ); |
|
47 |
|
48 IMPORT_C ~CAknAttributeFilter(); |
|
49 |
|
50 public: // Functions from base classes |
|
51 |
|
52 /** |
|
53 * From MAknFileFilter |
|
54 */ |
|
55 IMPORT_C TBool Accept( const TDesC& aDriveAndPath, const TEntry& aEntry ) const; |
|
56 |
|
57 private: // Constructors and destructors |
|
58 |
|
59 CAknAttributeFilter(); |
|
60 |
|
61 /** |
|
62 * Second phase of construction. Constructs itself from a resource. |
|
63 * @param aReader A reference to a resource reader. |
|
64 */ |
|
65 void ConstructFromResourceL( TResourceReader& aReader ); |
|
66 |
|
67 private: // Data |
|
68 |
|
69 // Own: Filter attributes. Constants are defined in F32FILE.H. |
|
70 TUint iAttributes; |
|
71 |
|
72 // Own: Defines whether the filter is an include or an exclude filter. |
|
73 TInt iFilterStyle; |
|
74 }; |
|
75 |
|
76 #endif // CAKNATTRIBUTEFILTER_H |
|
77 |
|
78 // End of File |