|
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: File handler interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef M_NCDFILEHANDLER_H |
|
20 #define M_NCDFILEHANDLER_H |
|
21 |
|
22 /** |
|
23 * Helper interface for simplifying file handling in |
|
24 * operations |
|
25 */ |
|
26 class MNcdFileHandler |
|
27 { |
|
28 public: |
|
29 |
|
30 /** |
|
31 * Moves the source file to the destination. |
|
32 * The interpretation of the destination parameters depends on |
|
33 * the implementing class. Classes that use storages (both database |
|
34 * and file), should interpret them as the destination namespace and id. |
|
35 * |
|
36 * Classes that use file system normally, should interpret the parameters |
|
37 * as the destination directory and name. |
|
38 * |
|
39 * @param aSourceFile Path and name of the source file |
|
40 * @param aNamespaceOrDir Destination namespace or directory |
|
41 * @param aIdOrName Destination ID or name |
|
42 * @param aOverwrite If true, existing target file is overwritten, otherwise |
|
43 * should leave with KErrAlreadyExists |
|
44 */ |
|
45 virtual void MoveFileL( const TDesC& aSourceFile, |
|
46 const TDesC& aNamespaceOrDir, const TDesC& aIdOrName, |
|
47 TBool aOverwrite = ETrue ) = 0; |
|
48 |
|
49 /** |
|
50 * The implementations of this class CAN be deleted through this |
|
51 * interface |
|
52 */ |
|
53 virtual ~MNcdFileHandler() |
|
54 { |
|
55 } |
|
56 }; |
|
57 |
|
58 #endif // M_NCDFILEHANDLER_H |