messaging Struct Reference
[Messaging API]

#include <messaging.h>

List of all members.

Public Attributes

Connection *(* open_connection )(void)
Channel *(* open_channel )(Connection *connection, const char *channel_name)
void(* close_connection )(Connection *connection)
void(* close_channel )(Channel *channel)
void(* send )(Channel *channel, Message *message)
void(* unsubscribe )(Channel *channel)
void(* subscribe )(Channel *channel, callback fp, void *state)
Messaging_Controller *(* get_controller )()


Detailed Description

Messaging module functions

A Messaging instance encapsulates the common messaging-related functions an application component may need to use, such as suscribing to channels, sending messages, registering a callback upon message receipt, etc.


Member Data Documentation

void(* messaging::close_channel)(Channel *channel)

Close a channel. Any subscriptions will be cancelled.

Parameters:
channel The specific channel to close.

void(* messaging::close_connection)(Connection *connection)

Close a connection. Any open channels will be closed as well.

Parameters:
connection The Connection to close.

Messaging_Controller*(* messaging::get_controller)()

Get the Messaging_Controller instance for the given Messaging implementation.

It is typically not necessary for application components themselves to need access to the controller functions. Use with caution.

Channel*(* messaging::open_channel)(Connection *connection, const char *channel_name)

Open a named channel from a connection.

Parameters:
connection Connection from which to create this channnel
channel_name Name/label for the channel.

Connection*(* messaging::open_connection)(void)

Open a new connection.

Returns:
A new Connection. A single connection is itself not threadsafe (i.e. should be used only within a single thread), but all message delivery between individual Connections is guaranteed to be so.

void(* messaging::send)(Channel *channel, Message *message)

Send a message on the given channel.

Parameters:
channel The channel on to which to send the message.
message The message content to send.

void(* messaging::subscribe)(Channel *channel, callback fp, void *state)

Subscribe to messages on the given channel. Messages will be delivered to callback when ready

void(* messaging::unsubscribe)(Channel *channel)

Cancel a subscription on the given channel.


The documentation for this struct was generated from the following file:
Generated on Wed Nov 14 12:01:02 2012 for VetSim Applications by  doxygen 1.4.7