RRConnection

Name

RRConnection -- 

Synopsis



enum        RRRole;
RRManager*  rr_connection_get_manager       (RRConnection *connection);
gboolean    rr_connection_disconnect        (RRConnection *connection,
                                             GError **error);
void        rr_connection_set_peer_profiles (RRConnection *connection,
                                             GSList *list);
const GSList* rr_connection_get_peer_profiles
                                            (RRConnection *connection);
gboolean    rr_connection_peer_supports_profile
                                            (RRConnection *connection,
                                             GType profile);
void        rr_connection_do_quiescence     (RRConnection *connection,
                                             GFunc callback,
                                             gpointer data,
                                             gpointer user_data);
gboolean    rr_connection_wait_quiescence   (RRConnection *connection,
                                             GError **error);
RRChannel*  rr_connection_get_channel       (RRConnection *connection,
                                             gint id);
void        rr_connection_set_profile_registry
                                            (RRConnection *connection,
                                             RRProfileRegistry *profreg);
const gchar* rr_connection_get_server_name  (RRConnection *connection);
void        rr_connection_set_server_name   (RRConnection *connection,
                                             const gchar *server_name);
gboolean    rr_connection_send_frame        (RRConnection *connection,
                                             RRFrame *frame,
                                             GError **error);
gboolean    rr_connection_begin_tuning_reset
                                            (RRConnection *connection,
                                             GError **error);
void        rr_connection_complete_tuning_reset
                                            (RRConnection *connection,
                                             RRChannel *channel);
gboolean    rr_connection_register_sender   (RRConnection *connection,
                                             RRChannel *channel,
                                             GError **error);
void        rr_connection_add_channel       (RRConnection *connection,
                                             RRChannel *channel);
void        rr_connection_remove_channel    (RRConnection *connection,
                                             RRChannel *channel);
gboolean    rr_connection_enable_input      (RRConnection *connection);
gboolean    rr_connection_disable_input     (RRConnection *connection);
gboolean    rr_connection_enable_output     (RRConnection *connection);
gboolean    rr_connection_disable_output    (RRConnection *connection);
gboolean    rr_connection_pending_transmissions_p
                                            (RRConnection *connection);
RRFrame*    rr_connection_get_next_frame    (RRConnection *connection,
                                             gsize buffer_size);
GSList*     rr_connection_get_languages     (RRConnection *connection);
gchar*      rr_connection_get_languages_str (RRConnection *connection);
gboolean    rr_connection_language_supported
                                            (RRConnection *connection,
                                             const gchar *lang);
void        rr_connection_add_language      (RRConnection *connection,
                                             const gchar *lang);
gboolean    rr_connection_remove_language   (RRConnection *connection,
                                             const gchar *lang);

Object Hierarchy


  GObject
   +----RRConnection

Description

Details

enum RRRole

typedef enum {
	RR_ROLE_LISTENER,
	RR_ROLE_INITIATOR,
} RRRole;


rr_connection_get_manager ()

RRManager*  rr_connection_get_manager       (RRConnection *connection);

Returns the manager channel (channel 0) for the given connection.

connection : A RRConnection.
Returns : the RRManager channel associated with this connection.


rr_connection_disconnect ()

gboolean    rr_connection_disconnect        (RRConnection *connection,
                                             GError **error);

Attempts to close the connection. NOTE: connection will be unref:ed.

connection : A RRConnection
error : error: location to return an error of type G_IO_ERROR, RR_ERROR or RR_BEEP_ERROR.
Returns : TRUE on success, FALSE on failure.


rr_connection_set_peer_profiles ()

void        rr_connection_set_peer_profiles (RRConnection *connection,
                                             GSList *list);

Store a list of peer supported profiles in the connection object.

connection : The RRConnection.
list : a list of supported profiles.


rr_connection_get_peer_profiles ()

const GSList* rr_connection_get_peer_profiles
                                            (RRConnection *connection);

Returns a list of profile uri's that the remote peer supports.

connection : The RRConnection
Returns : A const pointer to the profile list.


rr_connection_peer_supports_profile ()

gboolean    rr_connection_peer_supports_profile
                                            (RRConnection *connection,
                                             GType profile);

Determines if the remote peer supports the profile.

connection : The RRConnection.
profile : A profile type.
Returns : TRUE if the profile is supported else FALSE.


rr_connection_do_quiescence ()

void        rr_connection_do_quiescence     (RRConnection *connection,
                                             GFunc callback,
                                             gpointer data,
                                             gpointer user_data);

The callback function is called called when the outbound queues are empty.

connection : A RRConnection
callback : a callback function
data : data to use as the first argument to the callback function.
user_data : data to use as the second argument to the callback function.


rr_connection_wait_quiescence ()

gboolean    rr_connection_wait_quiescence   (RRConnection *connection,
                                             GError **error);

Blocks until all frames and messages in the out queue are sent.

connection : A RRConnection
error : location to return an error or NULL
Returns : TRUE on success, FALSE on failure.


rr_connection_get_channel ()

RRChannel*  rr_connection_get_channel       (RRConnection *connection,
                                             gint id);

Finds and returns the RRChannel instance that has channel id on connection.

connection : a RRConnection.
id : channel id 0..2147483647
Returns : a RRChannel or NULL.


rr_connection_set_profile_registry ()

void        rr_connection_set_profile_registry
                                            (RRConnection *connection,
                                             RRProfileRegistry *profreg);

Give the connection a list of profiles to support.

connection : A RRConnection.
profreg : A RRProfileRegistry.


rr_connection_get_server_name ()

const gchar* rr_connection_get_server_name  (RRConnection *connection);

Returns the "serverName" attribute for the first successful "start" element received by a BEEP peer is meaningful for the duration of the BEEP session.

connection : The RRConnection.
Returns : the serverName.


rr_connection_set_server_name ()

void        rr_connection_set_server_name   (RRConnection *connection,
                                             const gchar *server_name);

Sets the serverName that is received from the BEEP peer.

connection : The RRConnection.
server_name : a serverName.


rr_connection_send_frame ()

gboolean    rr_connection_send_frame        (RRConnection *connection,
                                             RRFrame *frame,
                                             GError **error);

Enqueue a frame to be sent on connection, this function has higher priority then rr_channel_send_frame and rr_channel_send_message. So frame will be sent before frames and messages enqueued by those functions. Note: The frame will be unref:ed after the transmission.

connection : a RRConnection
frame : a RRFrame
error : location to return an error of type RR_ERROR or RR_BEEP_ERROR.
Returns : 


rr_connection_begin_tuning_reset ()

gboolean    rr_connection_begin_tuning_reset
                                            (RRConnection *connection,
                                             GError **error);

Warns the active channels that a tuning reset is pending by invoking rr_channel_close_indication. If no channel objects then the connection gets ready to receive a new greeting message.

connection : a RRConnection
error : location to return an error of type RR_ERROR or RR_BEEP_ERROR.
Returns : TRUE on success, FALSE on failure.


rr_connection_complete_tuning_reset ()

void        rr_connection_complete_tuning_reset
                                            (RRConnection *connection,
                                             RRChannel *channel);

Closes all open channels on connection. Sends a new greeting and waits until a greeting from the other peer is received.

connection : the RRConnection.
channel : the channel that is tuning.


rr_connection_register_sender ()

gboolean    rr_connection_register_sender   (RRConnection *connection,
                                             RRChannel *channel,
                                             GError **error);

Tells the connection that channel has some things to send.

connection : the RRConnection object
channel : the RRChannel object
error : location to return an error of type RR_ERROR or RR_BEEP_ERROR.
Returns : TRUE on success, FALSE on failure.


rr_connection_add_channel ()

void        rr_connection_add_channel       (RRConnection *connection,
                                             RRChannel *channel);

Adds channel to the list of channels started on the connection.

connection : a RRConnection.
channel : a RRChannel.


rr_connection_remove_channel ()

void        rr_connection_remove_channel    (RRConnection *connection,
                                             RRChannel *channel);

Removes channel from the list of channels started on the connection.

connection : a RRConnection.
channel : a RRChannel.


rr_connection_enable_input ()

gboolean    rr_connection_enable_input      (RRConnection *connection);

Enable processing of incoming BEEP frames.

connection : A RRConnection
Returns : 


rr_connection_disable_input ()

gboolean    rr_connection_disable_input     (RRConnection *connection);

Disable processing of incoming BEEP frames.

connection : A RRConnection.
Returns : 


rr_connection_enable_output ()

gboolean    rr_connection_enable_output     (RRConnection *connection);

Enable transmission of enqueued frames/messages.

connection : A RRConnection.
Returns : 


rr_connection_disable_output ()

gboolean    rr_connection_disable_output    (RRConnection *connection);

Disable transmission of enqueued frames/messages.

connection : A RRConnection
Returns : 


rr_connection_pending_transmissions_p ()

gboolean    rr_connection_pending_transmissions_p
                                            (RRConnection *connection);

connection : a RRConnection
Returns : TRUE if the out queue is not empty.


rr_connection_get_next_frame ()

RRFrame*    rr_connection_get_next_frame    (RRConnection *connection,
                                             gsize buffer_size);

connection : 
buffer_size : 
Returns : 


rr_connection_get_languages ()

GSList*     rr_connection_get_languages     (RRConnection *connection);

connection : 
Returns : 


rr_connection_get_languages_str ()

gchar*      rr_connection_get_languages_str (RRConnection *connection);

connection : 
Returns : 


rr_connection_language_supported ()

gboolean    rr_connection_language_supported
                                            (RRConnection *connection,
                                             const gchar *lang);

connection : 
lang : 
Returns : 


rr_connection_add_language ()

void        rr_connection_add_language      (RRConnection *connection,
                                             const gchar *lang);

connection : 
lang : 


rr_connection_remove_language ()

gboolean    rr_connection_remove_language   (RRConnection *connection,
                                             const gchar *lang);

connection : 
lang : 
Returns :