static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { NMIP6Config *self = NM_IP6_CONFIG (object); NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (self); _nm_object_ensure_inited (NM_OBJECT (object)); switch (prop_id) { case PROP_GATEWAY: g_value_set_string (value, nm_ip6_config_get_gateway (self)); break; case PROP_ADDRESSES: nm_utils_ip6_addresses_to_gvalue (priv->addresses, value); break; case PROP_ROUTES: nm_utils_ip6_routes_to_gvalue (priv->routes, value); break; case PROP_NAMESERVERS: g_value_set_boxed (value, nm_ip6_config_get_nameservers (self)); break; case PROP_DOMAINS: g_value_set_boxed (value, nm_ip6_config_get_domains (self)); break; case PROP_SEARCHES: g_value_set_boxed (value, nm_ip6_config_get_searches (self)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { NMDeviceEthernet *device = NM_DEVICE_ETHERNET (object); _nm_object_ensure_inited (NM_OBJECT (object)); switch (prop_id) { case PROP_HW_ADDRESS: g_value_set_string (value, nm_device_ethernet_get_hw_address (device)); break; case PROP_PERM_HW_ADDRESS: g_value_set_string (value, nm_device_ethernet_get_permanent_hw_address (device)); break; case PROP_SPEED: g_value_set_uint (value, nm_device_ethernet_get_speed (device)); break; case PROP_CARRIER: g_value_set_boolean (value, nm_device_ethernet_get_carrier (device)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { NMDeviceWifi *self = NM_DEVICE_WIFI (object); _nm_object_ensure_inited (NM_OBJECT (object)); switch (prop_id) { case PROP_HW_ADDRESS: g_value_set_string (value, nm_device_wifi_get_hw_address (self)); break; case PROP_PERM_HW_ADDRESS: g_value_set_string (value, nm_device_wifi_get_permanent_hw_address (self)); break; case PROP_MODE: g_value_set_uint (value, nm_device_wifi_get_mode (self)); break; case PROP_BITRATE: g_value_set_uint (value, nm_device_wifi_get_bitrate (self)); break; case PROP_ACTIVE_ACCESS_POINT: g_value_set_object (value, nm_device_wifi_get_active_access_point (self)); break; case PROP_WIRELESS_CAPABILITIES: g_value_set_uint (value, nm_device_wifi_get_capabilities (self)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { NMDeviceVlan *device = NM_DEVICE_VLAN (object); _nm_object_ensure_inited (NM_OBJECT (object)); switch (prop_id) { case PROP_HW_ADDRESS: g_value_set_string (value, nm_device_vlan_get_hw_address (device)); break; case PROP_CARRIER: g_value_set_boolean (value, nm_device_vlan_get_carrier (device)); break; case PROP_PARENT: g_value_set_object (value, nm_device_vlan_get_parent (device)); break; case PROP_VLAN_ID: g_value_set_uint (value, nm_device_vlan_get_vlan_id (device)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
/** * nm_device_wimax_get_active_nsp: * @wimax: a #NMDeviceWimax * * Gets the active #NMWimaxNsp. * * Returns: (transfer full): the access point or %NULL if none is active * * Deprecated: 1.2: WiMAX is no longer supported. **/ NMWimaxNsp * nm_device_wimax_get_active_nsp (NMDeviceWimax *wimax) { NMDeviceState state; g_return_val_if_fail (NM_IS_DEVICE_WIMAX (wimax), NULL); state = nm_device_get_state (NM_DEVICE (wimax)); switch (state) { case NM_DEVICE_STATE_PREPARE: case NM_DEVICE_STATE_CONFIG: case NM_DEVICE_STATE_NEED_AUTH: case NM_DEVICE_STATE_IP_CONFIG: case NM_DEVICE_STATE_IP_CHECK: case NM_DEVICE_STATE_SECONDARIES: case NM_DEVICE_STATE_ACTIVATED: case NM_DEVICE_STATE_DEACTIVATING: break; default: return NULL; break; } _nm_object_ensure_inited (NM_OBJECT (wimax)); return NM_DEVICE_WIMAX_GET_PRIVATE (wimax)->active_nsp; }
static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { NMDeviceBond *device = NM_DEVICE_BOND (object); _nm_object_ensure_inited (NM_OBJECT (object)); switch (prop_id) { case PROP_HW_ADDRESS: g_value_set_string (value, nm_device_bond_get_hw_address (device)); break; case PROP_CARRIER: g_value_set_boolean (value, nm_device_bond_get_carrier (device)); break; case PROP_SLAVES: g_value_set_boxed (value, nm_device_bond_get_slaves (device)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
/** * nm_device_wifi_get_active_access_point: * @device: a #NMDeviceWifi * * Gets the active #NMAccessPoint. * * Returns: (transfer none): the access point or %NULL if none is active **/ NMAccessPoint * nm_device_wifi_get_active_access_point (NMDeviceWifi *device) { NMDeviceState state; g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), NULL); state = nm_device_get_state (NM_DEVICE (device)); switch (state) { case NM_DEVICE_STATE_PREPARE: case NM_DEVICE_STATE_CONFIG: case NM_DEVICE_STATE_NEED_AUTH: case NM_DEVICE_STATE_IP_CONFIG: case NM_DEVICE_STATE_IP_CHECK: case NM_DEVICE_STATE_SECONDARIES: case NM_DEVICE_STATE_ACTIVATED: case NM_DEVICE_STATE_DEACTIVATING: break; default: return NULL; break; } _nm_object_ensure_inited (NM_OBJECT (device)); return NM_DEVICE_WIFI_GET_PRIVATE (device)->active_ap; }
static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { NMWimaxNsp *nsp = NM_WIMAX_NSP (object); _nm_object_ensure_inited (NM_OBJECT (object)); switch (prop_id) { case PROP_NAME: g_value_set_string (value, nm_wimax_nsp_get_name (nsp)); break; case PROP_SIGNAL_QUALITY: g_value_set_uint (value, nm_wimax_nsp_get_signal_quality (nsp)); break; case PROP_NETWORK_TYPE: g_value_set_uint (value, nm_wimax_nsp_get_network_type (nsp)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { NMDeviceOlpcMesh *device = NM_DEVICE_OLPC_MESH (object); _nm_object_ensure_inited (NM_OBJECT (object)); switch (prop_id) { case PROP_HW_ADDRESS: g_value_set_string (value, nm_device_olpc_mesh_get_hw_address (device)); break; case PROP_COMPANION: g_value_set_object (value, nm_device_olpc_mesh_get_companion (device)); break; case PROP_ACTIVE_CHANNEL: g_value_set_uint (value, nm_device_olpc_mesh_get_active_channel (device)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { NMDeviceBt *device = NM_DEVICE_BT (object); _nm_object_ensure_inited (NM_OBJECT (object)); switch (prop_id) { case PROP_HW_ADDRESS: g_value_set_string (value, nm_device_bt_get_hw_address (device)); break; case PROP_NAME: g_value_set_string (value, nm_device_bt_get_name (device)); break; case PROP_BT_CAPABILITIES: g_value_set_uint (value, nm_device_bt_get_capabilities (device)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
/** * nm_device_infiniband_get_carrier: * @device: a #NMDeviceInfiniband * * Whether the device has carrier. * * Returns: %TRUE if the device has carrier **/ gboolean nm_device_infiniband_get_carrier (NMDeviceInfiniband *device) { g_return_val_if_fail (NM_IS_DEVICE_INFINIBAND (device), FALSE); _nm_object_ensure_inited (NM_OBJECT (device)); return NM_DEVICE_INFINIBAND_GET_PRIVATE (device)->carrier; }
/** * nm_device_infiniband_get_hw_address: * @device: a #NMDeviceInfiniband * * Gets the hardware (MAC) address of the #NMDeviceInfiniband * * Returns: the hardware address. This is the internal string used by the * device, and must not be modified. **/ const char * nm_device_infiniband_get_hw_address (NMDeviceInfiniband *device) { g_return_val_if_fail (NM_IS_DEVICE_INFINIBAND (device), NULL); _nm_object_ensure_inited (NM_OBJECT (device)); return NM_DEVICE_INFINIBAND_GET_PRIVATE (device)->hw_address; }
/** * nm_device_olpc_mesh_get_active_channel: * @device: a #NMDeviceOlpcMesh * * Returns the active channel of the #NMDeviceOlpcMesh device. * * Returns: active channel of the device **/ guint32 nm_device_olpc_mesh_get_active_channel (NMDeviceOlpcMesh *device) { g_return_val_if_fail (NM_IS_DEVICE_OLPC_MESH (device), 0); _nm_object_ensure_inited (NM_OBJECT (device)); return NM_DEVICE_OLPC_MESH_GET_PRIVATE (device)->active_channel; }
/** * nm_device_bridge_get_carrier: * @device: a #NMDeviceBridge * * Whether the device has carrier. * * Returns: %TRUE if the device has carrier * * Since: 0.9.8 **/ gboolean nm_device_bridge_get_carrier (NMDeviceBridge *device) { g_return_val_if_fail (NM_IS_DEVICE_BRIDGE (device), FALSE); _nm_object_ensure_inited (NM_OBJECT (device)); return NM_DEVICE_BRIDGE_GET_PRIVATE (device)->carrier; }
/** * nm_device_vlan_get_vlan_id: * @device: a #NMDeviceVlan * * Returns: the device's VLAN ID **/ guint nm_device_vlan_get_vlan_id (NMDeviceVlan *device) { g_return_val_if_fail (NM_IS_DEVICE_VLAN (device), FALSE); _nm_object_ensure_inited (NM_OBJECT (device)); return NM_DEVICE_VLAN_GET_PRIVATE (device)->vlan_id; }
/** * nm_device_bt_get_capabilities: * @device: a #NMDeviceBt * * Returns the Bluetooth device's usable capabilities. * * Returns: a combination of #NMBluetoothCapabilities **/ NMBluetoothCapabilities nm_device_bt_get_capabilities (NMDeviceBt *device) { g_return_val_if_fail (NM_IS_DEVICE_BT (device), NM_BT_CAPABILITY_NONE); _nm_object_ensure_inited (NM_OBJECT (device)); return NM_DEVICE_BT_GET_PRIVATE (device)->bt_capabilities; }
/** * nm_device_bond_get_slaves: * @device: a #NMDeviceBond * * Gets the devices currently slaved to @device. * * Returns: (element-type NMClient.Device): the #GPtrArray containing * #NMDevices that are slaves of @device. This is the internal * copy used by the device, and must not be modified. * * Since: 0.9.6.4 **/ const GPtrArray * nm_device_bond_get_slaves (NMDeviceBond *device) { g_return_val_if_fail (NM_IS_DEVICE_BOND (device), FALSE); _nm_object_ensure_inited (NM_OBJECT (device)); return handle_ptr_array_return (NM_DEVICE_BOND_GET_PRIVATE (device)->slaves); }
/** * nm_device_modem_get_current_capabilities: * @self: a #NMDeviceModem * * Returns a bitfield of the generic access technology families the modem * supports without a firmware reload or reinitialization. This value * represents the network types the modem can immediately connect to. * * Returns: the generic access technology families the modem supports without * a firmware reload or other reinitialization **/ NMDeviceModemCapabilities nm_device_modem_get_current_capabilities (NMDeviceModem *self) { g_return_val_if_fail (NM_IS_DEVICE_MODEM (self), NM_DEVICE_MODEM_CAPABILITY_NONE); _nm_object_ensure_inited (NM_OBJECT (self)); return NM_DEVICE_MODEM_GET_PRIVATE (self)->current_caps; }
static const char * get_type_description (NMDevice *device) { NMDeviceGenericPrivate *priv = NM_DEVICE_GENERIC_GET_PRIVATE (device); _nm_object_ensure_inited (NM_OBJECT (device)); return priv->type_description; }
/** * nm_device_generic_get_hw_address: * @device: a #NMDeviceGeneric * * Gets the hardware address of the #NMDeviceGeneric * * Returns: the hardware address. This is the internal string used by the * device, and must not be modified. * * Since: 0.9.10 **/ const char * nm_device_generic_get_hw_address (NMDeviceGeneric *device) { g_return_val_if_fail (NM_IS_DEVICE_GENERIC (device), NULL); _nm_object_ensure_inited (NM_OBJECT (device)); return NM_DEVICE_GENERIC_GET_PRIVATE (device)->hw_address; }
/** * nm_wimax_nsp_get_signal_quality: * @nsp: a #NMWimaxNsp * * Gets the WPA signal quality of the wimax NSP. * * Returns: the signal quality **/ guint32 nm_wimax_nsp_get_signal_quality (NMWimaxNsp *nsp) { g_return_val_if_fail (NM_IS_WIMAX_NSP (nsp), 0); _nm_object_ensure_inited (NM_OBJECT (nsp)); return NM_WIMAX_NSP_GET_PRIVATE (nsp)->signal_quality; }
/** * nm_device_vlan_get_hw_address: * @device: a #NMDeviceVlan * * Gets the hardware (MAC) address of the #NMDeviceVlan * * Returns: the hardware address. This is the internal string used by the * device, and must not be modified. **/ const char * nm_device_vlan_get_hw_address (NMDeviceVlan *device) { g_return_val_if_fail (NM_IS_DEVICE_VLAN (device), NULL); _nm_object_ensure_inited (NM_OBJECT (device)); return NM_DEVICE_VLAN_GET_PRIVATE (device)->hw_address; }
/** * nm_wimax_nsp_get_network_type: * @nsp: a #NMWimaxNsp * * Gets the network type of the wimax NSP. * * Returns: the network type **/ NMWimaxNspNetworkType nm_wimax_nsp_get_network_type (NMWimaxNsp *nsp) { g_return_val_if_fail (NM_IS_WIMAX_NSP (nsp), NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN); _nm_object_ensure_inited (NM_OBJECT (nsp)); return NM_WIMAX_NSP_GET_PRIVATE (nsp)->network_type; }
/** * nm_device_bt_get_name: * @device: a #NMDeviceBt * * Gets the name of the #NMDeviceBt. * * Returns: the name of the device **/ const char * nm_device_bt_get_name (NMDeviceBt *device) { g_return_val_if_fail (NM_IS_DEVICE_BT (device), NULL); _nm_object_ensure_inited (NM_OBJECT (device)); return NM_DEVICE_BT_GET_PRIVATE (device)->name; }
/** * nm_wimax_nsp_get_name: * @nsp: a #NMWimaxNsp * * Gets the name of the wimax NSP * * Returns: the name **/ const char * nm_wimax_nsp_get_name (NMWimaxNsp *nsp) { g_return_val_if_fail (NM_IS_WIMAX_NSP (nsp), NULL); _nm_object_ensure_inited (NM_OBJECT (nsp)); return NM_WIMAX_NSP_GET_PRIVATE (nsp)->name; }
/** * nm_device_olpc_mesh_get_hw_address: * @device: a #NMDeviceOlpcMesh * * Gets the hardware (MAC) address of the #NMDeviceOlpcMesh * * Returns: the hardware address. This is the internal string used by the * device, and must not be modified. **/ const char * nm_device_olpc_mesh_get_hw_address (NMDeviceOlpcMesh *device) { g_return_val_if_fail (NM_IS_DEVICE_OLPC_MESH (device), NULL); _nm_object_ensure_inited (NM_OBJECT (device)); return NM_DEVICE_OLPC_MESH_GET_PRIVATE (device)->hw_address; }
/** * nm_device_vlan_get_carrier: * @device: a #NMDeviceVlan * * Whether the device has carrier. * * Returns: %TRUE if the device has carrier **/ gboolean nm_device_vlan_get_carrier (NMDeviceVlan *device) { g_return_val_if_fail (NM_IS_DEVICE_VLAN (device), FALSE); _nm_object_ensure_inited (NM_OBJECT (device)); return NM_DEVICE_VLAN_GET_PRIVATE (device)->carrier; }
/** * nm_device_olpc_mesh_get_companion: * @device: a #NMDeviceOlpcMesh * * Gets the companion device of the #NMDeviceOlpcMesh. * * Returns: (transfer none): the companion of the device of %NULL **/ NMDeviceWifi * nm_device_olpc_mesh_get_companion (NMDeviceOlpcMesh *device) { g_return_val_if_fail (NM_IS_DEVICE_OLPC_MESH (device), NULL); _nm_object_ensure_inited (NM_OBJECT (device)); return NM_DEVICE_OLPC_MESH_GET_PRIVATE (device)->companion; }
/** * nm_vpn_connection_get_vpn_state: * @vpn: a #NMVPNConnection * * Gets the current #NMVPNConnection state. * * Returns: the VPN state of the active VPN connection. **/ NMVPNConnectionState nm_vpn_connection_get_vpn_state (NMVPNConnection *vpn) { g_return_val_if_fail (NM_IS_VPN_CONNECTION (vpn), NM_VPN_CONNECTION_STATE_UNKNOWN); _nm_object_ensure_inited (NM_OBJECT (vpn)); return NM_VPN_CONNECTION_GET_PRIVATE (vpn)->vpn_state; }
/** * nm_device_bridge_get_hw_address: * @device: a #NMDeviceBridge * * Gets the hardware (MAC) address of the #NMDeviceBridge * * Returns: the hardware address. This is the internal string used by the * device, and must not be modified. * * Since: 0.9.8 **/ const char * nm_device_bridge_get_hw_address (NMDeviceBridge *device) { g_return_val_if_fail (NM_IS_DEVICE_BRIDGE (device), NULL); _nm_object_ensure_inited (NM_OBJECT (device)); return NM_DEVICE_BRIDGE_GET_PRIVATE (device)->hw_address; }