MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / queEvents

Method queEvents

src/jrd/jrd.cpp:3860–3908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3858
3859
3860JEvents* JAttachment::queEvents(CheckStatusWrapper* user_status, IEventCallback* callback,
3861 unsigned int length, const unsigned char* events)
3862{
3863/**************************************
3864 *
3865 * g d s _ $ q u e _ e v e n t s
3866 *
3867 **************************************
3868 *
3869 * Functional description
3870 * Que a request for event notification.
3871 *
3872 **************************************/
3873 JEvents* ev = NULL;
3874
3875 try
3876 {
3877 EngineContextHolder tdbb(user_status, this, FB_FUNCTION);
3878 check_database(tdbb);
3879
3880 try
3881 {
3882 Database* const dbb = tdbb->getDatabase();
3883 Attachment* const attachment = getHandle();
3884
3885 EventManager::init(attachment);
3886
3887 const int id = dbb->eventManager()->queEvents(attachment->att_event_session,
3888 length, events, callback);
3889
3890 ev = FB_NEW JEvents(id, getStable(), callback);
3891 ev->addRef();
3892 }
3893 catch (const Exception& ex)
3894 {
3895 transliterateException(tdbb, ex, user_status, "JAttachment::queEvents");
3896 return ev;
3897 }
3898 }
3899 catch (const Exception& ex)
3900 {
3901 ex.stuffException(user_status);
3902 return ev;
3903 }
3904
3905 successful_completion(user_status);
3906
3907 return ev;
3908}
3909
3910
3911void JRequest::receive(CheckStatusWrapper* user_status, int level, unsigned int msg_type,

Callers 2

EventMethod · 0.45
processMethod · 0.45

Calls 9

check_databaseFunction · 0.85
JEventsClass · 0.85
transliterateExceptionFunction · 0.85
successful_completionFunction · 0.85
getDatabaseMethod · 0.80
eventManagerMethod · 0.80
initFunction · 0.50
addRefMethod · 0.45
stuffExceptionMethod · 0.45

Tested by

no test coverage detected