CallsOrigin

CallsOrigin — An object that originates calls.

Functions

Properties

gpointer calls Read
gchar * country-code Read
gchar * name Read

Signals

void call-added Run Last
void call-removed Run Last

Types and Values

Object Hierarchy

    GInterface
    ╰── CallsOrigin

Prerequisites

CallsOrigin requires CallsMessageSource and GObject.

Description

Functions

CallsOriginForeachCallFunc ()

void
(*CallsOriginForeachCallFunc) (gpointer param,
                               CallsCall *call,
                               CallsOrigin *origin);

calls_origin_get_name ()

const gchar *
calls_origin_get_name (CallsOrigin *self);

Get the user-presentable name of the origin.

Parameters

self

a CallsOrigin

 

Returns

A string containing the name. The string must be freed by the caller.


calls_origin_get_calls ()

GList *
calls_origin_get_calls (CallsOrigin *self);

Get the list of current calls.

Parameters

self

a CallsOrigin

 

error

a GError, or NULL

 

Returns

A newly-allocated GList of objects implementing CallsCall or NULL if there was an error.


calls_origin_foreach_call ()

void
calls_origin_foreach_call (CallsOrigin *self,
                           CallsOriginForeachCallFunc callback,
                           gpointer param);

Iterate over all current calls from this origin

Parameters

self

a CallsOrigin

 

callback

function to be called for each call from the origin

 

param

user data for callback

 

calls_origin_dial ()

void
calls_origin_dial (CallsOrigin *self,
                   const gchar *number);

Dial a new number from this origin. If a new call is successfully created, the call-added signal will be emitted with the call. If there is an error, an appropriate message signal will be emitted.

Parameters

self

a CallsOrigin

 

number

the number to dial

 

Types and Values

CALLS_TYPE_ORIGIN

#define CALLS_TYPE_ORIGIN (calls_origin_get_type ())

struct CallsOriginInterface

struct CallsOriginInterface {
  GTypeInterface parent_iface;

  void (*dial) (CallsOrigin *self,
                const gchar *number);
};

CallsOrigin

typedef struct _CallsOrigin CallsOrigin;

Property Details

The “calls” property

  “calls”                    gpointer

The list of current calls.

Flags: Read


The “country-code” property

  “country-code”             gchar *

The country code of the origin, if any.

Flags: Read

Default value: NULL


The “name” property

  “name”                     gchar *

The name of the origin.

Flags: Read

Default value: NULL

Signal Details

The “call-added” signal

void
user_function (CallsOrigin *callsorigin,
               CallsCall   *arg1,
               gpointer     user_data)

Flags: Run Last


The “call-removed” signal

void
user_function (CallsOrigin *callsorigin,
               CallsCall   *arg1,
               gchar       *arg2,
               gpointer     user_data)

Flags: Run Last