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
CExternalDataFileSourceAPI.h
Go to the documentation of this file.
1
17
#ifndef __BUSBOY_C_EXTERNAL_DATA_FILE_SOURCE_API_H__
18
#define __BUSBOY_C_EXTERNAL_DATA_FILE_SOURCE_API_H__
19
20
#include <stddef.h>
21
22
typedef
struct
CExternalDataFileSourceStruct
*
CExternalDataFileSourcePtr
;
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
32
typedef
char
* (*BusboyGetDataSourceBytesPtr)();
33
39
// FIXED
40
typedef
bool (*
BusboyGetDataSourceSizePtr
)(
41
size_t
* size
42
);
43
47
typedef
void (*
BusboyReleaseDataSourcePtr
)();
48
56
// FIXED
57
typedef
bool (*
BusboyDataSourceReadPtr
)(
58
char
* buf,
59
size_t
num,
60
size_t
*read
61
);
62
69
// FIXED
70
typedef
bool (*
BusboyDataSourceSkipPtr
)(
71
size_t
num,
72
size_t
*skipped
73
);
74
75
struct
CExternalDataSourceCallbacksStruct
{
76
BusboyGetDataSourceBytesPtr
getBytesCallback
;
77
BusboyGetDataSourceSizePtr
getSizeCallback
;
78
BusboyReleaseDataSourcePtr
releaseCallback
;
79
BusboyDataSourceReadPtr
readCallback
;
80
BusboyDataSourceSkipPtr
skipCallback
;
81
};
82
83
typedef
struct
CExternalDataSourceCallbacksStruct
CExternalDataSourceCallbacks
;
84
85
CExternalDataFileSourcePtr
CExternalDataFileSource_newDataFileSource
(
86
const
CExternalDataSourceCallbacks
& dataSourceCallbacks
87
);
88
89
char
*
CExternalDataFileSource_getBytes
(CExternalDataFileSourcePtr srcHandle);
90
91
size_t
CExternalDataFileSource_getSize
(CExternalDataFileSourcePtr srcHandle);
92
93
#ifdef __cplusplus
94
}
95
#endif
96
97
#endif
98
Tue Nov 11 2014 23:19:41
1.8.3.1
Copyright 2014 Google Inc. All rights reserved.