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

Go to the source code of this file.

Classes

struct  CExternalRandomAccessFileCallbacksStruct
 

Typedefs

typedef struct
CExternalRandomAccessFileSourceStruct
CExternalRandomAccessFileSourcePtr
 Copyright 2014 Google Inc. More...
 
typedef struct
CExternalRandomAccessFileSinkStruct
CExternalRandomAccessFileSinkPtr
 
typedef bool(* BusboyRandomAccessFileReadPtr )(char *buf, size_t num, size_t *read)
 Function type for callback to read the next chunk of a file. More...
 
typedef bool(* BusboyRandomAccessFileWritePtr )(char *buf, size_t num)
 Function type for callback to write the next chunk of a file. More...
 
typedef bool(* BusboyRandomAccessFileGetLocationPtr )(size_t *loc)
 Function type for callback to get current file pointer location Returns true if success. More...
 
typedef bool(* BusboyRandomAccessFileSetLocationPtr )(size_t loc)
 Function type for callback to set current file pointer location Returns true if success. More...
 
typedef bool(* BusboyRandomAccessFileGetSizePtr )(size_t *size)
 Function type for callback to get file size Returns true if success. More...
 
typedef bool(* BusboyRandomAccessFileSetSizePtr )(size_t size)
 Function type for callback to set file size Returns true if success. More...
 
typedef void(* BusboyRandomAccessFileClosePtr )()
 Function type for callback to close file. More...
 
typedef struct
CExternalRandomAccessFileCallbacksStruct 
CExternalRandomAccessFileCallbacks
 

Functions

CExternalRandomAccessFileSourcePtr CExternalRandomAccessFile_newRandomAccessFileSource (const CExternalRandomAccessFileCallbacks &fileCallbacks)
 Copyright 2014 Google Inc. More...
 
CExternalRandomAccessFileSinkPtr CExternalRandomAccessFile_newRandomAccessFileSink (const CExternalRandomAccessFileCallbacks &fileCallbacks)
 Copyright 2014 Google Inc. More...
 

Typedef Documentation

typedef void(* BusboyRandomAccessFileClosePtr)()

Function type for callback to close file.

typedef bool(* BusboyRandomAccessFileGetLocationPtr)(size_t *loc)

Function type for callback to get current file pointer location Returns true if success.

Parameters
locpointer to write file pointer location
typedef bool(* BusboyRandomAccessFileGetSizePtr)(size_t *size)

Function type for callback to get file size Returns true if success.

Parameters
sizepointer to write file size
typedef bool(* BusboyRandomAccessFileReadPtr)(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(* BusboyRandomAccessFileSetLocationPtr)(size_t loc)

Function type for callback to set current file pointer location Returns true if success.

Parameters
locfile pointer location
typedef bool(* BusboyRandomAccessFileSetSizePtr)(size_t size)

Function type for callback to set file size Returns true if success.

Parameters
sizefile size
typedef bool(* BusboyRandomAccessFileWritePtr)(char *buf, size_t num)

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

Returns number of bytes actually written. Returns true if success

Parameters
bufarray to write data from
numberof bytes to write

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

CExternalRandomAccessFileSinkPtr CExternalRandomAccessFile_newRandomAccessFileSink ( const CExternalRandomAccessFileCallbacks 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.

CExternalRandomAccessFileSourcePtr CExternalRandomAccessFile_newRandomAccessFileSource ( const CExternalRandomAccessFileCallbacks 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.