Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

buffer_api.c File Reference

Implements the Buffer related parts of the FRET API. More...

#include <assert.h>
#include "fret.h"
#include "common.h"
#include "bufferstore.h"
#include "gramstore.h"

Include dependency graph for buffer_api.c:


Functions

bool fret_putBuffer (FBuffer *pBuffer)
 Pass a buffer containing data to be analysed to the library.
bool fret_deleteBuffer (BufferId bufferId)
 Remove a buffer from the data set that may be examined by the library.
bool fret_deleteAll (void)
 Delete all stored Buffers.

Detailed Description

Implements the Buffer related parts of the FRET API.


Function Documentation

bool fret_deleteAll void   ) 
 

Delete all stored Buffers.

Delete all memory that has been allocated to Buffer storage. Allocated Buffer identifiers cannot be used again.

Parameters:
void 
Returns:
true if function completed successfully.

false if library could not free the buffers. Query cause with fret_getError().

See also:
fret_putBuffer

fret_getError

bool fret_deleteBuffer BufferId  bufferId  ) 
 

Remove a buffer from the data set that may be examined by the library.

Passes the identifier of a buffer. This buffer will be removed from the list of buffers that may be scanned. The identifier of this buffer can never be used again. Memory allocated to the buffer will also be deallocated.

Parameters:
bufferId identifies the buffer to delete.
Returns:
true if function completed successfully.

false if library could not free the buffer. Query cause with fret_getError().

See also:
fret_putBuffer

fret_getError

bool fret_putBuffer FBuffer pBuffer  ) 
 

Pass a buffer containing data to be analysed to the library.

Passes a pointer to a data buffer to the library. The length of the buffer (in bytes) is also passed. A Buffer ID is allocated to the buffer if it is accepted.

The library makes a private copy of the buffer and is responsible for its deletion when not required. Therefore, the clientīs copy of the buffer can be safely deleted.

Parameters:
pBuffer is a pointer to structure containing the location and length of the buffer. The member bufferId of the structure is set to the new Buffer ID.
Returns:
true if function completed successfully.

false if library didnīt accept the buffer. Query cause with fret_getError().

See also:
FBuffer

fret_deleteBuffer

fret_getError


Generated on Thu Jan 19 18:59:19 2006 for FRET by  doxygen 1.4.4