1 |
/* |
2 |
* libhfs - library for reading and writing Macintosh HFS volumes |
3 |
* Copyright (C) 1996-1998 Robert Leslie |
4 |
* |
5 |
* This program is free software; you can redistribute it and/or modify |
6 |
* it under the terms of the GNU General Public License as published by |
7 |
* the Free Software Foundation; either version 2 of the License, or |
8 |
* (at your option) any later version. |
9 |
* |
10 |
* This program is distributed in the hope that it will be useful, |
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
* GNU General Public License for more details. |
14 |
* |
15 |
* You should have received a copy of the GNU General Public License |
16 |
* along with this program; if not, write to the Free Software |
17 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
18 |
* |
19 |
*/ |
20 |
|
21 |
/* |
22 |
* NAME: os->open() |
23 |
* DESCRIPTION: open and lock a new descriptor from the given path and mode |
24 |
*/ |
25 |
int hfsp_os_open(void **priv, const void *devicehandle, int mode); |
26 |
|
27 |
/* |
28 |
* NAME: os->close() |
29 |
* DESCRIPTION: close an open descriptor |
30 |
*/ |
31 |
int hfsp_os_close(void **priv); |
32 |
|
33 |
/* |
34 |
* NAME: os->same() |
35 |
* DESCRIPTION: return 1 iff path is same as the open descriptor |
36 |
*/ |
37 |
int hfsp_os_same(void **priv, const char *path); |
38 |
|
39 |
|
40 |
/** Offset that is silently used by os_seek. |
41 |
* Needed to transparaently support things like partitions */ |
42 |
/*extern APPLEUInt64 os_offset;*/ |
43 |
uint64 hfsp_get_offset(void **priv); |
44 |
void hfsp_set_offset(void **priv, uint64 ofs); |
45 |
|
46 |
/* |
47 |
* NAME: os->seek() |
48 |
* DESCRIPTION: set a descriptor's seek pointer (offset in blocks) |
49 |
*/ |
50 |
uint64 hfsp_os_seek(void **priv, uint64 offset, int blksize_bits); |
51 |
|
52 |
/* |
53 |
* NAME: os->read() |
54 |
* DESCRIPTION: read blocks from an open descriptor |
55 |
*/ |
56 |
unsigned long hfsp_os_read(void **priv, void *buf, unsigned long len, int blksize_bits); |
57 |
|
58 |
/* |
59 |
* NAME: os->write() |
60 |
* DESCRIPTION: write blocks to an open descriptor |
61 |
*/ |
62 |
unsigned long hfsp_os_write(void **priv, const void *buf, unsigned long len, int blksize_bits); |