CallsProvider

CallsProvider — An abstraction of call providers, such as oFono, Telepathy or some SIP library.

Functions

const char * calls_provider_get_name ()
const char * calls_provider_get_status ()
GListModel * calls_provider_get_origins ()
const char *const * calls_provider_get_protocols ()
gboolean calls_provider_is_modem ()
gboolean calls_provider_is_operational ()

Properties

char * status Read

Types and Values

Object Hierarchy

    GObject
    ╰── CallsProvider

Known Derived Interfaces

CallsProvider is required by CallsAccountProvider.

Description

The CallsProvider abstract class is the root of the class tree that needs to be implemented by a call provider. A CallsProvider provides access to a list of CallsOrigin interfaces, through the calls_provider_get_origins function and the origin-added and origin-removed signals.

Functions

calls_provider_get_name ()

const char *
calls_provider_get_name (CallsProvider *self);

Get the user-presentable name of the provider.

Parameters

self

a CallsProvider

 

Returns

A string containing the name.


calls_provider_get_status ()

const char *
calls_provider_get_status (CallsProvider *self);

calls_provider_get_origins ()

GListModel *
calls_provider_get_origins (CallsProvider *self);

Get the list of CallsOrigin interfaces offered by this provider.

Parameters

self

a CallsProvider

 

Returns

A GListModel of origins.

[transfer none]


calls_provider_get_protocols ()

const char *const *
calls_provider_get_protocols (CallsProvider *self);

Parameters

self

A CallsProvider

 

Returns

A null-terminated array of strings.

[transfer none]


calls_provider_is_modem ()

gboolean
calls_provider_is_modem (CallsProvider *self);

Parameters

self

A CallsProvider

 

Returns

TRUE is this provider handles modems, FALSE otherwise


calls_provider_is_operational ()

gboolean
calls_provider_is_operational (CallsProvider *self);

Parameters

self

A CallsProvider

 

Returns

TRUE is this provider is operational, FALSE otherwise

If not subclassed this method will simply test if there are any origins available.

Types and Values

CALLS_TYPE_PROVIDER

#define CALLS_TYPE_PROVIDER (calls_provider_get_type ())

struct CallsProviderClass

struct CallsProviderClass {
  GObjectClass       parent_class;

  const char        *(*get_name)                       (CallsProvider *self);
  const char        *(*get_status)                     (CallsProvider *self);
  GListModel        *(*get_origins)                    (CallsProvider *self);
  const char *const *(*get_protocols)                  (CallsProvider *self);
  gboolean           (*is_modem)                       (CallsProvider *self);
  gboolean           (*is_operational)                 (CallsProvider *self);
};

CallsProvider

typedef struct _CallsProvider CallsProvider;

Property Details

The “status” property

  “status”                   char *

A text string describing the status for display to the user.

Owner: CallsProvider

Flags: Read

Default value: ""