VirtualBox

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

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

Imported http://svn.netlabs.org/repos/libc/trunk/kStuff, revision 3612.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 2.9 KB
Line 
1/* $Id: kRdr.h 2 2007-11-16 16:07:14Z bird $ */
2/** @file
3 * kRdr - The File Provider.
4 */
5
6/*
7 * Copyright (c) 2006-2007 knut st. osmundsen <[email protected]>
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/** @defgroup grp_kRdr kRdr - The File Provider
34 * @{ */
35
36/** @def KRDR_DECL
37 * Declares a kRdr function according to build context.
38 * @param type The return type.
39 */
40#if defined(KRDR_BUILDING_DYNAMIC)
41# define KRDR_DECL(type) K_DECL_EXPORT(type)
42#elif defined(KRDR_BUILT_DYNAMIC)
43# define KRDR_DECL(type) K_DECL_IMPORT(type)
44#else
45# define KRDR_DECL(type) type
46#endif
47
48#ifdef __cplusplus
49extern "C" {
50#endif
51
52KRDR_DECL(int) kRdrOpen( PPKRDR ppRdr, const char *pszFilename);
53KRDR_DECL(int) kRdrClose( PKRDR pRdr);
54KRDR_DECL(int) kRdrRead( PKRDR pRdr, void *pvBuf, KSIZE cb, KFOFF off);
55KRDR_DECL(int) kRdrAllMap( PKRDR pRdr, const void **ppvBits);
56KRDR_DECL(int) kRdrAllUnmap( PKRDR pRdr, const void *pvBits);
57KRDR_DECL(KFOFF) kRdrSize( PKRDR pRdr);
58KRDR_DECL(KFOFF) kRdrTell( PKRDR pRdr);
59KRDR_DECL(const char *) kRdrName( PKRDR pRdr);
60KRDR_DECL(KIPTR) kRdrNativeFH( PKRDR pRdr);
61KRDR_DECL(KSIZE) kRdrPageSize( PKRDR pRdr);
62KRDR_DECL(int) kRdrMap( PKRDR pRdr, void **ppvBase, KU32 cSegments, PCKLDRSEG paSegments, KBOOL fFixed);
63KRDR_DECL(int) kRdrRefresh( PKRDR pRdr, void *pvBase, KU32 cSegments, PCKLDRSEG paSegments);
64KRDR_DECL(int) kRdrProtect( PKRDR pRdr, void *pvBase, KU32 cSegments, PCKLDRSEG paSegments, KBOOL fUnprotectOrProtect);
65KRDR_DECL(int) kRdrUnmap( PKRDR pRdr, void *pvBase, KU32 cSegments, PCKLDRSEG paSegments);
66KRDR_DECL(void) kRdrDone( PKRDR pRdr);
67
68KRDR_DECL(int) kRdrBufOpen(PPKRDR ppRdr, const char *pszFilename);
69KRDR_DECL(int) kRdrBufWrap(PPKRDR ppRdr, PKRDR pRdr, KBOOL fCloseIt);
70KRDR_DECL(KBOOL) kRdrBufIsBuffered(PKRDR pRdr);
71KRDR_DECL(int) kRdrBufLine(PKRDR pRdr, char *pszLine, KSIZE cbLine);
72KRDR_DECL(int) kRdrBufLineEx(PKRDR pRdr, char *pszLine, KSIZE *pcbLine);
73KRDR_DECL(const char *) kRdrBufLineQ(PKRDR pRdr);
74
75#ifdef __cplusplus
76}
77#endif
78
79/** @} */
80
81#endif
82
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette