IBM Books

Group Services Programming Guide and Reference

ha_gs_unsubscribe subroutine

Purpose

ha_gs_unsubscribe - Called by a subscriber to unregister as a subscriber for a group

Library

GSAPI Thread-Safe Library (libha_gs_r.a)

GSAPI Library (not thread-safe) (libha_gs.a)

Syntax

#include <ha_gs.h>
 
ha_gs_rc_t
    ha_gs_unsubscribe(
                ha_gs_token_t           subscriber_token)
 

Parameters

subscriber_token
A token that identifies the subscription to be removed. This token was previously initialized when the subscriber requested the subscription using the ha_gs_subscribe subroutine.

Description

The ha_gs_unsubscribe subroutine is used by a subscriber to unregister as a subscriber for a group.

Note that subscribers are known only to the Group Services subsystem. The providers of the group and the other subscribers of the group are unaware of any of the subscribers to the group.

Restrictions

The calling process must be a subscriber.

Return Values

If the ha_gs_unsubscribe subroutine is successful, it returns a value of 0 (HA_GS_OK).

Error Values

If the ha_gs_unsubscribe subroutine is unsuccessful, it returns an error number.

The GSAPI error numbers are defined in the ha_gs.h header file. For more information on GSAPI errors, see GSAPI errors (err_gsapi).

Synchronous Errors

The following errors may be returned synchronously by the ha_gs_unsubscribe subroutine:

HA_GS_BAD_MEMBER_TOKEN
The given subscriber_token does not specify a valid subscription to a group.

HA_GS_NO_INIT
The GS client has not yet successfully initialized itself with Group Services by calling ha_gs_init().

HA_GS_NOT_OK
The connection to the GS daemon has been lost. The GS client needs to reinitialize (via ha_gs_init()).

Asynchronous Errors

None.

Files

ha_gs.h

Prerequisite Information

Understanding Group Services.

Related Information

Subroutine: ha_gs_subscribe, ha_gs_init


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]