Patches: Browse | Submit New | Admin

[#7512] Added event firebird handling

Date:
2007-01-01 11:09
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Added event firebird handling

Detailed description
I've added extra functions to fb extension library to handle firebird events.

The new functions are:

rb_define_method(rb_cFbConnection, "cancel_events", connection_cancel_events, 0);
rb_define_method(rb_cFbConnection, "que_events", connection_que_events, 0);
rb_define_method(rb_cFbConnection, "wait_for_events", connection_wait_for_events, 0);
rb_define_method(rb_cFbConnection, "event_counts", connection_event_counts, 0);
rb_define_method(rb_cFbConnection, "event_block", connection_event_block, 1);

They try ot mimic the firebird api functions.

cancel_events: will cancel any registered events before;
event_block: will accept an array of strings to be registered to listen, up to 15 strings can be specified.
que_events: will listen for events asynchronosly, an instance variable @_events_received will be incremented every time
the server notifys event ocurrences.
event_counts : will return an array of integers correspndig to the submitted array of strings passed to event_block,
where if the value is bigger than zero mean that the event on that array position was posted that number of times.
wait_for_events: will wait for events synchronosly, that mean will not return till any registered event occurred.

An example of usage will follow soon !

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
fb.c fb.c with code to manage firebird events added Download

Changes:

Field Old Value Date By
File Added1066: fb.c2007-01-01 11:09None