Harlinn.Windows 0.1
Loading...
Searching...
No Matches
Harlinn::OCI::Subscription Class Referencefinal

Subscription. More...

#include <HOCI.h>

Inheritance diagram for Harlinn::OCI::Subscription:
[legend]
Collaboration diagram for Harlinn::OCI::Subscription:
[legend]

Public Types

using Base = HandleBase
 
using CallbackFunc = UInt32 (__cdecl*)( void *ctx, OCISubscription *subscrhp, void *payload, UInt32 payloadSize, void *descriptor, UInt32 mode )
 

Public Member Functions

constexpr Subscription () noexcept
 
 Subscription (const Subscription &other)=delete
 
 Subscription (Subscription &&other) noexcept
 
 Subscription (const OCI::Environment &environment, void *ocisubscription, bool ownsHandle)
 Constructs a new Subscription object.
 
Subscriptionoperator= (const Subscription &other)=delete
 
constexpr Subscriptionoperator= (Subscription &&other) noexcept
 
constexpr void swap (Subscription &other) noexcept
 
const OCI::EnvironmentEnvironment () const
 
const OCI::ErrorHandleError () const noexcept final override
 Provides access to the OCIError that will be used for OCI calls for this object.
 
OCIServerDNsServerDNs () const
 The distinguished names of the Oracle database that the client is interested in for the registration.
 
void SetServerDNs (OCIServerDNs *distinguishedNames) const
 
CallbackFunc Callback () const
 Subscription callback. If the attribute OCI_ATTR_SUBSCR_RECPTPROTO is set to OCI_SUBSCR_PROTO_OCI or is left not set, then this attribute must be set before the subscription handle can be passed into the registration call OCISubscriptionRegister( ).
 
void SetCallback (CallbackFunc callbackFunction) const
 
void SetContinuousQueryQOSFlags (SubscriberContinousQueryQOSFlags flags) const
 Sets QOS (quality of service flags) specific to continuous query (CQ) notifications.
 
void * Context () const
 Context that the client wants to get passed to the user callback denoted by OCI_ATTR_SUBSCR_CALLBACK when it gets invoked by the system.If the attribute OCI_ATTR_SUBSCR_RECPTPROTO is set to OCI_SUBSCR_PROTO_OCI or is left not set, then this attribute must be set before the subscription handle can be passed into the registration call OCISubscriptionRegister( ).
 
void SetContext (void *data) const
 
template<WideStringLike StringT = WideString>
StringT Name () const
 Subscription name. All subscriptions are identified by a subscription name. A subscription name consists of a sequence of bytes of specified length. The length in bytes of the name must be specified as it is not assumed that the name is zero-terminated. This is important because the name could contain multibyte characters.
 
template<WideStringLike StringT>
void SetName (const StringT &name) const
 
SubscriberNamespace Namespace () const
 Namespace in which the subscription handle is used.
 
void SetNamespace (SubscriberNamespace subscriberNamespace) const
 
SubscriberNotificationGroupingClass NotificationGroupingClass () const
 Notification grouping class. If set to 0 (the default) all other notification grouping attributes must be 0. It is implemented for time in the latest release and is the only current criterion for grouping.
 
void SetNotificationGroupingClass (SubscriberNotificationGroupingClass notificationGroupingClass) const
 
Int32 NotificationGroupingRepeatCount () const
 How many times to do the grouping. Notification repeat count. Positive integer. Can be set to Subscription::GroupForever to send grouping notifications forever.
 
void SetNotificationGroupingRepeatCount (Int32 value) const
 
SubscriberNotificationGroupingType NotificationGroupingType () const
 The format of the grouping notification: whether a summary of all events in the group or just the last event in the group.
 
void SetNotificationGroupingType (SubscriberNotificationGroupingType notificationGroupingType) const
 
UInt32 NotificationGroupingValue () const
 Specifies the value for the grouping class. For time, this is the time-period of grouping notifications specified in seconds, that is, the time after which grouping notification is sent periodically until OCI_ATTR_SUBSCR_NTFN_GROUPING_REPEAT_COUNT is exhausted.
 
void SetNotificationGroupingValue (UInt32 value) const
 
SubscriberQOSFlags QOSFlags () const
 Quality of service levels of the server.
 
void SetQOSFlags (SubscriberQOSFlags qosFlags) const
 
WideString Recipient () const
 The name of the recipient of the notification.
 
void SetRecipient (const WideString &recipientName) const
 
SubscriberRecipientFormat RecipientFormat () const
 The presentation with which the client wants to receive the notification.
 
void SetRecipientFormat (SubscriberRecipientFormat recipientFormat) const
 
SubscriberRecipientProtocol RecipientProtocol () const
 The protocol with which the client wants to receive the notification.
 
void SetRecipientProtocol (SubscriberRecipientProtocol recipientProtocol) const
 
UInt32 TimeoutInSeconds () const
 Registration timeout interval in seconds. If 0 or not specified, then the registration is active until the subscription is explicitly unregistered.
 
void SetTimeoutInSeconds (UInt32 timeoutInSeconds) const
 
TimeSpan Timeout () const
 
void SetTimeout (const TimeSpan &timeout) const
 
void SetChangeNotificationFilter (OperationCode operationCodeFlags) const
 Used to filter notifications based on operation type.
 
void EnableRowLevelChangeNotifications (bool enable=true) const
 If true, the continuous query notification message includes row-level details, such as operation type and ROWID.
 
WideString ContinuousQueryNotificationDatabaseName () const
 Name of the database.
 
UInt32 ContinuousQueryNotificationType () const
 Flags describing the notification type.
 
UInt32 ContinuousQueryNotificationOperationType () const
 Operation type: INSERT, UPDATE, DELETE, or OTHER.
 
WideString ContinuousQueryNotificationRowId () const
 
- Public Member Functions inherited from Harlinn::OCI::HandleBase
constexpr void * Handle () const noexcept
 Provides access to the value of the handle object.
 
constexpr operator bool () const noexcept
 Test if the handle value is assigned.
 
constexpr bool IsValid () const noexcept
 Test if the handle value is assigned.
 
constexpr OCI::HandleType HandleType () const noexcept
 Returns a value identifying the type of the wrapped handle object.
 

Static Public Attributes

static constexpr Int32 GroupForever = -1
 
static constexpr Int32 WaitForever = -1
 
static constexpr Int32 NoWait = 0
 
static constexpr OCI::HandleType OCIHandleType = OCI::HandleType::Subscription
 

Private Attributes

const OCI::Environmentenvironment_
 
OCI::ErrorHandle error_
 

Additional Inherited Members

- Protected Member Functions inherited from Harlinn::OCI::HandleBase
constexpr HandleBase () noexcept
 Default constructor.
 
constexpr HandleBase (OCI::HandleType handleType, void *handle, bool ownsHandle) noexcept
 Constructs a new HandleBase object.
 
 HandleBase (const HandleBase &other)=delete
 
constexpr HandleBase (HandleBase &&other) noexcept
 Move constructor.
 
virtual ~HandleBase ()
 Destructor.
 
constexpr void SetHandle (void *newHandleValue, bool ownsHandle) noexcept
 Assigns the handle value and ownership to this object.
 
constexpr bool OwnsHandle () const noexcept
 Returns true if this object is the owner of the handle value.
 
void * DetachHandle ()
 If this object is the owner of a handle this function rescinds that ownership, and returns the handle value without closing the handle.
 
void DestroyHandle ()
 Destroys the handle if it is owned by this object.
 
HandleBaseoperator= (const HandleBase &other)=delete
 
constexpr HandleBaseoperator= (HandleBase &&other) noexcept
 
constexpr void swap (HandleBase &other) noexcept
 
template<typename Derived >
constexpr void Take (Derived &&derived) noexcept
 Template function used to implement move assignement in derived classes.
 
void InitializeHandle (void *handle, bool ownsHandle)
 Provides a "safe" mechanism for assigning a handle value. This functions throws if a handle value is already assigned to this object.
 
HO_EXPORT Int32 GetAttribute (void *buffer, UInt32 *size, Attribute attribute) const
 Gets the value of an attribute from the handle.
 
HO_EXPORT Int32 SetAttribute (void *buffer, UInt32 size, Attribute attribute) const
 Sets the value of an attribute on the handle.
 
DateTime GetDateTimeAttribute (Attribute attribute) const
 Gets the value of an attribute from the handle as a DateTime.
 
void SetDateTimeAttribute (Attribute attribute, const DateTime &value) const
 Sets the value of an attribute on the handle as a DateTime.
 
template<WideStringLike StringT = WideString>
StringT GetStringAttribute (Attribute attribute) const
 Gets the value of an attribute from the handle as a WideString.
 
template<WideStringLike StringT = WideString>
StringT GetStringAttributeFromByteString (Attribute attribute) const
 Gets the value of an attribute from the handle as a WideString For use with attributes that are not returned as UTF-16.
 
template<WideStringLike StringT>
void SetStringAttribute (Attribute attribute, const StringT &value) const
 Sets the value of an attribute on the handle as a WideString.
 
void SetStringAttribute (Attribute attribute, const wchar_t *value, size_t valueLength) const
 
bool GetBooleanAttribute (Attribute attribute) const
 Gets the value of an attribute from the handle as a bool.
 
void SetBooleanAttribute (Attribute attribute, bool value) const
 Sets the value of an attribute on the handle as a bool.
 
Byte GetByteAttribute (Attribute attribute) const
 Gets the value of an attribute from the handle as a Byte.
 
void SetByteAttribute (Attribute attribute, Byte value) const
 Sets the value of an attribute on the handle as a Byte.
 
SByte GetSByteAttribute (Attribute attribute) const
 Gets the value of an attribute from the handle as a SByte.
 
void SetSByteAttribute (Attribute attribute, SByte value) const
 Sets the value of an attribute on the handle as a Byte.
 
Int16 GetInt16Attribute (Attribute attribute) const
 Gets the value of an attribute from the handle as an Int16.
 
void SetInt16Attribute (Attribute attribute, Int16 value) const
 Sets the value of an attribute on the handle as an Int16.
 
UInt16 GetUInt16Attribute (Attribute attribute) const
 Gets the value of an attribute from the handle as an UInt16.
 
void SetUInt16Attribute (Attribute attribute, UInt16 value) const
 Sets the value of an attribute on the handle as an UInt16.
 
Int32 GetInt32Attribute (Attribute attribute) const
 Gets the value of an attribute from the handle as an Int32.
 
void SetInt32Attribute (Attribute attribute, Int32 value) const
 Sets the value of an attribute on the handle as an Int32.
 
UInt32 GetUInt32Attribute (Attribute attribute) const
 Gets the value of an attribute from the handle as an UInt32.
 
void SetUInt32Attribute (Attribute attribute, UInt32 value) const
 Sets the value of an attribute on the handle as an UInt32.
 
Int64 GetInt64Attribute (Attribute attribute) const
 Gets the value of an attribute from the handle as an Int64.
 
void SetInt64Attribute (Attribute attribute, Int64 value) const
 Sets the value of an attribute on the handle as an Int64.
 
UInt64 GetUInt64Attribute (Attribute attribute) const
 Gets the value of an attribute from the handle as an UInt64.
 
void SetUInt64Attribute (Attribute attribute, UInt64 value) const
 Sets the value of an attribute on the handle as an UInt64.
 
void * GetPointerAttribute (Attribute attribute) const
 Gets the value of an attribute from the handle as a pointer.
 
void SetPointerAttribute (Attribute attribute, void *value) const
 Sets the value of an attribute on the handle as a pointer.
 
OCI::NumberGetNumberAttribute (Attribute attribute) const
 Gets the value of an attribute from the handle as a pointer to an OCI::Number.
 
- Static Protected Member Functions inherited from Harlinn::OCI::HandleBase
static HO_EXPORT void HandleFree (void *handle, OCI::HandleType handleType) noexcept
 Calls OCIHandleFree to release the handle.
 

Detailed Description

Member Typedef Documentation

◆ Base

◆ CallbackFunc

using Harlinn::OCI::Subscription::CallbackFunc = UInt32 (__cdecl*)( void *ctx, OCISubscription *subscrhp, void *payload, UInt32 payloadSize, void *descriptor, UInt32 mode )

Constructor & Destructor Documentation

◆ Subscription() [1/4]

Harlinn::OCI::Subscription::Subscription ( )
inlineconstexprnoexcept

◆ Subscription() [2/4]

Harlinn::OCI::Subscription::Subscription ( const Subscription & other)
delete

◆ Subscription() [3/4]

Harlinn::OCI::Subscription::Subscription ( Subscription && other)
inlinenoexcept

◆ Subscription() [4/4]

Harlinn::OCI::Subscription::Subscription ( const OCI::Environment & environment,
void * ocisubscription,
bool ownsHandle )
inline

Constructs a new Subscription object.

Parameters
environmentA reference to the environment used to create the subscription handle
handleThe handle wrapped by this object.
ownsHandleSet to true if the new object will take owneship of the handle value

Member Function Documentation

◆ Callback()

CallbackFunc Harlinn::OCI::Subscription::Callback ( ) const
inline

Subscription callback. If the attribute OCI_ATTR_SUBSCR_RECPTPROTO is set to OCI_SUBSCR_PROTO_OCI or is left not set, then this attribute must be set before the subscription handle can be passed into the registration call OCISubscriptionRegister( ).

◆ Context()

void * Harlinn::OCI::Subscription::Context ( ) const
inline

Context that the client wants to get passed to the user callback denoted by OCI_ATTR_SUBSCR_CALLBACK when it gets invoked by the system.If the attribute OCI_ATTR_SUBSCR_RECPTPROTO is set to OCI_SUBSCR_PROTO_OCI or is left not set, then this attribute must be set before the subscription handle can be passed into the registration call OCISubscriptionRegister( ).

◆ ContinuousQueryNotificationDatabaseName()

WideString Harlinn::OCI::Subscription::ContinuousQueryNotificationDatabaseName ( ) const
inline

Name of the database.

◆ ContinuousQueryNotificationOperationType()

UInt32 Harlinn::OCI::Subscription::ContinuousQueryNotificationOperationType ( ) const
inline

Operation type: INSERT, UPDATE, DELETE, or OTHER.

◆ ContinuousQueryNotificationRowId()

WideString Harlinn::OCI::Subscription::ContinuousQueryNotificationRowId ( ) const
inline

◆ ContinuousQueryNotificationType()

UInt32 Harlinn::OCI::Subscription::ContinuousQueryNotificationType ( ) const
inline

Flags describing the notification type.

◆ EnableRowLevelChangeNotifications()

void Harlinn::OCI::Subscription::EnableRowLevelChangeNotifications ( bool enable = true) const
inline

If true, the continuous query notification message includes row-level details, such as operation type and ROWID.

The default is false

◆ Environment()

const OCI::Environment & Harlinn::OCI::Subscription::Environment ( ) const
inline

◆ Error()

const OCI::ErrorHandle & Harlinn::OCI::Subscription::Error ( ) const
inlinefinaloverridevirtualnoexcept

Provides access to the OCIError that will be used for OCI calls for this object.

Returns

Implements Harlinn::OCI::HandleBase.

◆ Name()

template<WideStringLike StringT = WideString>
StringT Harlinn::OCI::Subscription::Name ( ) const
inline

Subscription name. All subscriptions are identified by a subscription name. A subscription name consists of a sequence of bytes of specified length. The length in bytes of the name must be specified as it is not assumed that the name is zero-terminated. This is important because the name could contain multibyte characters.

All of the subscription callbacks need a subscription handle with the OCI_ATTR_SUBSCR_NAME and OCI_ATTR_SUBSCR_NAMESPACE attributes set. If the attributes are not set, an error is returned.The subscription name that is set for the subscription handle must be consistent with its namespace.

◆ Namespace()

SubscriberNamespace Harlinn::OCI::Subscription::Namespace ( ) const
inline

Namespace in which the subscription handle is used.

The subscription name that is set for the subscription handle must be consistent with its namespace.

◆ NotificationGroupingClass()

SubscriberNotificationGroupingClass Harlinn::OCI::Subscription::NotificationGroupingClass ( ) const
inline

Notification grouping class. If set to 0 (the default) all other notification grouping attributes must be 0. It is implemented for time in the latest release and is the only current criterion for grouping.

Can be set to SubscriberNotificationGroupingClass::Time

◆ NotificationGroupingRepeatCount()

Int32 Harlinn::OCI::Subscription::NotificationGroupingRepeatCount ( ) const
inline

How many times to do the grouping. Notification repeat count. Positive integer. Can be set to Subscription::GroupForever to send grouping notifications forever.

◆ NotificationGroupingType()

SubscriberNotificationGroupingType Harlinn::OCI::Subscription::NotificationGroupingType ( ) const
inline

The format of the grouping notification: whether a summary of all events in the group or just the last event in the group.

◆ NotificationGroupingValue()

UInt32 Harlinn::OCI::Subscription::NotificationGroupingValue ( ) const
inline

Specifies the value for the grouping class. For time, this is the time-period of grouping notifications specified in seconds, that is, the time after which grouping notification is sent periodically until OCI_ATTR_SUBSCR_NTFN_GROUPING_REPEAT_COUNT is exhausted.

◆ operator=() [1/2]

Subscription & Harlinn::OCI::Subscription::operator= ( const Subscription & other)
delete

◆ operator=() [2/2]

Subscription & Harlinn::OCI::Subscription::operator= ( Subscription && other)
inlineconstexprnoexcept

◆ QOSFlags()

SubscriberQOSFlags Harlinn::OCI::Subscription::QOSFlags ( ) const
inline

Quality of service levels of the server.

◆ Recipient()

WideString Harlinn::OCI::Subscription::Recipient ( ) const
inline

The name of the recipient of the notification.

◆ RecipientFormat()

SubscriberRecipientFormat Harlinn::OCI::Subscription::RecipientFormat ( ) const
inline

The presentation with which the client wants to receive the notification.

◆ RecipientProtocol()

SubscriberRecipientProtocol Harlinn::OCI::Subscription::RecipientProtocol ( ) const
inline

The protocol with which the client wants to receive the notification.

◆ ServerDNs()

OCIServerDNs * Harlinn::OCI::Subscription::ServerDNs ( ) const
inline

The distinguished names of the Oracle database that the client is interested in for the registration.

◆ SetCallback()

void Harlinn::OCI::Subscription::SetCallback ( CallbackFunc callbackFunction) const
inline

◆ SetChangeNotificationFilter()

void Harlinn::OCI::Subscription::SetChangeNotificationFilter ( OperationCode operationCodeFlags) const
inline

Used to filter notifications based on operation type.

◆ SetContext()

void Harlinn::OCI::Subscription::SetContext ( void * data) const
inline

◆ SetContinuousQueryQOSFlags()

void Harlinn::OCI::Subscription::SetContinuousQueryQOSFlags ( SubscriberContinousQueryQOSFlags flags) const
inline

Sets QOS (quality of service flags) specific to continuous query (CQ) notifications.

◆ SetName()

template<WideStringLike StringT>
void Harlinn::OCI::Subscription::SetName ( const StringT & name) const
inline

◆ SetNamespace()

void Harlinn::OCI::Subscription::SetNamespace ( SubscriberNamespace subscriberNamespace) const
inline

◆ SetNotificationGroupingClass()

void Harlinn::OCI::Subscription::SetNotificationGroupingClass ( SubscriberNotificationGroupingClass notificationGroupingClass) const
inline

◆ SetNotificationGroupingRepeatCount()

void Harlinn::OCI::Subscription::SetNotificationGroupingRepeatCount ( Int32 value) const
inline

◆ SetNotificationGroupingType()

void Harlinn::OCI::Subscription::SetNotificationGroupingType ( SubscriberNotificationGroupingType notificationGroupingType) const
inline

◆ SetNotificationGroupingValue()

void Harlinn::OCI::Subscription::SetNotificationGroupingValue ( UInt32 value) const
inline

◆ SetQOSFlags()

void Harlinn::OCI::Subscription::SetQOSFlags ( SubscriberQOSFlags qosFlags) const
inline

◆ SetRecipient()

void Harlinn::OCI::Subscription::SetRecipient ( const WideString & recipientName) const
inline

◆ SetRecipientFormat()

void Harlinn::OCI::Subscription::SetRecipientFormat ( SubscriberRecipientFormat recipientFormat) const
inline

◆ SetRecipientProtocol()

void Harlinn::OCI::Subscription::SetRecipientProtocol ( SubscriberRecipientProtocol recipientProtocol) const
inline

◆ SetServerDNs()

void Harlinn::OCI::Subscription::SetServerDNs ( OCIServerDNs * distinguishedNames) const
inline

◆ SetTimeout()

void Harlinn::OCI::Subscription::SetTimeout ( const TimeSpan & timeout) const
inline

◆ SetTimeoutInSeconds()

void Harlinn::OCI::Subscription::SetTimeoutInSeconds ( UInt32 timeoutInSeconds) const
inline

◆ swap()

void Harlinn::OCI::Subscription::swap ( Subscription & other)
inlineconstexprnoexcept

◆ Timeout()

TimeSpan Harlinn::OCI::Subscription::Timeout ( ) const
inline

◆ TimeoutInSeconds()

UInt32 Harlinn::OCI::Subscription::TimeoutInSeconds ( ) const
inline

Registration timeout interval in seconds. If 0 or not specified, then the registration is active until the subscription is explicitly unregistered.

Member Data Documentation

◆ environment_

const OCI::Environment* Harlinn::OCI::Subscription::environment_
private

◆ error_

OCI::ErrorHandle Harlinn::OCI::Subscription::error_
private

◆ GroupForever

Int32 Harlinn::OCI::Subscription::GroupForever = -1
staticconstexpr

◆ NoWait

Int32 Harlinn::OCI::Subscription::NoWait = 0
staticconstexpr

◆ OCIHandleType

OCI::HandleType Harlinn::OCI::Subscription::OCIHandleType = OCI::HandleType::Subscription
staticconstexpr

◆ WaitForever

Int32 Harlinn::OCI::Subscription::WaitForever = -1
staticconstexpr

The documentation for this class was generated from the following file: