IrisPort

IrisPort — Message delivery structure

Synopsis

#define             IRIS_PORT_CONST                     (obj)
                    IrisPort;
IrisPort*           iris_port_new                       (void);
void                iris_port_post                      (IrisPort *port,
                                                         IrisMessage *message);
void                iris_port_flush                     (IrisPort *port);
gboolean            iris_port_is_paused                 (IrisPort *port);
gboolean            iris_port_has_receiver              (IrisPort *port);
IrisReceiver*       iris_port_get_receiver              (IrisPort *port);
void                iris_port_set_receiver              (IrisPort *port,
                                                         IrisReceiver *receiver);
guint               iris_port_get_queue_count           (IrisPort *port);

Object Hierarchy

  GObject
   +----IrisPort

Description

IrisPort is a structure used for delivering messages. When a port is connected to a receiver they can be used to perform actions when a message is delivered. See iris_arbiter_receive() for more information.

Details

IRIS_PORT_CONST()

#define             IRIS_PORT_CONST(obj)

obj :


IrisPort

typedef struct _IrisPort IrisPort;


iris_port_new ()

IrisPort*           iris_port_new                       (void);

Creates a new instance of an IrisPort.

Returns :

The newly created IrisPort

iris_port_post ()

void                iris_port_post                      (IrisPort *port,
                                                         IrisMessage *message);

Posts message to the port. Any receivers listening to the port will receive the message.

port :

An IrisPort

message :

The IrisMessage to post

iris_port_flush ()

void                iris_port_flush                     (IrisPort *port);

Flushes the port by trying to redeliver messages to a listening IrisReceiver.

port :

An IrisPort

iris_port_is_paused ()

gboolean            iris_port_is_paused                 (IrisPort *port);

Checks if the port is currently paused.

port :

An IrisPort

Returns :

TRUE if the port is paused.

iris_port_has_receiver ()

gboolean            iris_port_has_receiver              (IrisPort *port);

Determines if the port is currently connected to a receiver.

port :

An IrisPort

Returns :

TRUE if there is a receiver hooked up.

iris_port_get_receiver ()

IrisReceiver*       iris_port_get_receiver              (IrisPort *port);

Retreives the currently attached receiver for the port.

port :

An IrisPort

Returns :

An IrisReceiver instance or NULL.

iris_port_set_receiver ()

void                iris_port_set_receiver              (IrisPort *port,
                                                         IrisReceiver *receiver);

Sets the current receiver for the port. If a receiver already exists, it will be removed.

port :

An IrisPort

receiver :

An IrisReceiver

iris_port_get_queue_count ()

guint               iris_port_get_queue_count           (IrisPort *port);

Retreives the count of queued items still waiting to be delivered to a receiver.

port :

An IrisPort

Returns :

a gint of the number of queued messages.