Subscriber

    Broadcast

    Description:

    Defines the subscriber for external interfaces to subsribe to events and data of a topic.

    Summary

    Data Fields

    Field Documentation

    AddTopic

    Description:

    Adds a specified topic to the Broadcast service.

    The specified topic is added by the subscriber. A topic can be subscribed to only after being added.

    Parameters:

    Returns:

    Returns EC_SUCCESS if the topic is successfully added; returns other error codes if the topic fails to be added.

    Description:

    Modifies the consumer of a specified topic.

    Parameters:

    Returns:

    Returns the pointer of the original consumer if the modification is successful; returns NULL otherwise.

    Subscribe

    Subscribes to a specified topic for consumers.

    Call this function on the subscriber. The topic to be subscribed to must have been added to the Broadcast service.

    Parameters:

    Returns:

    Returns EC_SUCCESS if the subscription is successful; returns other error codes if the subscription fails.

    Unsubscribe

    Description:

    Unsubscribes from a specified topic.

    This function cancels the subscription relationship between the specified topic and consumer.

    Parameters:

    Returns:

    Returns the pointer of the consumer if the unsubscription is successful; returns NULL otherwise.