MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / API_ROUTINE isc_que_events

Function API_ROUTINE isc_que_events

src/yvalve/why.cpp:2992–3026  ·  view source on GitHub ↗

Que request for event notification.

Source from the content-addressed store, hash-verified

2990
2991// Que request for event notification.
2992ISC_STATUS API_ROUTINE isc_que_events(ISC_STATUS* userStatus, isc_db_handle* dbHandle, SLONG* id,
2993 USHORT length, const UCHAR* eventsData, FPTR_EVENT_CALLBACK ast, void* arg)
2994{
2995 StatusVector status(userStatus);
2996 CheckStatusWrapper statusWrapper(&status);
2997 RefPtr<YEvents> events;
2998
2999 try
3000 {
3001 RefPtr<YAttachment> attachment(translateHandle(attachments, dbHandle));
3002
3003 RefPtr<QueCallback> callback(FB_NEW QueCallback(ast, arg));
3004 events = attachment->queEvents(&statusWrapper, callback, length, eventsData);
3005 if (events)
3006 *id = FB_API_HANDLE_TO_ULONG(events->getHandle());
3007
3008 callback->setEvents(events); // should be called in case of NULL events too
3009 if (status.getState() & IStatus::STATE_ERRORS)
3010 {
3011 return status[1];
3012 }
3013 }
3014 catch (const Exception& e)
3015 {
3016 if (events)
3017 {
3018 *id = 0;
3019 events->release();
3020 }
3021
3022 e.stuffException(&statusWrapper);
3023 }
3024
3025 return status[1];
3026}
3027
3028
3029// Get a segment from a blob opened for reading.

Callers

nothing calls this directly

Calls 8

translateHandleFunction · 0.85
FB_API_HANDLE_TO_ULONGFunction · 0.85
setEventsMethod · 0.80
queEventsMethod · 0.45
getHandleMethod · 0.45
getStateMethod · 0.45
releaseMethod · 0.45
stuffExceptionMethod · 0.45

Tested by

no test coverage detected