|
1 /* |
|
2 * Copyright (c) 2002 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 the License "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 NWX_OSU_FILE_H |
|
20 #define NWX_OSU_FILE_H |
|
21 |
|
22 #ifdef __cplusplus |
|
23 extern "C" { |
|
24 #endif |
|
25 |
|
26 |
|
27 /* |
|
28 ** Includes |
|
29 */ |
|
30 |
|
31 #include "nwx_defs.h" |
|
32 #include "nwx_datastruct.h" |
|
33 #include "nwx_time.h" |
|
34 #include "nwx_osu.h" |
|
35 #include "BrsrStatusCodes.h" |
|
36 |
|
37 /* |
|
38 ** Type Definitions |
|
39 */ |
|
40 |
|
41 /* |
|
42 ** These OSU types should be opaque to the user. |
|
43 ** They are returned from, and passed to, the OSU functions |
|
44 ** but they are never manipulated directly by the user. |
|
45 */ |
|
46 |
|
47 |
|
48 #define NW_INVALID_FILE_HANDLE ((void *)0xFFFFFFFF) |
|
49 |
|
50 |
|
51 typedef struct { |
|
52 NW_Time_t creationTime; |
|
53 NW_Time_t lastAccessTime; |
|
54 NW_Time_t lastWriteTime; |
|
55 NW_Uint32 fileSize; |
|
56 } NW_Osu_FileInfo_t; |
|
57 |
|
58 /* |
|
59 ** Global Function Declarations |
|
60 */ |
|
61 |
|
62 /* create a new file and open it for write access */ |
|
63 NW_Osu_File_t NW_Osu_CreateNewFile(const NW_Ucs2 *name); |
|
64 |
|
65 /* close an open file */ |
|
66 void NW_Osu_CloseFile(NW_Osu_File_t handle); |
|
67 |
|
68 /* write bytes to a file */ |
|
69 TBrowserStatusCode NW_Osu_WriteFile(NW_Osu_File_t handle, NW_Byte *buffer, |
|
70 const NW_Uint32 numToWrite); |
|
71 |
|
72 /* delete an existing file */ |
|
73 TBrowserStatusCode NW_Osu_Delete(const NW_Ucs2 *pathname); |
|
74 |
|
75 |
|
76 #ifdef __cplusplus |
|
77 } /* extern "C" */ |
|
78 #endif |
|
79 |
|
80 #endif /*NWX_OSU_FILE_H*/ |
|
81 |