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
CExternalDatasetAPI.h
Go to the documentation of this file.
1
17
#ifndef __BUSBOY_C_EXTERNAL_DATASET_API_H__
18
#define __BUSBOY_C_EXTERNAL_DATASET_API_H__
19
20
#include <stddef.h>
21
#include "
CExternalDataFileAPI.h
"
22
#include "
CExternalRandomAccessFileAPI.h
"
23
24
typedef
struct
CExternalDatasetStruct
*
CExternalDatasetPtr
;
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
35
typedef
CExternalDataFilePtr
(*
CExternalFindFunctionPtr
) (
36
const
char
* serializedKey
37
);
38
46
typedef
bool (*
CExternalAddFunctionPtr
) (
47
CExternalDataFilePtr
file
48
);
49
53
typedef
const
char
* (*CExternalFileNameFunctionPtr) (
54
const
char
* serializedKey
55
);
56
60
typedef
bool (*
CExternalQueryOnlyFunctionPtr
) ();
61
62
67
typedef
CExternalRandomAccessFileSourcePtr
(*
CExternalRandomAccessSourceFunctionPtr
) (
68
const
char
* serializedKey
69
);
70
75
typedef
CExternalRandomAccessFileSinkPtr
(*
CExternalRandomAccessSinkFunctionPtr
) (
76
const
char
* serializedKey
77
);
78
79
80
struct
CExternalDatasetCallbacksStruct
{
81
CExternalFindFunctionPtr
findFileCallback
;
82
CExternalAddFunctionPtr
addFileCallback
;
83
CExternalFileNameFunctionPtr
getFileNameCallback
;
84
CExternalQueryOnlyFunctionPtr
isQueryOnlyCallback
;
85
CExternalRandomAccessSourceFunctionPtr
randomAccessSourceCallback
;
86
CExternalRandomAccessSinkFunctionPtr
randomAccessSinkCallback
;
87
};
88
89
typedef
struct
CExternalDatasetCallbacksStruct
CExternalDatasetCallbacks
;
90
91
92
CExternalDatasetPtr
CExternalDataset_newDataset
(
93
const
char
* name,
94
const
CExternalDatasetCallbacks
&callbacks
95
);
96
97
const
char
*
CExternalDataset_getName
(CExternalDatasetPtr datasetHandle);
98
99
const
char
*
CExternalDataset_getSerializedDataset
(CExternalDatasetPtr datasetHandle);
100
101
void
CExternalDataset_setSerializedDataset
(
102
CExternalDatasetPtr datasetHandle,
103
const
char
* serializedDataset
104
);
105
106
void
CExternalDataset_addDataFile
(
107
CExternalDatasetPtr datasetHandle,
108
CExternalDataFilePtr
fileHandle
109
);
110
111
CExternalDataFilePtr
CExternalDataset_getDataFile
(
112
CExternalDatasetPtr datasetHandle,
113
int
index
114
);
115
116
size_t
CExternalDataset_getFileCount
(CExternalDatasetPtr datasetHandle);
117
118
#ifdef __cplusplus
119
}
120
#endif
121
122
#endif
123
Tue Nov 11 2014 23:19:41
1.8.3.1
Copyright 2014 Google Inc. All rights reserved.