|
1 /* |
|
2 * Copyright (c) 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_NCDDATABASEFILEHANDLER_H |
|
20 #define C_NCDDATABASEFILEHANDLER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "ncdfilehandler.h" |
|
24 //#include "ncdproviderdefines.h" |
|
25 #include "ncdnodeclassids.h" |
|
26 |
|
27 class MNcdStorageClient; |
|
28 class MNcdStorage; |
|
29 |
|
30 /** |
|
31 * File handler that uses File storage |
|
32 */ |
|
33 class CNcdDatabaseFileHandler : CBase, public MNcdFileHandler |
|
34 { |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Creates a new file handler |
|
39 */ |
|
40 static CNcdDatabaseFileHandler* NewL( |
|
41 MNcdStorageClient& aStorageClient, |
|
42 NcdNodeClassIds::TNcdNodeClassType aDataType ); |
|
43 |
|
44 ~CNcdDatabaseFileHandler(); |
|
45 |
|
46 public: // MNcdFileHandler |
|
47 |
|
48 /** |
|
49 * Parameter aIdOrName is not used |
|
50 * |
|
51 * @see MNcdFileHandler::MoveFileL() |
|
52 */ |
|
53 void MoveFileL( const TDesC& aSourceFile, |
|
54 const TDesC& aNamespaceOrDir, const TDesC& aIdOrName, |
|
55 TBool aOverwrite ); |
|
56 |
|
57 private: |
|
58 |
|
59 CNcdDatabaseFileHandler( MNcdStorageClient& aStorageClient, |
|
60 NcdNodeClassIds::TNcdNodeClassType aDataType ); |
|
61 void ConstructL(); |
|
62 |
|
63 private: |
|
64 |
|
65 // Gets the storage. Creates it if necessary |
|
66 MNcdStorage& StorageL( const TDesC& aNamespace ); |
|
67 |
|
68 private: |
|
69 |
|
70 MNcdStorageClient& iStorageClient; |
|
71 NcdNodeClassIds::TNcdNodeClassType iDataType; |
|
72 |
|
73 }; |
|
74 |
|
75 #endif // C_NCDDATABASEFILEHANDLER_H |