RoadRunner Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
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. |
gboolean rr_connection_disconnect (RRConnection *connection, GError **error); |
Attempts to close the connection. NOTE: connection will be unref:ed.
connection : | |
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. |
RRChannel* rr_connection_start (RRConnection *connection, const gchar *server_name, GType profile_type, gpointer config_data, GError **error); |
Tries to create a new channel of the provided profile type.
connection : | The RRConnection. |
server_name : | # The server_name parameter or NULL. |
profile_type : | The profile type to start. |
config_data : | Profile specific config data or NULL. |
error : | location to return an error of type RR_ERROR or RR_BEEP_ERROR |
Returns : | A RRProfile on success, NULL on failure. |
RRChannel* rr_connection_start_multi (RRConnection *connection, const gchar *server_name, GError **error, ...); |
Tries to create a new channel with one of the provided profiles.
connection : | The RRConnection. |
server_name : | The server_name parameter or NULL. |
error : | location to return an error of type RR_ERROR or RR_BEEP_ERROR |
... : | A list of Profile type + config_data pairs and a G_TYPE_INVALID at the end. |
Returns : | A RRProfile on success, NULL on failure. |
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. |
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. |
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. |
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 : | |
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. |
gboolean rr_connection_wait_quiescence (RRConnection *connection, GError **error); |
Blocks until all frames and messages in the out queue are sent.
connection : | |
error : | location to return an error or NULL |
Returns : | TRUE on success, FALSE on failure. |
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. |
RRChannel* rr_connection_get_channel_locked (RRConnection *connection, gint id); |
Finds and returns the RRChannel instance that has channel id on connection. The channel mutex lock is also locked for the returned channel.
connection : | a RRConnection. |
id : | channel id 0..2147483647 |
Returns : | a RRChannel or NULL. |
void rr_connection_set_profile_registry (RRConnection *connection, RRProfileRegistry *profreg); |
Give the connection a list of profiles to support.
connection : | A RRConnection. |
profreg : |
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. |
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. |
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 : | |
frame : | a RRFrame |
error : | location to return an error of type RR_ERROR or RR_BEEP_ERROR. |
Returns : |
|
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 : | |
error : | location to return an error of type RR_ERROR or RR_BEEP_ERROR. |
Returns : | TRUE on success, FALSE on failure. |
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. |
void rr_connection_register_sender (RRConnection *connection, RRChannel *channel); |
Tells the connection that channel has some things to send.
connection : | the RRConnection object |
channel : | the RRChannel object |
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. |
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. |
gboolean rr_connection_enable_input (RRConnection *connection); |
Enable processing of incoming BEEP frames.
connection : | |
Returns : |
|
gboolean rr_connection_disable_input (RRConnection *connection); |
Disable processing of incoming BEEP frames.
connection : | A RRConnection. |
Returns : |
|
gboolean rr_connection_enable_output (RRConnection *connection); |
Enable transmission of enqueued frames/messages.
connection : | A RRConnection. |
Returns : |
|
gboolean rr_connection_disable_output (RRConnection *connection); |
Disable transmission of enqueued frames/messages.
connection : | |
Returns : |
|
gboolean rr_connection_pending_transmissions_p (RRConnection *connection); |
connection : | |
Returns : | TRUE if the out queue is not empty. |
RRFrame* rr_connection_get_next_frame (RRConnection *connection, gsize buffer_size); |
connection : | |
buffer_size : | |
Returns : |
|
GSList* rr_connection_get_languages (RRConnection *connection); |
connection : | |
Returns : |
|
gchar* rr_connection_get_languages_str (RRConnection *connection); |
connection : | |
Returns : |
|
gboolean rr_connection_language_supported (RRConnection *connection, const gchar *lang); |
connection : | |
lang : | |
Returns : |
|
void rr_connection_add_language (RRConnection *connection, const gchar *lang); |
connection : | |
lang : |
|
gboolean rr_connection_remove_language (RRConnection *connection, const gchar *lang); |
connection : | |
lang : | |
Returns : |
|