svn-gvsig-desktop / trunk / libraries / libjni-mrsid / include / support / lt_ioCallbackStreamTypes.h @ 3539
History | View | Annotate | Download (3.18 KB)
1 |
/* $Id: lt_ioCallbackStreamTypes.h 3539 2006-01-09 12:23:20Z nacho $ */
|
---|---|
2 |
/* //////////////////////////////////////////////////////////////////////////
|
3 |
// //
|
4 |
// This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, //
|
5 |
// Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
|
6 |
// prohibited. Access to and use of this code is permitted only under //
|
7 |
// license from LizardTech, Inc. Portions of the code are protected by //
|
8 |
// US and foreign patents and other filings. All Rights Reserved. //
|
9 |
// //
|
10 |
////////////////////////////////////////////////////////////////////////// */
|
11 |
/* PUBLIC - C */
|
12 |
|
13 |
#ifndef LT_IO_CALLBACK_STREAM_TYPES_H
|
14 |
#define LT_IO_CALLBACK_STREAM_TYPES_H
|
15 |
|
16 |
#include "lt_base.h" |
17 |
#include "lt_lib_io.h" |
18 |
|
19 |
#if defined(LT_COMPILER_MS)
|
20 |
#pragma warning(push,4) |
21 |
#endif
|
22 |
|
23 |
#ifdef LT_CPLUSPLUS
|
24 |
extern "C" { |
25 |
#endif
|
26 |
|
27 |
|
28 |
/**
|
29 |
* opaque pointer to an LTIOStreamInf
|
30 |
*/
|
31 |
typedef void* LTIOStreamH; |
32 |
|
33 |
/**
|
34 |
* @name types specifically for use with LTIOCallbackStream
|
35 |
*/
|
36 |
/*@{*/
|
37 |
|
38 |
/**
|
39 |
* typedef for callback stream open function
|
40 |
*
|
41 |
* The parameter is a void* (user data).
|
42 |
*
|
43 |
* A status code is returned.
|
44 |
*/
|
45 |
typedef LT_STATUS (*LTIOCallbackStream_Open)(void*); |
46 |
|
47 |
/**
|
48 |
* typedef for callback stream close function
|
49 |
*
|
50 |
* The parameter is a void* (user data).
|
51 |
*
|
52 |
* A status code is returned.
|
53 |
*/
|
54 |
typedef LT_STATUS (*LTIOCallbackStream_Close)(void*); |
55 |
|
56 |
/**
|
57 |
* typedef for callback stream read function
|
58 |
*
|
59 |
* The parameters are a void* (user data), a pointer to the buffer to
|
60 |
* read from, and the number of bytes to read.
|
61 |
*
|
62 |
* The number of bytes actually read is returned.
|
63 |
*/
|
64 |
typedef lt_uint32 (*LTIOCallbackStream_Read)(void*, lt_uint8*, lt_uint32); |
65 |
|
66 |
/**
|
67 |
* typedef for callback stream write function
|
68 |
*
|
69 |
* The parameters are a void* (user data), a pointer to the buffer to
|
70 |
* write to, and the number of bytes to write.
|
71 |
*
|
72 |
* The number of bytes actually written is returned.
|
73 |
*/
|
74 |
typedef lt_uint32 (*LTIOCallbackStream_Write)(void*, const lt_uint8*, lt_uint32); |
75 |
|
76 |
/**
|
77 |
* typedef for callback stream seek function
|
78 |
*
|
79 |
* The parameters are a void* (user data), the number of bytes to
|
80 |
* seek, and the seek direction.
|
81 |
*
|
82 |
* A status code is returned.
|
83 |
*/
|
84 |
typedef LT_STATUS (*LTIOCallbackStream_Seek)(void*, lt_int64, LTIOSeekDir); |
85 |
|
86 |
/**
|
87 |
* typedef for callback stream tell function
|
88 |
*
|
89 |
* The parameter is a void* (user data).
|
90 |
*
|
91 |
* The current offset is returned.
|
92 |
*/
|
93 |
typedef lt_int64 (*LTIOCallbackStream_Tell)(void*); |
94 |
|
95 |
/**
|
96 |
* typedef for callback stream isEOF function
|
97 |
*
|
98 |
* The parameter is a void* (user data).
|
99 |
*
|
100 |
* A boolean value (0 or 1) is returned.
|
101 |
*/
|
102 |
typedef lt_uint8 (*LTIOCallbackStream_IsEOF)(void*); |
103 |
|
104 |
/**
|
105 |
* typedef for callback stream isOpen function
|
106 |
*
|
107 |
* The parameter is a void* (user data).
|
108 |
*
|
109 |
* A boolean value (0 or 1) is returned.
|
110 |
*/
|
111 |
typedef lt_uint8 (*LTIOCallbackStream_IsOpen)(void*); |
112 |
|
113 |
/**
|
114 |
* typedef for callback stream duplicate function
|
115 |
*
|
116 |
* The parameter is a void* (user data).
|
117 |
*
|
118 |
* A pointer to the new stream is returned.
|
119 |
*/
|
120 |
typedef LTIOStreamH (*LTIOCallbackStream_Duplicate)(void*); |
121 |
|
122 |
/*@}*/
|
123 |
|
124 |
|
125 |
#ifdef LT_CPLUSPLUS
|
126 |
} |
127 |
#endif
|
128 |
|
129 |
#if defined(LT_COMPILER_MS)
|
130 |
#pragma warning(pop)
|
131 |
#endif
|
132 |
|
133 |
#endif
|