BFChannel Class Reference
Description
An abstract base class the the developer must derive from in order to provide a parameter to the BFSecureRequest::SetOption(FileOptions option,BFChannel * channel) method. The developer is free to implement Read, Write, etc. however they see fit. The prototypical example of using a BFChannel is the processing of documents that reside in a database or some other location not accessable through the file system.
#include <secureapi.h>
List of all members.
Public Member Functions |
virtual long | Read (void *buffer, BFINT32 count, BFINT64 position)=0 |
virtual void | Write (void *buffer, BFINT32 count, BFINT64 position)=0 |
virtual BFINT64 | Size ()=0 |
virtual long | Supports ()=0 |
virtual void | Close ()=0 |
virtual void | Truncate (BFINT64 size)=0 |
Member Function Documentation
virtual long BFChannel::Read |
( |
void * |
buffer, |
|
|
BFINT32 |
count, |
|
|
BFINT64 |
position | |
|
) |
| | [pure virtual] |
Member function that reads bytes from the channel.
- Parameters:
-
| buffer | The buffer to read bytes into |
| count | Number of bytes to read |
| position | Offset in the file the bytes should be read at |
- Returns:
- The number of bytes actually read. A number less than count or 0 means the end of file has been reached.
virtual void BFChannel::Write |
( |
void * |
buffer, |
|
|
BFINT32 |
count, |
|
|
BFINT64 |
position | |
|
) |
| | [pure virtual] |
Member function that writes bytes to the channel.
- Parameters:
-
| buffer | The buffer containing the bytes to write |
| count | Number of bytes to write |
| position | Offset in the file the bytes should be written to |
virtual BFINT64 BFChannel::Size |
( |
|
) |
[pure virtual] |
Member function that provides the size of the channel.
- Returns:
- The number of bytes in the file.
virtual long BFChannel::Supports |
( |
|
) |
[pure virtual] |
Member function that returns information about what features this channel supports.
- Returns:
- BFCHANNELCANREAD, BFCHANNELCANWRITE or both ORed together
virtual void BFChannel::Close |
( |
|
) |
[pure virtual] |
Member function that closes the channel. The developer is gaurenteed that no other calls will be made to the channel after this call is made.
virtual void BFChannel::Truncate |
( |
BFINT64 |
size |
) |
[pure virtual] |
Member function that truncates the channel.
The documentation for this class was generated from the following file: