1 /* |
|
2 * Copyright (c) 2007 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: Variation functionality class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MEDIAFILEVARIATION_H |
|
21 #define MEDIAFILEVARIATION_H |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 //FORWARD DECLARATIONS |
|
31 class CRepository; |
|
32 |
|
33 |
|
34 /** |
|
35 * CMediaFileDialogVariation |
|
36 * |
|
37 * CMediaFileDialogVariation is used to varitate media file dialog. |
|
38 * Main purpose is to prevent selecting certain mime types. These |
|
39 * 'blocked' mime types are stored in central repository. |
|
40 * Notice: This code is a copy from CProfilesLocalFeatures. |
|
41 */ |
|
42 NONSHARABLE_CLASS(CMediaFileDialogVariation) : public CBase |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 static CMediaFileDialogVariation* NewL(); |
|
46 ~CMediaFileDialogVariation(); |
|
47 |
|
48 private: |
|
49 void ConstructL(); |
|
50 CMediaFileDialogVariation( TInt aFeatureBitMask ); |
|
51 |
|
52 public: |
|
53 TBool IsFeatureSupported( TInt aLocalFeatureId ); |
|
54 TBool IsBlockedType( const TDesC& aMimeType ); |
|
55 TBool IsBlockedUnprotectedType( const TDesC& aMimeType ); |
|
56 TBool IsBlockedProtectedType( const TDesC& aMimeType ); |
|
57 TBool IsBlockedDemoPlayType( const TDesC& aMimeType ); |
|
58 TBool IsExcludedType( const TDesC& aMimeType ); |
|
59 |
|
60 private: |
|
61 |
|
62 void ReadListKeyL( CRepository& aCenRep, TUint32 aKey, |
|
63 RBuf& aValue ); |
|
64 TBool ContainsMimeType( const TDesC& aList, const TDesC& aMimeType ); |
|
65 |
|
66 |
|
67 private: |
|
68 |
|
69 // the key containing boolean type features |
|
70 TInt iFeatureBitMask; |
|
71 |
|
72 // contains space separated list of blocked MIME-types |
|
73 RBuf iBlockedTones; |
|
74 |
|
75 // contains space separated list of blocked unprotected MIME-types |
|
76 RBuf iBlockedUnprotectedTones; |
|
77 |
|
78 // contains space separated list of blocked protected MIME-types |
|
79 RBuf iBlockedProtectedTones; |
|
80 |
|
81 // contains space separated list of blocked demo-play MIME-types |
|
82 RBuf iBlockedDemoPlayTones; |
|
83 |
|
84 // contains space separated list of excluded MIME-types |
|
85 RBuf iExcludedTones; |
|
86 |
|
87 // helper buffer for mime-type matching |
|
88 RBuf iMimeBuf; |
|
89 }; |
|
90 |
|
91 |
|
92 |
|
93 #endif // MEDIAFILEVARIATION_H |
|
94 |
|
95 // End of File |
|