BusBoy  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Typedefs | Functions
CExternalDataFileSourceAPI.h File Reference
#include <stddef.h>

Go to the source code of this file.

Classes

struct  CExternalDataSourceCallbacksStruct
 

Typedefs

typedef struct
CExternalDataFileSourceStruct
CExternalDataFileSourcePtr
 Copyright 2014 Google Inc. More...
 
typedef char *(* BusboyGetDataSourceBytesPtr )()
 Function type for callback to get bytes of a file. More...
 
typedef bool(* BusboyGetDataSourceSizePtr )(size_t *size)
 Function type for callback to get size of a file. More...
 
typedef void(* BusboyReleaseDataSourcePtr )()
 Function type for callback to release file resources. More...
 
typedef bool(* BusboyDataSourceReadPtr )(char *buf, size_t num, size_t *read)
 Function type for callback to read the next chunk of a file. More...
 
typedef bool(* BusboyDataSourceSkipPtr )(size_t num, size_t *skipped)
 Function type for callback to skip forward in a file Returns true if success. More...
 
typedef struct
CExternalDataSourceCallbacksStruct 
CExternalDataSourceCallbacks
 

Functions

CExternalDataFileSourcePtr CExternalDataFileSource_newDataFileSource (const CExternalDataSourceCallbacks &dataSourceCallbacks)
 Copyright 2014 Google Inc. More...
 
char * CExternalDataFileSource_getBytes (CExternalDataFileSourcePtr srcHandle)
 
size_t CExternalDataFileSource_getSize (CExternalDataFileSourcePtr srcHandle)
 

Typedef Documentation

typedef bool(* BusboyDataSourceReadPtr)(char *buf, size_t num, size_t *read)

Function type for callback to read the next chunk of a file.

Returns true if success

Parameters
bufarray to read data into
nummaximum number of bytes to read
readpointer to write number of bytes actually read
typedef bool(* BusboyDataSourceSkipPtr)(size_t num, size_t *skipped)

Function type for callback to skip forward in a file Returns true if success.

Parameters
numnumber of bytes to skip
skippedpointer to write number of bytes actually skipped
typedef char*(* BusboyGetDataSourceBytesPtr)()

Function type for callback to get bytes of a file.

Returns NULL on error

typedef bool(* BusboyGetDataSourceSizePtr)(size_t *size)

Function type for callback to get size of a file.

Returns true if success

Parameters
sizepointer to write file size
typedef void(* BusboyReleaseDataSourcePtr)()

Function type for callback to release file resources.

Copyright 2014 Google Inc.

All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

char* CExternalDataFileSource_getBytes ( CExternalDataFileSourcePtr  srcHandle)
size_t CExternalDataFileSource_getSize ( CExternalDataFileSourcePtr  srcHandle)
CExternalDataFileSourcePtr CExternalDataFileSource_newDataFileSource ( const CExternalDataSourceCallbacks callbacks)

Copyright 2014 Google Inc.

All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2014 Google Inc. All rights reserved.