Diffusion C API  5.9.24
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
svc-notify-unsubscription.h File Reference

Functions for notifying a client that it has been unsubscribed from a topic. More...

Data Structures

struct  svc_notify_unsubscription_request_s
 Structure describing an incoming unsubscription notification. More...
 
struct  svc_notify_unsubscription_response_s
 Response message to unsubscription notifications. More...
 
struct  notify_unsubscription_handlers_s
 
struct  notify_unsubscription_params_s
 Structure supplied when registering to receive topic unsubscription notifications. More...
 

Macros

#define NOTIFY_UNSUBSCRIPTION
 Callback handlers for unsubscription notification callbacks.
 

Typedefs

typedef struct
svc_notify_unsubscription_request_s 
SVC_NOTIFY_UNSUBSCRIPTION_REQUEST_T
 Structure describing an incoming unsubscription notification.
 
typedef struct
svc_notify_unsubscription_response_s 
SVC_NOTIFY_UNSUBSCRIPTION_RESPONSE_T
 Response message to unsubscription notifications.
 
typedef int(* on_notify_unsubscription_cb )(SESSION_T *session, const SVC_NOTIFY_UNSUBSCRIPTION_REQUEST_T *request, void *context)
 Callback for notify_unsubscription_register. More...
 
typedef struct
notify_unsubscription_params_s 
NOTIFY_UNSUBSCRIPTION_PARAMS_T
 Structure supplied when registering to receive topic unsubscription notifications.
 

Enumerations

enum  NOTIFY_UNSUBSCRIPTION_REASON_T {
  UNSUBSCRIPTION_REASON_REQUESTED, UNSUBSCRIPTION_REASON_CONTROL, UNSUBSCRIPTION_REASON_REMOVAL, UNSUBSCRIPTION_REASON_AUTHORIZATION,
  UNSUBSCRIPTION_REASON_SUBSCRIPTION_REFRESH, UNSUBSCRIPTION_REASON_STREAM_CHANGE
}
 Reason for unsubscription. More...
 

Functions

void notify_unsubscription_register (SESSION_T *session, const NOTIFY_UNSUBSCRIPTION_PARAMS_T params)
 Register to receive unsubscription notifications. More...
 

Detailed Description

Functions for notifying a client that it has been unsubscribed from a topic.

Typedef Documentation

typedef int(* on_notify_unsubscription_cb)(SESSION_T *session, const SVC_NOTIFY_UNSUBSCRIPTION_REQUEST_T *request, void *context)

Callback for notify_unsubscription_register.

Parameters
sessionThe current active session.
requestThe incoming notification message.
contextUser-supplied context from the initial registration call.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

Enumeration Type Documentation

Reason for unsubscription.

Enumerator
UNSUBSCRIPTION_REASON_REQUESTED 

Unsubscribed by the subscribing client.

UNSUBSCRIPTION_REASON_CONTROL 

The unsubscription was requested either by another client or by the server.

UNSUBSCRIPTION_REASON_REMOVAL 

The unsubscription occurred because the topic was removed.

UNSUBSCRIPTION_REASON_AUTHORIZATION 

The unsubscription occurred because the session is no longer authorized to access the topic.

UNSUBSCRIPTION_REASON_SUBSCRIPTION_REFRESH 

The server has re-subscribed this session to the topic.

Existing streams are unsubscribed because the topic type and other attributes may have changed.

This can happen if a set of servers is configured to use session replication, and a session connected to one server reconnects ("fails over") to a different server.

A stream that receives an unsubscription notification with this reason will also receive a subscription notification with the new topic details.

UNSUBSCRIPTION_REASON_STREAM_CHANGE 

A fallback stream has been unsubscribed due to the addition of a stream that selects the topic.

(Not currently used in the C API).