BusBoy
2
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
cpp
api
external
capi
CExternalRandomAccessFileAPI.h
Go to the documentation of this file.
1
17
#ifndef __BUSBOY_C_EXTERNAL_RANDOM_ACCESS_FILE_API_H__
18
#define __BUSBOY_C_EXTERNAL_RANDOM_ACCESS_FILE_API_H__
19
20
#include <stddef.h>
21
22
typedef
struct
CExternalRandomAccessFileSourceStruct
*
CExternalRandomAccessFileSourcePtr
;
23
24
typedef
struct
CExternalRandomAccessFileSinkStruct
*
CExternalRandomAccessFileSinkPtr
;
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
37
typedef
bool (*
BusboyRandomAccessFileReadPtr
)(
38
char
* buf,
39
size_t
num,
40
size_t
* read
41
);
42
50
typedef
bool (*
BusboyRandomAccessFileWritePtr
)(
51
char
* buf,
52
size_t
num
53
);
54
60
typedef
bool (*
BusboyRandomAccessFileGetLocationPtr
)(
61
size_t
* loc
62
);
63
69
typedef
bool (*
BusboyRandomAccessFileSetLocationPtr
)(
70
size_t
loc
71
);
72
78
typedef
bool (*
BusboyRandomAccessFileGetSizePtr
)(
79
size_t
* size
80
);
81
87
typedef
bool (*
BusboyRandomAccessFileSetSizePtr
)(
88
size_t
size
89
);
90
94
typedef
void (*
BusboyRandomAccessFileClosePtr
)();
95
96
97
struct
CExternalRandomAccessFileCallbacksStruct
{
98
BusboyRandomAccessFileReadPtr
readCallback
;
99
BusboyRandomAccessFileWritePtr
writeCallback
;
100
BusboyRandomAccessFileGetLocationPtr
getLocationCallback
;
101
BusboyRandomAccessFileSetLocationPtr
setLocationCallback
;
102
BusboyRandomAccessFileSetLocationPtr
setLocationFromEndCallback
;
103
BusboyRandomAccessFileSetLocationPtr
skipForwardCallback
;
104
BusboyRandomAccessFileSetLocationPtr
skipBackwardCallback
;
105
BusboyRandomAccessFileGetSizePtr
getSizeCallback
;
106
BusboyRandomAccessFileSetSizePtr
setSizeCallback
;
107
BusboyRandomAccessFileClosePtr
closeCallback
;
108
};
109
110
typedef
struct
CExternalRandomAccessFileCallbacksStruct
CExternalRandomAccessFileCallbacks
;
111
112
CExternalRandomAccessFileSourcePtr
CExternalRandomAccessFile_newRandomAccessFileSource
(
113
const
CExternalRandomAccessFileCallbacks
& fileCallbacks
114
);
115
116
CExternalRandomAccessFileSinkPtr
CExternalRandomAccessFile_newRandomAccessFileSink
(
117
const
CExternalRandomAccessFileCallbacks
& fileCallbacks
118
);
119
120
#ifdef __cplusplus
121
}
122
#endif
123
124
#endif
125
Tue Nov 11 2014 23:19:41
1.8.3.1
Copyright 2014 Google Inc. All rights reserved.