equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2006-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: Utility class to keep a list of mediaid's |
|
15 */ |
|
16 |
|
17 #ifndef HARVESTERMEDIAIDUTIL_H |
|
18 #define HARVESTERMEDIAIDUTIL_H |
|
19 |
|
20 #include <e32base.h> |
|
21 #include <f32file.h> |
|
22 |
|
23 const TInt KHarvesterMediaIdTLSKey = 0x200009FE; |
|
24 |
|
25 class CHarvesterMediaIdUtil : public CBase |
|
26 { |
|
27 friend class RMediaIdUtil; |
|
28 |
|
29 public: |
|
30 |
|
31 IMPORT_C TInt GetMediaId( const TDesC& aUri, TUint32& aMediaId ); |
|
32 |
|
33 IMPORT_C TInt GetDriveLetter( TUint32 aMediaId, TChar& aChar ); |
|
34 |
|
35 IMPORT_C void RemoveMediaId( TUint32 aMediaId ); |
|
36 |
|
37 private: |
|
38 |
|
39 static CHarvesterMediaIdUtil* NewL(); |
|
40 |
|
41 ~CHarvesterMediaIdUtil(); |
|
42 |
|
43 CHarvesterMediaIdUtil(); |
|
44 |
|
45 void ConstructL(); |
|
46 |
|
47 private: |
|
48 TUint32 iMediaId[KMaxDrives]; |
|
49 RFs iFs; |
|
50 TVolumeInfo iVolumeInfo; |
|
51 |
|
52 }; |
|
53 |
|
54 struct TMediaIdUtilInfo |
|
55 { |
|
56 CHarvesterMediaIdUtil* iMediaIdUtil; |
|
57 TInt iRefCount; |
|
58 }; |
|
59 |
|
60 |
|
61 class RMediaIdUtil |
|
62 { |
|
63 public: |
|
64 IMPORT_C static CHarvesterMediaIdUtil& GetInstanceL(); |
|
65 |
|
66 IMPORT_C static void ReleaseInstance(); |
|
67 }; |
|
68 |
|
69 #endif |