Main Page | Modules | Data Structures | Data Fields | Related Pages | Examples

vbi_export Struct Reference
[Internal export module interface]


Data Fields

vbi_export_class_class
char * errstr
const char * name
char * network
char * creator
vbi_bool reveal
enum _vbi_export_target target
union {
   FILE *   fp
   int   fd
_handle
_vbi_export_write_fn * _write
struct {
   char *   data
   size_t   offset
   size_t   capacity
buffer
vbi_bool write_error

Detailed Description

Structure representing an export module instance, part of the private export module interface.

Export modules can read, but do not normally write its fields, as they are maintained by the public libzvbi export functions.

Examples:

src/exp-templ.c.


Field Documentation

vbi_export_class* vbi_export::_class
 

Points back to export module description.

char* vbi_export::errstr
 

Frontend private.

const char* vbi_export::name
 

If target is VBI_EXPORT_FILE the name of the file we are writing to, as supplied by the client. Otherwise NULL. This is intended for debugging and error messages.

char* vbi_export::network
 

Generic option: Network name or NULL.

char* vbi_export::creator
 

Generic option: Creator name [by default "libzvbi"] or NULL.

vbi_bool vbi_export::reveal
 

Generic option: Reveal hidden characters.

enum _vbi_export_target vbi_export::target
 

The export target. Note _vbi_export_grow_buffer_space() may change the target from TARGET_MEM to TARGET_ALLOC if the buffer supplied by the application is too small.

union { ... } vbi_export::_handle
 

If target is VBI_EXPORT_TARGET_FP or VBI_EXPORT_TARGET_FD the file pointer or file descriptor supplied by the client. If VBI_EXPORT_TARGET_FILE the file descriptor of the file we opened. Otherwise undefined.

Private field. Not to be accessed by export modules.

_vbi_export_write_fn* vbi_export::_write
 

Function to write data into _handle.

Private field. Not to be accessed by export modules.

char* vbi_export::data
 

Pointer to the start of the buffer in memory. NULL if capacity is zero.

size_t vbi_export::offset
 

The number of bytes written into the buffer so far. Must be <= capacity.

size_t vbi_export::capacity
 

Number of bytes we can store in the buffer, may be zero.

Call _vbi_export_grow_buffer_space() to increase the capacity. Keep in mind this may change the data pointer.

struct { ... } vbi_export::buffer
 

Output buffer. Export modules can write into this buffer directly after ensuring sufficient capacity, and/or call the vbi_export_putc() etc functions. Keep in mind these functions may call realloc(), changing the data pointer, and/or vbi_export_flush(), changing the offset.

vbi_bool vbi_export::write_error
 

A write error occurred (like ferror()).


Generated on Mon Jun 9 21:44:14 2008 for ZVBI Library by doxygen 1.3.5