OobsIface

OobsIface — Base object for network interfaces

Object Hierarchy

  GObject
   +----OobsIface
         +----OobsIfaceEthernet
         +----OobsIfacePlip
         +----OobsIfacePPP

Properties

  "active"                   gboolean              : Read / Write
  "auto"                     gboolean              : Read / Write
  "configured"               gboolean              : Read / Write
  "device"                   gchar*                : Read / Write / Construct Only

Signals

  "state-changed"                                  : Run Last

Description

Details

OobsIface

typedef struct _OobsIface OobsIface;


OobsIfaceClass

typedef struct {
  GObjectClass parent_class;

  gboolean (*is_configured) (OobsIface*);
  gboolean (*has_gateway)   (OobsIface*);
  void     (*state_changed) (OobsIface *iface);

  void     (*_oobs_padding2) (void);
} OobsIfaceClass;


oobs_iface_get_auto ()

gboolean            oobs_iface_get_auto                 (OobsIface *iface);

Returns whether the interface is started automatically at boot time.

iface :

An OobsIface.

Returns :

TRUE if the interface starts during system boot.

oobs_iface_set_auto ()

void                oobs_iface_set_auto                 (OobsIface *iface,
                                                         gboolean is_auto);

Sets whether the interface is started automatically at boot time.

iface :

An OobsIface.

is_auto :

TRUE to make the interface start at boot time.

oobs_iface_get_active ()

gboolean            oobs_iface_get_active               (OobsIface *iface);

Returns whether the interface is active.

iface :

An OobsIface.

Returns :

TRUE if the interface is active.

oobs_iface_set_active ()

void                oobs_iface_set_active               (OobsIface *iface,
                                                         gboolean is_active);

Sets whether the interface is currently active.

iface :

An OobsIface.

is_active :

TRUE to enable the interface.

oobs_iface_get_device_name ()

const gchar*        oobs_iface_get_device_name          (OobsIface *iface);

Returns the device name for the interface.

iface :

An OobsIface.

Returns :

A string containing the device name. This string must not be freed or modified.

oobs_iface_get_configured ()

gboolean            oobs_iface_get_configured           (OobsIface *iface);

Returns whether the interface has a valid (i.e.: complete) configuration and is explicitly marked as configured (see oobs_iface_set_configured()).

iface :

An OobsIface.

Returns :

TRUE if its configuration is valid.

oobs_iface_set_configured ()

void                oobs_iface_set_configured           (OobsIface *iface,
                                                         gboolean is_configured);

If is_configured is FALSE, the function explicitly marks the interface as not configured. If is_configured is TRUE, the explicit mark will be removed, but the interface may still have an incomplete/invalid configuration.

iface :

An OobsIface.

is_configured :

FALSE to explictitly mark the interface as not configured.

oobs_iface_has_gateway ()

gboolean            oobs_iface_has_gateway              (OobsIface *iface);

Returns whether the interface has a defined gateway.

iface :

An OobsIface.

Returns :

TRUE if the interface has a defined gateway.

Property Details

The "active" property

  "active"                   gboolean              : Read / Write

Whether the interface is active.

Default value: FALSE


The "auto" property

  "auto"                     gboolean              : Read / Write

Whether the interface starts at boot time.

Default value: FALSE


The "configured" property

  "configured"               gboolean              : Read / Write

Whether the interface is fully configured.

Default value: FALSE


The "device" property

  "device"                   gchar*                : Read / Write / Construct Only

Device name of the iface.

Default value: NULL

Signal Details

The "state-changed" signal

void                user_function                      (OobsIface *oobsiface,
                                                        gpointer   user_data)      : Run Last

oobsiface :

the object which received the signal.

user_data :

user data set when the signal handler was connected.