|
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: The header file of DevTokenUtil |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __DEVTOKENUTIL_H__ |
|
21 #define __DEVTOKENUTIL_H__ |
|
22 |
|
23 #include "DevTokenTypesEnum.h" |
|
24 #include "DevTokenCliServ.h" |
|
25 |
|
26 // Panic the client |
|
27 void PanicClient(const RMessage2& aMessage, ETokenTypeServerPanic aPanic); |
|
28 // Panic the server |
|
29 void PanicServer(ETokenTypeServerPanic aPanicCode); |
|
30 // Assert macro |
|
31 #define assert(TEST, PANIC) __ASSERT_ALWAYS(TEST, PanicServer(PANIC)) |
|
32 |
|
33 class RFs; |
|
34 |
|
35 // Length of filename buffer for store path |
|
36 const TUint KMaxFilenameLength = 60; |
|
37 |
|
38 /** |
|
39 * Files utilities used by all servers. |
|
40 |
|
41 * @lib |
|
42 * @since S60 v3.2 |
|
43 */ |
|
44 struct FileUtils |
|
45 { |
|
46 // Determine whether a file exists |
|
47 static TBool ExistsL(RFs& aFs, const TDesC& aFile); |
|
48 |
|
49 // Ensure all directories in a file's path exist, creating them if not |
|
50 static void EnsurePathL(RFs& aFs, const TDesC& aFile); |
|
51 |
|
52 // Copy a file from one location to another |
|
53 static void CopyL(RFs& aFs, const TDesC& aSouce, const TDesC& aDest); |
|
54 |
|
55 // Construct a filename in the server's private area |
|
56 static void MakePrivateFilenameL(RFs& aFs, const TDesC& aLeafName, TDes& aNameOut); |
|
57 |
|
58 // Construct a filename in the server's private area in ROM |
|
59 static void MakePrivateROMFilenameL(RFs& aFs, const TDesC& aLeafName, TDes& aNameOut); |
|
60 }; |
|
61 |
|
62 #endif // __DEVTOKENUTIL_H__ |