Generating an Event

Top  Previous  Next

 

Input plugins generate events to notify the main application that something has happened that may trigger various output actions.  When the plugin was opened, a pointer was passed to the flat C callback routine used for notification.  The prototype of the callback is:

typedef int (*PluginCallType)(EVENTPARMSIN *In, EVENTPARMSOUT *Out);

 

 

The EVENTPARMSIN structure fields

 

pluginID:  The pluginID that was passed to the plugin when open() was called.

 

eventType: Two event types are currently supported.  EVENT_TYPE_LOG is used only for sending messages to the application log.  EVENT_TYPE_STANDARD is used for all other events.

 

eventDataType:  Two event data types are currently supported.  EVENT_DATATYPE_TEXT indicates the data in the buffer is null terminated ASCII text.  EVENT_DATATYPE_BINARY indicates the buffer contains arbitrary binary data.

 

syncFlag:  If syncFlag is set, the event will be processed immediately rather than being queued for normal processing.  Extreme caution should be used when setting syncFlag as event processing will happen in the context of the calling thread and the call will not return until processing is complete.  System performance may be adversely affected.

 

eventDataLength:  The size in bytes of the eventData buffer.

 

eventData:  The eventData, a string or binary buffer which will be matched against the users filter rules.

 

extraData#:  extraData#Length and extraData# are currently unused, but reserved for future use.

 

 

The EVENTPARMSOUT structure fields

 

Only the standard length and version fields.