|
OCILIB (C and C++ Driver for Oracle)
4.6.3
|
Subscription to database or objects changes. More...
#include <ocilib.hpp>
Inherits ocilib::HandleHolder< OCI_Subscription *>.
Public Types | |
| enum | ChangeTypesValues { ObjectChanges = OCI_CNT_OBJECTS, RowChanges = OCI_CNT_ROWS, DatabaseChanges = OCI_CNT_DATABASES, AllChanges = OCI_CNT_ALL } |
| Subscription changes flags values. More... | |
| typedef void(* | NotifyHandlerProc) (Event &evt) |
| User callback for subscriptions event notifications. | |
| typedef Flags< ChangeTypesValues > | ChangeTypes |
| Subscription changes flags. More... | |
Public Member Functions | |
| Subscription () | |
| Default constructor. | |
| void | Register (const Connection &connection, const ostring &name, ChangeTypes changeTypes, NotifyHandlerProc handler, unsigned int port=0, unsigned int timeout=0) |
| Register a notification against the given database. More... | |
| void | Unregister () |
| Unregister a previously registered notification. More... | |
| void | Watch (const ostring &sql) |
| Add a SQL query to monitor. | |
| ostring | GetName () const |
| Return the name of the given registered subscription. | |
| unsigned int | GetTimeout () const |
| Return the timeout of the given registered subscription. | |
| unsigned int | GetPort () const |
| Return the port used by the notification. | |
| Connection | GetConnection () const |
| Return the connection associated with a subscription handle. More... | |
Subscription to database or objects changes.
This class wraps the OCILIB object handle OCI_Subscription and its related methods
Definition at line 7201 of file ocilib.hpp.
Subscription changes flags.
Possible values are Subscription::ChangeTypesValues
Definition at line 7240 of file ocilib.hpp.
Subscription changes flags values.
Definition at line 7221 of file ocilib.hpp.
|
inline |
Register a notification against the given database.
| connection | - Connection handle |
| name | - Notification name |
| changeTypes | - Subscription type |
| handler | - User handler callback |
| port | - Port to use for notifications |
| timeout | - notification timeout |
Definition at line 6650 of file ocilib_impl.hpp.
References ocilib::Check(), OCI_SubscriptionRegister(), and OCI_SubscriptionUnregister().
|
inline |
Unregister a previously registered notification.
Definition at line 6659 of file ocilib_impl.hpp.
|
inline |
Return the connection associated with a subscription handle.
Definition at line 6690 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_SubscriptionGetConnection().