RmConnection

RmConnection — Connection handling functions

Functions

Types and Values

Description

Connections are used to keep track of ongoing calls (phone/fax/...).

Functions

rm_connection_add ()

RmConnection *
rm_connection_add (gpointer device,
                   gint id,
                   RmConnectionType type,
                   const gchar *local_number,
                   const gchar *remote_number);

Create and add a new RmConnection to connection list

Parameters

device

device creating this connection

 

id

unique connection id

 

type

type of RmConnectionType

 

local_number

local phone number (callee)

 

remote_number

remote phone number (caller)

 

Returns

a new RmConnection


rm_connection_find_by_id ()

RmConnection *
rm_connection_find_by_id (gint id);

Find RmConnection by id .

Parameters

id

unique connection id

 

Returns

a RmConnection, or NULL if not found.


rm_connection_set_type ()

void
rm_connection_set_type (RmConnection *connection,
                        RmConnectionType type);

Set additional connection type.

Parameters

connection

a RmConnection

 

type

a RmConnectionType

 

rm_connection_remove ()

void
rm_connection_remove (RmConnection *connection);

Removes connection from connection list and frees structure.

Parameters

connection

a RmConnection

 

rm_connection_get_duration_time ()

gchar *
rm_connection_get_duration_time (RmConnection *connection);

Retrieves duration time for given connection .

Parameters

connection

a RmConnection

 

Returns

(transfer full) duration time string


rm_connection_shutdown_duration_timer ()

void
rm_connection_shutdown_duration_timer (RmConnection *connection);

Remove phone duration timer.

Parameters

connection

a RmConnection

 

Types and Values

enum RmConnectionType

The type of a connection.

Members

RM_CONNECTION_TYPE_INCOMING

Incoming connection

 

RM_CONNECTION_TYPE_OUTGOING

Outgoing connection

 

RM_CONNECTION_TYPE_CONNECT

Connection established

 

RM_CONNECTION_TYPE_DISCONNECT

Connection terminated

 

RM_CONNECTION_TYPE_MISSED

Connection missed (call not picked up)

 

RM_CONNECTION_TYPE_SOFTPHONE

Additional flag indicating that this is a softphone connection

 

RmConnection

typedef struct RmConnection RmConnection;

The RmConnection contains only private fileds and should not be directly accessed.