Que request for event notification.
| 2990 | |
| 2991 | // Que request for event notification. |
| 2992 | ISC_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. |
nothing calls this directly
no test coverage detected