source: trunk/kStuff/include/k/kRdr.h@ 3543

Last change on this file since 3543 was 3543, checked in by bird, 18 years ago

kRdr hacking.

  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1/* $Id: kRdr.h 3543 2007-08-25 06:10:29Z bird $ */
2/** @file
3 * kRdr - The File Provider.
4 */
5
6/*
7 * Copyright (c) 2006-2007 knut st. osmundsen <bird-src-spam@anduin.net>
8 *
9 * This file is part of kStuff.
10 *
11 * kStuff is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License as published
13 * by the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * kStuff is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with kStuff; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 *
25 */
26
27#ifndef ___kRdr_h___
28#define ___kRdr_h___
29
30#include <k/kDefs.h>
31#include <k/kTypes.h>
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37
38/** @defgroup grp_kRdr kRdr - The File Provider
39 * @{ */
40
41/** Pointer to a file provider instance. */
42typedef struct KRDR *PKRDR;
43/** Pointer to a file provider instance pointer. */
44typedef struct KRDR **PPKRDR;
45
46int kRdrOpen(PPKRDR ppRdr, const char *pszFilename);
47int kRdrOpenBuffered(PPKRDR ppRdr, const char *pszFilename);
48int kRdrClose( PKRDR pRdr);
49int kRdrRead( PKRDR pRdr, void *pvBuf, KSIZE cb, KFOFF off);
50int kRdrAllMap( PKRDR pRdr, const void **ppvBits);
51int kRdrAllUnmap(PKRDR pRdr, const void *pvBits);
52KFOFF kRdrSize( PKRDR pRdr);
53KFOFF kRdrTell( PKRDR pRdr);
54const char *kRdrName(PKRDR pRdr);
55KIPTR kRdrNativeFH(PKRDR pRdr);
56KSIZE kRdrPageSize(PKRDR pRdr);
57#ifndef ___k_kLdr___
58int kRdrMap( PKRDR pRdr, void **ppvBase, KU32 cSegments, PCKLDRSEG paSegments, unsigned fFixed);
59int kRdrRefresh( PKRDR pRdr, void *pvBase, KU32 cSegments, PCKLDRSEG paSegments);
60int kRdrProtect( PKRDR pRdr, void *pvBase, KU32 cSegments, PCKLDRSEG paSegments, unsigned fUnprotectOrProtect);
61int kRdrUnmap( PKRDR pRdr, void *pvBase, KU32 cSegments, PCKLDRSEG paSegments);
62#endif /* !___k_kLdr___ */
63void kRdrDone( PKRDR pRdr);
64
65/** @} */
66
67#ifdef __cplusplus
68}
69#endif
70
71#endif
72
Note: See TracBrowser for help on using the repository browser.