| 3858 | |
| 3859 | |
| 3860 | JEvents* 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 | |
| 3911 | void JRequest::receive(CheckStatusWrapper* user_status, int level, unsigned int msg_type, |
no test coverage detected