Programming Filter Function Actions

From InterBase

Go Up to Writing an External Blob Filter


When an application invokes a Blob API function on a Blob to be filtered, InterBase passes a corresponding action message to the filter function by way of the action parameter. There are eight possible actions. The following action macro definitions are declared in the ibase.h file:

#define isc_blob_filter_open

0

#define isc_blob_filter_get_segment

1

#define isc_blob_filter_close

2

#define isc_blob_filter_create

3

#define isc_blob_filter_put_segment

4

#define isc_blob_filter_alloc

5

#define isc_blob_filter_free

6

#define isc_blob_filter_seek

7

The following table lists the actions, and specifies when the filter function is invoked with each particular action. Most of the actions are the result of events that occur when an application invokes a Blob API function.

Action Constants
Action When filter is invoked with corresponding action

isc_blob_filter_open

Invoked when an application calls isc_open_blob2().

isc_blob_filter_get_segment

Invoked when an application calls isc_get_segment().

isc_blob_filter_close

Invoked when an application calls isc_close_blob().

isc_blob_filter_create

Invoked when an application calls isc_create_blob2().

isc_blob_filter_put_segment

Invoked when an application calls isc_put_segment().

isc_blob_filter_alloc

Invoked when InterBase initializes filter processing; not a result of a particular application action.

isc_blob_filter_free

Invoked when InterBase ends filter processing; not a result of a particular application action.

isc_blob_filter_seek

Reserved for internal filter use; not used by external filters.

This concludes the overview of writing Blob filters. For detailed information about filters and how to program filter function actions, as well as a reference to a filter application example, see the Embedded SQL Guide.

Advance To: