![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Public Member Functions | |
| QFirebirdEventSubscription (QFirebirdDriver *drv, IAttachment *att, const QString &eventName) | |
| void | addRef () override |
| int | release () override |
| void | eventCallbackFunction (unsigned length, const unsigned char *data) override |
| void | stop () |
| QFirebirdEventSubscription (QFirebirdDriver *drv, IAttachment *att, const QString &eventName) | |
| void | addRef () override |
| int | release () override |
| void | eventCallbackFunction (unsigned length, const unsigned char *data) override |
| void | stop () |
Public Attributes | |
| QString | name |
| QFirebirdDriver * | driver = nullptr |
| IAttachment * | attachment = nullptr |
| IEvents * | events = nullptr |
| ISC_UCHAR * | eventBuffer = nullptr |
| ISC_UCHAR * | resultBuffer = nullptr |
| unsigned | bufferLength = 0 |
| bool | first = true |
| std::atomic< int > | counter = 0 |
| std::mutex | mutex |
Event notification support (OO API)
Follows the pattern from Firebird's examples/interfaces/08.events.cpp:
Definition at line 63 of file qsql_firebird.cpp.
|
inline |
Definition at line 67 of file qsql_firebird.cpp.
References QFirebirdEventSubscription(), bufferLength, and driver.
Referenced by QFirebirdEventSubscription().
|
inline |
Definition at line 67 of file qsql_firebird.cpp.
|
inlineoverride |
Definition at line 77 of file qsql_firebird.cpp.
Referenced by eventCallbackFunction().
|
inlineoverride |
Definition at line 77 of file qsql_firebird.cpp.
|
inlineoverride |
IEventCallback — called on Firebird's internal event thread. Holds a self-reference for the duration so the owner thread's stop()/ release() cannot delete the subscription (and free resultBuffer) while this callback is still running. The mutex serialises the resultBuffer write against qHandleEventNotification's read on the owner thread, and covers the driver-pointer use: stop() clears the pointer under the same mutex, so the driver cannot be destroyed between the read and the invokeMethod. The queued invokeMethod only posts an event — it neither blocks nor re-enters Firebird — so holding the mutex across it cannot deadlock with the re-arm lock-ordering constraint.
Definition at line 98 of file qsql_firebird.cpp.
References addRef(), bufferLength, driver, and release().
|
inlineoverride |
IEventCallback — called on Firebird's internal event thread. Holds a self-reference for the duration so the owner thread's stop()/ release() cannot delete the subscription (and free resultBuffer) while this callback is still running. The mutex serialises the resultBuffer write against qHandleEventNotification's read on the owner thread, and covers the driver-pointer use: stop() clears the pointer under the same mutex, so the driver cannot be destroyed between the read and the invokeMethod. The queued invokeMethod only posts an event — it neither blocks nor re-enters Firebird — so holding the mutex across it cannot deadlock with the re-arm lock-ordering constraint.
Definition at line 98 of file qsql_firebird.cpp.
|
inlineoverride |
Definition at line 78 of file qsql_firebird.cpp.
Referenced by eventCallbackFunction(), and QFirebirdDriver::unsubscribeFromNotification().
|
inlineoverride |
Definition at line 78 of file qsql_firebird.cpp.
|
inline |
Disconnect from the driver so the callback no longer posts to it, and release the IEvents handle (no cancel — avoids Firebird internal lock contention that causes crashes on Windows). Clearing the pointer under the mutex waits out any in-flight callback that already loaded it, so after stop() returns the driver can be destroyed safely.
Definition at line 124 of file qsql_firebird.cpp.
References driver.
Referenced by QFirebirdDriver::unsubscribeFromNotification().
|
inline |
Disconnect from the driver so the callback no longer posts to it, and release the IEvents handle (no cancel — avoids Firebird internal lock contention that causes crashes on Windows). Clearing the pointer under the mutex waits out any in-flight callback that already loaded it, so after stop() returns the driver can be destroyed safely.
Definition at line 124 of file qsql_firebird.cpp.
| IAttachment * QFirebirdEventSubscription::attachment = nullptr |
Definition at line 139 of file qsql_firebird.cpp.
| unsigned QFirebirdEventSubscription::bufferLength = 0 |
Definition at line 143 of file qsql_firebird.cpp.
Referenced by QFirebirdEventSubscription(), and eventCallbackFunction().
| std::atomic< int > QFirebirdEventSubscription::counter = 0 |
Definition at line 145 of file qsql_firebird.cpp.
| QFirebirdDriver * QFirebirdEventSubscription::driver = nullptr |
Definition at line 137 of file qsql_firebird.cpp.
Referenced by QFirebirdEventSubscription(), eventCallbackFunction(), and stop().
| ISC_UCHAR * QFirebirdEventSubscription::eventBuffer = nullptr |
Definition at line 141 of file qsql_firebird.cpp.
| IEvents * QFirebirdEventSubscription::events = nullptr |
Definition at line 140 of file qsql_firebird.cpp.
| bool QFirebirdEventSubscription::first = true |
Definition at line 144 of file qsql_firebird.cpp.
| std::mutex QFirebirdEventSubscription::mutex |
Definition at line 146 of file qsql_firebird.cpp.
| QString QFirebirdEventSubscription::name |
Definition at line 136 of file qsql_firebird.cpp.
Referenced by testing.tools.encode_pdf_filter._PdfStream::RegisterByName().
| ISC_UCHAR * QFirebirdEventSubscription::resultBuffer = nullptr |
Definition at line 142 of file qsql_firebird.cpp.