PhoshWWanInterface

PhoshWWanInterface — Interface for modem handling

Functions

Properties

char * access-tec Read
gboolean enabled Read
char * operator Read
gboolean present Read
int signal-quality Read
gboolean sim Read
gboolean unlocked Read

Types and Values

Object Hierarchy

    GInterface
    ╰── PhoshWWan

Prerequisites

PhoshWWan requires GObject.

Known Implementations

PhoshWWan is implemented by PhoshWWanMM and PhoshWWanOfono.

Description

A PhoshWWanInterface handles modem interaction such as getting network information and signal strength.

Functions

phosh_wwan_get_signal_quality ()

guint
phosh_wwan_get_signal_quality (PhoshWWan *self);

phosh_wwan_get_access_tec ()

const char *
phosh_wwan_get_access_tec (PhoshWWan *self);

phosh_wwan_is_unlocked ()

gboolean
phosh_wwan_is_unlocked (PhoshWWan *self);

phosh_wwan_has_sim ()

gboolean
phosh_wwan_has_sim (PhoshWWan *self);

phosh_wwan_is_present ()

gboolean
phosh_wwan_is_present (PhoshWWan *self);

phosh_wwan_is_enabled ()

gboolean
phosh_wwan_is_enabled (PhoshWWan *self);

phosh_wwan_set_enabled ()

void
phosh_wwan_set_enabled (PhoshWWan *self,
                        gboolean enabled);

phosh_wwan_get_operator ()

const char *
phosh_wwan_get_operator (PhoshWWan *self);

Types and Values

PHOSH_TYPE_WWAN

#define PHOSH_TYPE_WWAN (phosh_wwan_get_type())

struct PhoshWWanInterface

struct PhoshWWanInterface {
  GTypeInterface parent_iface;

  guint         (*get_signal_quality) (PhoshWWan *self);
  const char*   (*get_access_tec)     (PhoshWWan *self);
  gboolean      (*is_unlocked)        (PhoshWWan *self);
  gboolean      (*has_sim)            (PhoshWWan *self);
  gboolean      (*is_present)         (PhoshWWan *self);
  gboolean      (*is_enabled)         (PhoshWWan *self);
  const char*   (*get_operator)       (PhoshWWan *self);
};

Provides an interface for interacting with a modem

Members

GTypeInterface parent_iface;

The parent interface

 

get_signal_quality ()

Get the current signal quality

 

get_access_tec ()

Get the current access technology (2G, 3G, ...)

 

is_unlocked ()

whether the SIM in the modem is locked

 

has_sim ()

Whether there's a sim in the modem

 

is_present ()

whether a modem is present at all

 

is_enabled ()

whether a modem is enabled

 

get_operator ()

Get the current network operator name

 

PhoshWWan

typedef struct _PhoshWWan PhoshWWan;

Property Details

The “access-tec” property

  “access-tec”               char *

Network access technology.

Owner: PhoshWWan

Flags: Read

Default value: NULL


The “enabled” property

  “enabled”                  gboolean

Whether there modem is enabled.

Owner: PhoshWWan

Flags: Read

Default value: FALSE


The “operator” property

  “operator”                 char *

The network operator name.

Owner: PhoshWWan

Flags: Read

Default value: NULL


The “present” property

  “present”                  gboolean

Whether there is a modem present.

Owner: PhoshWWan

Flags: Read

Default value: FALSE


The “signal-quality” property

  “signal-quality”           int

Signal quality in percent.

Owner: PhoshWWan

Flags: Read

Allowed values: [0,100]

Default value: 0


The “sim” property

  “sim”                      gboolean

Modem has a sim card inserted.

Owner: PhoshWWan

Flags: Read

Default value: FALSE


The “unlocked” property

  “unlocked”                 gboolean

Modem is unlocked.

Owner: PhoshWWan

Flags: Read

Default value: FALSE