|
1 /* |
|
2 * Copyright (c) 2007-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: Harvester Central Repository utility class |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HARVESTERCENREPUTIL_H |
|
19 #define HARVESTERCENREPUTIL_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 #include <f32file.h> |
|
25 #include "mdsfileserverpluginclient.h" |
|
26 |
|
27 struct TScanItem |
|
28 { |
|
29 TUint32 iPreinstalled; |
|
30 HBufC* iPath; |
|
31 ~TScanItem() { delete iPath; } |
|
32 }; |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * CHarvesterCenRepUtil |
|
37 * |
|
38 */ |
|
39 NONSHARABLE_CLASS( CHarvesterCenRepUtil ) : public CBase |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 IMPORT_C ~CHarvesterCenRepUtil(); |
|
43 IMPORT_C static CHarvesterCenRepUtil* NewL(); |
|
44 IMPORT_C static CHarvesterCenRepUtil* NewLC(); |
|
45 |
|
46 public: // new functions |
|
47 IMPORT_C void AddIgnorePathsToFspL( const TDesC& aDrivePrefix ); |
|
48 IMPORT_C void AddIgnorePathsToFspL( const TDesC& aDrivePrefix, const TDesC& aFilterPrefix ); |
|
49 IMPORT_C void RemoveIgnorePathsFromFspL( const TDesC& aDrivePrefix ); |
|
50 IMPORT_C RMdsFSPEngine& FspEngine(); |
|
51 |
|
52 /** |
|
53 * Append ignore paths to given array |
|
54 * |
|
55 * @param aIgnorePaths ignore paths |
|
56 */ |
|
57 IMPORT_C static void GetIgnorePathL( RPointerArray<HBufC>& aIgnorePaths ); |
|
58 |
|
59 /** |
|
60 * Append first boot scan paths to given array |
|
61 * |
|
62 * @param aPaths scan paths |
|
63 */ |
|
64 IMPORT_C static void GetScanItemsL( RPointerArray<TScanItem>& aItems ); |
|
65 |
|
66 /** |
|
67 * Append ignored first boot scan paths to given array |
|
68 * |
|
69 * @param aIngorePaths ignored scan paths |
|
70 */ |
|
71 IMPORT_C static void GetIgnoredScanPathsL( RPointerArray<HBufC>& aIngorePaths ); |
|
72 |
|
73 /** |
|
74 * Append partial restore scan paths to given array |
|
75 * |
|
76 * @param aPaths scan paths |
|
77 */ |
|
78 IMPORT_C static void GetPartialRestorePathsL( RPointerArray<TScanItem>& aPaths ); |
|
79 |
|
80 /** |
|
81 * Append ignored partial restore scan paths to given array |
|
82 * |
|
83 * @param aIngorePaths ignored scan paths |
|
84 */ |
|
85 IMPORT_C static void GetIgnoredPartialRestorePathsL( RPointerArray<HBufC>& aIngorePaths ); |
|
86 |
|
87 /** |
|
88 * Check if ROM scanning is enabled |
|
89 * |
|
90 * @param aEnabled is rom scan enabled |
|
91 */ |
|
92 IMPORT_C static void IsRomScanEnabledL( TBool& aEnabled ); |
|
93 |
|
94 /** |
|
95 * Check if automatic thumbnail generation is enabled |
|
96 * |
|
97 * @param aEnabled is rom scan enabled |
|
98 */ |
|
99 IMPORT_C static void IsThumbnailDaemonEnabledL( TBool& aEnabled ); |
|
100 |
|
101 private: |
|
102 CHarvesterCenRepUtil(); |
|
103 void ConstructL(); |
|
104 |
|
105 static void GetPathsL( TUint32 aPartialKey, RPointerArray<HBufC>& aPaths ); |
|
106 |
|
107 static void GetItemsL( TUint32 aPartialKey, RPointerArray<TScanItem>& aPaths ); |
|
108 |
|
109 void AddOrRemoveIgnorePathsL( const TDesC& aDrivePrefix, TBool aAdd, const TDesC& aFilterPrefix ); |
|
110 |
|
111 private: // member variables |
|
112 RFs iFs; |
|
113 RMdsFSPEngine iFspEngine; |
|
114 }; |
|
115 |
|
116 #endif // HARVESTERCENREPUTIL_H |
|
117 |