CallsCall

CallsCall — A call.

Functions

Properties

CallsCallType call-type Read / Write / Construct Only
gboolean encrypted Read / Write
char * id Read / Write / Construct
gboolean inbound Read / Write / Construct Only
char * name Read / Write
char * protocol Read
CallsCallState state Read / Write

Signals

void state-changed Run Last

Types and Values

Object Hierarchy

    GEnum
    ├── CallsCallState
    ╰── CallsCallType
    GObject
    ╰── CallsCall

Description

This is the interface to a call. It has a id, name and a state. Only the state changes after creation. If the state is CALLS_CALL_STATE_INCOMING, the call can be answered with calls_call_answer. The call can also be hung up at any time with calls_call_hang_up.

DTMF tones can be played to the call using calls_call_send_dtmf_tone Valid characters for the key are 0-9, '*', '#', 'A', 'B', 'C' and 'D'.

Functions

calls_call_get_id ()

const char *
calls_call_get_id (CallsCall *self);

[attributes org.gtk.Method.get_property=id]

Parameters

self

a CallsCall

 

Returns

the id, or NULL if the id is unknown.

[transfer none][nullable]


calls_call_set_id ()

void
calls_call_set_id (CallsCall *self,
                   const char *id);

Set the id of the call. Some implementations might only be able to set the id after construction.

[attributes org.gtk.Method.set_property=id]

Parameters

self

a CallsCall

 

id

the id of the remote party

 

calls_call_get_name ()

const char *
calls_call_get_name (CallsCall *self);

Get the name of the party the call is connected to, if the network provides it.

Returns the id, or NULL

[attributes org.gtk.Method.get_property=name]

Parameters

self

a CallsCall

 

calls_call_set_name ()

void
calls_call_set_name (CallsCall *self,
                     const char *name);

Sets the name of the call as provided by the network.

[attributes org.gtk.Method.set_property=name]

Parameters

self

a CallsCall

 

name

the name to set

 

calls_call_get_state ()

CallsCallState
calls_call_get_state (CallsCall *self);

Get the current state of the call.

[attributes org.gtk.Method.get_property=state]

Parameters

self

a CallsCall

 

Returns

the state


calls_call_set_state ()

void
calls_call_set_state (CallsCall *self,
                      CallsCallState state);

Set the current state of the call.

[attributes org.gtk.Method.set_property=state org.gtk.Method.signal=state-changed]

Parameters

self

a CallsCall

 

state

a CallsCallState

 

calls_call_get_encrypted ()

gboolean
calls_call_get_encrypted (CallsCall *self);

Parameters

self

A CallsCall

 

Returns

TRUE if the call is encrypted, FALSE otherwise.


calls_call_set_encrypted ()

void
calls_call_set_encrypted (CallsCall *self,
                          gboolean encrypted);

Set whether the call is encrypted or not.

Parameters

self

A CallsCall

 

encrypted

A boolean indicating if the call is encrypted

 

calls_call_get_call_type ()

CallsCallType
calls_call_get_call_type (CallsCall *self);

[attributes org.gtk.Method.get_property=call-type]

Parameters

self

a CallsCall

 

Returns

The type of call, or CALLS_CALL_TYPE_UNKNOWN if not known.


calls_call_get_inbound ()

gboolean
calls_call_get_inbound (CallsCall *self);

Get the direction of the call.

[attributes org.gtk.Method.get_property=inbound]

Parameters

self

a CallsCall

 

Returns

TRUE if inbound, FALSE if outbound.


calls_call_get_protocol ()

const char *
calls_call_get_protocol (CallsCall *self);

Get the protocol of the call (i.e. "tel", "sip")

[attributes org.gtk.Method.get_property=protocol]

Parameters

self

a CallsCall

 

Returns

The protocol used or NULL when unknown.

[transfer none]


calls_call_answer ()

void
calls_call_answer (CallsCall *self);

If the call is incoming, answer it.

Parameters

self

a CallsCall

 

calls_call_hang_up ()

void
calls_call_hang_up (CallsCall *self);

Hang up the call.

Parameters

self

a CallsCall

 

calls_call_can_dtmf ()

gboolean
calls_call_can_dtmf (CallsCall *self);

Parameters

self

a CallsCall

 

Returns

TRUE if this call supports DTMF, FALSE otherwise


calls_call_send_dtmf_tone ()

void
calls_call_send_dtmf_tone (CallsCall *self,
                           char key);

Start playing a DTMF tone for the specified key. Implementations will stop playing the tone either after an implementation-specific timeout.

Parameters

self

a CallsCall

 

key

which tone to start

 

calls_call_state_parse_nick ()

gboolean
calls_call_state_parse_nick (CallsCallState *state,
                             const char *nick);

Types and Values

CALLS_TYPE_CALL

#define CALLS_TYPE_CALL (calls_call_get_type ())

enum CallsCallState

Members

CALLS_CALL_STATE_UNKNOWN

Call state unknown

 

CALLS_CALL_STATE_ACTIVE

Call is active

 

CALLS_CALL_STATE_HELD

Call is being held

 

CALLS_CALL_STATE_DIALING

Outgoing call being established

 

CALLS_CALL_STATE_ALERTING

Remote party is being alerted

 

CALLS_CALL_STATE_INCOMING

New incoming call

 

CALLS_CALL_STATE_DISCONNECTED

Call was successfully terminated

 

enum CallsCallType

Members

CALLS_CALL_TYPE_UNKNOWN

   

CALLS_CALL_TYPE_CELLULAR

   

CALLS_CALL_TYPE_SIP_VOICE

   

struct CallsCallClass

struct CallsCallClass {
  GObjectClass parent_iface;

  const char  *(*get_protocol)         (CallsCall *self);
  void         (*answer)               (CallsCall *self);
  void         (*hang_up)              (CallsCall *self);
  void         (*send_dtmf_tone)       (CallsCall *self,
                                        char       key);
};

CallsCall

typedef struct _CallsCall CallsCall;

Property Details

The “call-type” property

  “call-type”                CallsCallType

The type of this call or CALLS_CALL_TYPE_UNKNOWN if unknown

[attributes org.gtk.Property.get=calls_call_get_call_type]

Owner: CallsCall

Flags: Read / Write / Construct Only

Default value: CALLS_CALL_TYPE_UNKNOWN


The “encrypted” property

  “encrypted”                gboolean

If the call is encrypted

Owner: CallsCall

Flags: Read / Write

Default value: FALSE


The “id” property

  “id”                       char *

Get the id (number, SIP address) the call is connected to. It is possible that this could return NULL if the id is not known, for example if an incoming PTSN call has no caller ID information.

[attributes org.gtk.Property.get=calls_call_get_id org.gtk.Property.set=calls_call_set_id]

Owner: CallsCall

Flags: Read / Write / Construct

Default value: NULL


The “inbound” property

  “inbound”                  gboolean

TRUE if the call is inbound, FALSE otherwise.

[attributes org.gtk.Property.get=calls_call_get_inbound]

Owner: CallsCall

Flags: Read / Write / Construct Only

Default value: FALSE


The “name” property

  “name”                     char *

The (network provided) name of the call. For the name of a contact, see calls_best_match_get_name

[attributes org.gtk.Property.get=calls_call_get_name org.gtk.Property.set=calls_call_set_name]

Owner: CallsCall

Flags: Read / Write

Default value: NULL


The “protocol” property

  “protocol”                 char *

The protocol for this call, f.e. tel or sip

[attributes org.gtk.Property.get=calls_call_get_protocol]

Owner: CallsCall

Flags: Read

Default value: NULL


The “state” property

  “state”                    CallsCallState

The state of the call or CALLS_CALL_STATE_UNKNOWN if unknown.

[attributes org.gtk.Property.get=calls_call_get_state org.gtk.Property.set=calls_call_set_state]

Owner: CallsCall

Flags: Read / Write

Default value: CALLS_CALL_STATE_UNKNOWN

Signal Details

The “state-changed” signal

void
user_function (CallsCall     *self,
               CallsCallState new_state,
               CallsCallState old_state,
               gpointer       user_data)

This signal is emitted when the state of the call changes, for example when it's answered or when the call is disconnected.

Parameters

self

The CallsCall instance.

 

new_state

The new state of the call.

 

old_state

The old state of the call.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last