nm_device_infiniband_get_hw_address;
nm_device_infiniband_get_type;
nm_device_infiniband_new;
+ nm_device_is_real;
nm_device_is_software;
nm_device_modem_error_get_type;
nm_device_modem_error_quark;
char *firmware_version;
char *type_description;
NMDeviceCapabilities capabilities;
+ gboolean real;
gboolean managed;
gboolean firmware_missing;
gboolean autoconnect;
PROP_DRIVER_VERSION,
PROP_FIRMWARE_VERSION,
PROP_CAPABILITIES,
+ PROP_REAL,
PROP_MANAGED,
PROP_AUTOCONNECT,
PROP_FIRMWARE_MISSING,
{ NM_DEVICE_DRIVER_VERSION, &priv->driver_version },
{ NM_DEVICE_FIRMWARE_VERSION, &priv->firmware_version },
{ NM_DEVICE_CAPABILITIES, &priv->capabilities },
+ { NM_DEVICE_REAL, &priv->real },
{ NM_DEVICE_MANAGED, &priv->managed },
{ NM_DEVICE_AUTOCONNECT, &priv->autoconnect },
{ NM_DEVICE_FIRMWARE_MISSING, &priv->firmware_missing },
case PROP_CAPABILITIES:
g_value_set_uint (value, nm_device_get_capabilities (device));
break;
+ case PROP_REAL:
+ g_value_set_boolean (value, nm_device_is_real (device));
+ break;
case PROP_MANAGED:
g_value_set_boolean (value, nm_device_get_managed (device));
break;
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
+ /**
+ * NMDevice:real:
+ *
+ * Whether the device is real or is a placeholder device that could
+ * be created automatically by NetworkManager if one of its
+ * #NMDevice:available-connections was activated.
+ *
+ * Since: 1.2
+ **/
+ g_object_class_install_property
+ (object_class, PROP_REAL,
+ g_param_spec_boolean (NM_DEVICE_REAL, "", "",
+ FALSE,
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
+
/**
* NMDevice:managed:
*
return NM_DEVICE_GET_PRIVATE (device)->mtu;
}
+/**
+ * nm_device_is_real:
+ * @device: a #NMDevice
+ *
+ * Returns: %TRUE if the device exists, or %FALSE if it is a placeholder device
+ * that could be automatically created by NetworkManager if one of its
+ * #NMDevice:available-connections was activated.
+ *
+ * Since: 1.2
+ **/
+gboolean
+nm_device_is_real (NMDevice *device)
+{
+ g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
+
+ _nm_object_ensure_inited (NM_OBJECT (device));
+ return NM_DEVICE_GET_PRIVATE (device)->real;
+}
+
/**
* nm_device_is_software:
* @device: a #NMDevice
#define NM_DEVICE_DRIVER_VERSION "driver-version"
#define NM_DEVICE_FIRMWARE_VERSION "firmware-version"
#define NM_DEVICE_CAPABILITIES "capabilities"
+#define NM_DEVICE_REAL "real"
#define NM_DEVICE_MANAGED "managed"
#define NM_DEVICE_AUTOCONNECT "autoconnect"
#define NM_DEVICE_FIRMWARE_MISSING "firmware-missing"
guint32 nm_device_get_mtu (NMDevice *device);
NM_AVAILABLE_IN_1_0
gboolean nm_device_is_software (NMDevice *device);
+NM_AVAILABLE_IN_1_2
+gboolean nm_device_is_real (NMDevice *device);
const char * nm_device_get_product (NMDevice *device);
const char * nm_device_get_vendor (NMDevice *device);
nm_device_ip_tunnel_get_ttl;
nm_device_ip_tunnel_get_type;
nm_device_get_nm_plugin_missing;
+ nm_device_is_real;
nm_device_set_managed;
nm_device_tun_get_group;
nm_device_tun_get_hw_address;
char *type_description;
NMMetered metered;
NMDeviceCapabilities capabilities;
+ gboolean real;
gboolean managed;
gboolean firmware_missing;
gboolean nm_plugin_missing;
PROP_DRIVER_VERSION,
PROP_FIRMWARE_VERSION,
PROP_CAPABILITIES,
+ PROP_REAL,
PROP_MANAGED,
PROP_AUTOCONNECT,
PROP_FIRMWARE_MISSING,
{ NM_DEVICE_DRIVER_VERSION, &priv->driver_version },
{ NM_DEVICE_FIRMWARE_VERSION, &priv->firmware_version },
{ NM_DEVICE_CAPABILITIES, &priv->capabilities },
+ { NM_DEVICE_REAL, &priv->real },
{ NM_DEVICE_MANAGED, &priv->managed },
{ NM_DEVICE_AUTOCONNECT, &priv->autoconnect },
{ NM_DEVICE_FIRMWARE_MISSING, &priv->firmware_missing },
case PROP_CAPABILITIES:
g_value_set_flags (value, nm_device_get_capabilities (device));
break;
+ case PROP_REAL:
+ g_value_set_boolean (value, nm_device_is_real (device));
+ break;
case PROP_MANAGED:
g_value_set_boolean (value, nm_device_get_managed (device));
break;
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
+ /**
+ * NMDevice:real:
+ *
+ * Whether the device is real or is a placeholder device that could
+ * be created automatically by NetworkManager if one of its
+ * #NMDevice:available-connections was activated.
+ *
+ * Since: 1.2
+ **/
+ g_object_class_install_property
+ (object_class, PROP_REAL,
+ g_param_spec_boolean (NM_DEVICE_REAL, "", "",
+ FALSE,
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
+
/**
* NMDevice:managed:
*
return NM_DEVICE_GET_PRIVATE (device)->lldp_neighbors;
}
+/**
+ * nm_device_is_real:
+ * @device: a #NMDevice
+ *
+ * Returns: %TRUE if the device exists, or %FALSE if it is a placeholder device
+ * that could be automatically created by NetworkManager if one of its
+ * #NMDevice:available-connections was activated.
+ *
+ * Since: 1.2
+ **/
+gboolean
+nm_device_is_real (NMDevice *device)
+{
+ g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
+
+ return NM_DEVICE_GET_PRIVATE (device)->real;
+}
+
/**
* nm_device_is_software:
* @device: a #NMDevice
#define NM_DEVICE_DRIVER_VERSION "driver-version"
#define NM_DEVICE_FIRMWARE_VERSION "firmware-version"
#define NM_DEVICE_CAPABILITIES "capabilities"
+#define NM_DEVICE_REAL "real"
#define NM_DEVICE_MANAGED "managed"
#define NM_DEVICE_AUTOCONNECT "autoconnect"
#define NM_DEVICE_FIRMWARE_MISSING "firmware-missing"
const GPtrArray * nm_device_get_available_connections(NMDevice *device);
const char * nm_device_get_physical_port_id (NMDevice *device);
guint32 nm_device_get_mtu (NMDevice *device);
+NM_AVAILABLE_IN_1_2
+gboolean nm_device_is_real (NMDevice *device);
gboolean nm_device_is_software (NMDevice *device);
const char * nm_device_get_product (NMDevice *device);