CP_PIPETYPE Struct Reference

struct CP_PIPETYPE

content pipe definition

Member Data Documentation

CPresult(* CheckAvailableBytes

CPresult (* CheckAvailableBytes

Check the that specified number of bytes are available for reading or writing (depending on access type).

CPresult(* Close

CPresult (* Close

Close a content stream.

CPresult(* Create

CPresult (* Create

Create a content source and open it for writing.

CPresult(* GetPosition

CPresult (* GetPosition

Retrieve the current position relative to the start of the content.

CPresult(* GetWriteBuffer

CPresult (* GetWriteBuffer

Retrieve a buffer allocated by the pipe used to write data to the content. Client will fill buffer with output data. Note: pipe provides pointer. This function is appropriate for large writes. The client must call WriteBuffer when done it has filled the buffer with data.

CPresult(* Open

CPresult (* Open

Open a content stream for reading or writing.

CPresult(* Read

CPresult (* Read

Retrieve data of the specified size from the content stream (advance content pointer by size of data). Note: pipe client provides pointer. This function is appropriate for small high frequency reads.

CPresult(* ReadBuffer

CPresult (* ReadBuffer

Retrieve a buffer allocated by the pipe that contains the requested number of bytes. Buffer contains the next block of bytes, as specified by nSize, of the content. nSize also returns the size of the block actually read. Content pointer advances the by the returned size. Note: pipe provides pointer. This function is appropriate for large reads. The client must call ReleaseReadBuffer when done with buffer.

In some cases the requested block may not reside in contiguous memory within the pipe implementation. For instance if the pipe leverages a circular buffer then the requested block may straddle the boundary of the circular buffer. By default a pipe implementation performs a copy in this case to provide the block to the pipe client in one contiguous buffer. If, however, the client sets bForbidCopy, then the pipe returns only those bytes preceding the memory boundary. Here the client may retrieve the data in segments over successive calls.

CPresult(* RegisterCallback

CPresult (* RegisterCallback

Register a per-handle client callback with the content pipe.

CPresult(* ReleaseReadBuffer

CPresult (* ReleaseReadBuffer

Release a buffer obtained by ReadBuffer back to the pipe.

CPresult(* SetPosition

CPresult (* SetPosition

Seek to certain position in the content relative to the specified origin.

CPresult(* Write

CPresult (* Write

Write data of the specified size to the content (advance content pointer by size of data). Note: pipe client provides pointer. This function is appropriate for small high frequency writes.

CPresult(* WriteBuffer

CPresult (* WriteBuffer

Deliver a buffer obtained via GetWriteBuffer to the pipe. Pipe will write the the contents of the buffer to content and advance content pointer by the size of the buffer