Google is committed to advancing racial equity for Black communities. See how.

nl::Weave::Profiles::DataManagement_Current::SubscriptionHandler

Summary

Public types

@136 enum
EventCallback)(void *const aAppState, EventID aEvent, const InEventParam &aInParam, OutEventParam &aOutParam) typedef
void(*
EventID enum
HandlerId typedef
uint8_t

Public static functions

DefaultEventHandler(EventID aEvent, const InEventParam & aInParam, OutEventParam & aOutParam)
void

Public functions

AbortSubscription(void)
void
This function terminates a subscription immediately - this is a synchronous call.
AcceptSubscribeRequest(const uint32_t aLivenessTimeoutSec)
EndSubscription(const uint32_t aReasonProfileId, const uint16_t aReasonStatusCode)
This function initiates a graceful shutdown of the subscription and clean-up of the handler object.
GetBinding(void) const
GetMaxNotificationSize(void) const
uint32_t
GetPeerNodeId(void) const
uint64_t
GetSubscriptionId(uint64_t *const apSubscriptionId)
IsActive(void)
bool
IsCanceling() const
bool
IsEstablishedIdle()
bool
IsFree()
bool
IsTerminated()
bool
SetMaxNotificationSize(const uint32_t aMaxPayload)
void

Structs

nl::Weave::Profiles::DataManagement_Current::SubscriptionHandler::TraitInstanceInfo

Unions

nl::Weave::Profiles::DataManagement_Current::SubscriptionHandler::InEventParam
nl::Weave::Profiles::DataManagement_Current::SubscriptionHandler::OutEventParam

Public types

@136

 @136

EventCallback

void(* EventCallback)(void *const aAppState, EventID aEvent, const InEventParam &aInParam, OutEventParam &aOutParam)

EventID

 EventID

HandlerId

uint8_t HandlerId

Public static functions

DefaultEventHandler

void DefaultEventHandler(
  EventID aEvent,
  const InEventParam & aInParam,
  OutEventParam & aOutParam
)

Public functions

AbortSubscription

void AbortSubscription(
  void
)

This function terminates a subscription immediately - this is a synchronous call.

Abort a publisher subscription.

No attempt is made to notify the client of the termination, and the underlying exchange context if present is aborted immediately. After this call, the application will not be notified of any further activity on this object. Additionally, the application is not allowed to interact with this object thereafter through any of its methods.

Terminates the publisher end of a subscription, without notifying the subscription client and without delivering an OnSubscriptionTerminated event to the application's event handler. If a mutual subscription exists, the counter subscription from the publisher back to the client is terminated as well.

Upon calling AbortSubscription(), the SubscriptionHandler object enters the Terminated state. If there are no additional references to the object when the termination process completes, the SubscriptionHandler object is freed.

AcceptSubscribeRequest

WEAVE_ERROR AcceptSubscribeRequest(
  const uint32_t aLivenessTimeoutSec
)

EndSubscription

WEAVE_ERROR EndSubscription(
  const uint32_t aReasonProfileId,
  const uint16_t aReasonStatusCode
)

This function initiates a graceful shutdown of the subscription and clean-up of the handler object.

Gracefully end a publisher subscription.

This is an asynchronous call and will notify a client of the impending shutdown through a SubscribeCancel/StatusReport message where relevant.

Notably, this relinquishes the application's involvement in this subscription. After this call, the application will not be notified of any further activity on this object. Additionally, the application is not allowed to interact with this object thereafter through any of its methods.

Gracefully terminates the publisher end of a subscription. If subscription cancel support is enabled, a SubscribeCancelRequest message is sent to the subscription client and the system awaits a reply before terminating the subscription; otherwise the subscription is immediately terminated in a similar manner to AbortSubscription(). If a mutual subscription exists, the counter subscription from the publisher back to the client is terminated as well.

Details
Parameters
[in] aReasonProfileId
ProfileId of the StatusCode that indicates the reason behind the termination
[in] aReasonStatusCode
StatusCode that indicates the reason behind the termination
Return Values
Returns
a Weave error code for informational purposes only. On any error, the object will be terminated synchronously (i.e aborted).

While awaiting a response to a SubscribeCancelRequest, the SubscriptionHandler enters the Canceling state.

Once the termination process begins, the SubscriptionHandler object enters the Terminated state and an OnSubscriptionTerminated event is delivered to the application's event handler. Note that, if cancel support is not enabled, the event handler may be called synchronously within the call to EndSubscription().

After the application's event handler returns, if there are no additional references to the SubscriptionHandler object, the object is freed.

GetBinding

Binding * GetBinding(
  void
) const 

GetMaxNotificationSize

uint32_t GetMaxNotificationSize(
  void
) const 

GetPeerNodeId

uint64_t GetPeerNodeId(
  void
) const 

GetSubscriptionId

WEAVE_ERROR GetSubscriptionId(
  uint64_t *const apSubscriptionId
)

IsActive

bool IsActive(
  void
)

IsCanceling

bool IsCanceling() const 

IsEstablishedIdle

bool IsEstablishedIdle()

IsFree

bool IsFree()

IsTerminated

bool IsTerminated()

SetMaxNotificationSize

void SetMaxNotificationSize(
  const uint32_t aMaxPayload
)