libnm: remove _new functions from NMObject subclasses

Most NMObjects should not be manually created, they should only be
received from NMClient or NMRemoteSettings.
This commit is contained in:
Dan Winship 2014-05-09 15:14:37 -04:00
parent 2fc55941a3
commit a0e9a4bd45
45 changed files with 5 additions and 572 deletions

View file

@ -15,7 +15,6 @@ global:
nm_access_point_get_strength;
nm_access_point_get_type;
nm_access_point_get_wpa_flags;
nm_access_point_new;
nm_active_connection_get_connection;
nm_active_connection_get_connection_type;
nm_active_connection_get_default6;
@ -32,7 +31,6 @@ global:
nm_active_connection_get_type;
nm_active_connection_get_uuid;
nm_active_connection_get_vpn;
nm_active_connection_new;
nm_active_connection_state_get_type;
nm_bluetooth_capabilities_get_type;
nm_client_activate_connection;
@ -140,28 +138,24 @@ global:
nm_device_adsl_error_quark;
nm_device_adsl_get_carrier;
nm_device_adsl_get_type;
nm_device_adsl_new;
nm_device_bond_error_get_type;
nm_device_bond_error_quark;
nm_device_bond_get_carrier;
nm_device_bond_get_hw_address;
nm_device_bond_get_slaves;
nm_device_bond_get_type;
nm_device_bond_new;
nm_device_bridge_error_get_type;
nm_device_bridge_error_quark;
nm_device_bridge_get_carrier;
nm_device_bridge_get_hw_address;
nm_device_bridge_get_slaves;
nm_device_bridge_get_type;
nm_device_bridge_new;
nm_device_bt_error_get_type;
nm_device_bt_error_quark;
nm_device_bt_get_capabilities;
nm_device_bt_get_hw_address;
nm_device_bt_get_name;
nm_device_bt_get_type;
nm_device_bt_new;
nm_device_capabilities_get_type;
nm_device_connection_compatible;
nm_device_connection_valid;
@ -177,13 +171,11 @@ global:
nm_device_ethernet_get_permanent_hw_address;
nm_device_ethernet_get_speed;
nm_device_ethernet_get_type;
nm_device_ethernet_new;
nm_device_filter_connections;
nm_device_generic_error_get_type;
nm_device_generic_error_quark;
nm_device_generic_get_hw_address;
nm_device_generic_get_type;
nm_device_generic_new;
nm_device_get_active_connection;
nm_device_get_autoconnect;
nm_device_get_available_connections;
@ -217,7 +209,6 @@ global:
nm_device_infiniband_get_carrier;
nm_device_infiniband_get_hw_address;
nm_device_infiniband_get_type;
nm_device_infiniband_new;
nm_device_is_software;
nm_device_modem_capabilities_get_type;
nm_device_modem_error_get_type;
@ -225,14 +216,12 @@ global:
nm_device_modem_get_current_capabilities;
nm_device_modem_get_modem_capabilities;
nm_device_modem_get_type;
nm_device_new;
nm_device_olpc_mesh_error_get_type;
nm_device_olpc_mesh_error_quark;
nm_device_olpc_mesh_get_active_channel;
nm_device_olpc_mesh_get_companion;
nm_device_olpc_mesh_get_hw_address;
nm_device_olpc_mesh_get_type;
nm_device_olpc_mesh_new;
nm_device_set_autoconnect;
nm_device_state_get_type;
nm_device_state_reason_get_type;
@ -242,7 +231,6 @@ global:
nm_device_team_get_hw_address;
nm_device_team_get_slaves;
nm_device_team_get_type;
nm_device_team_new;
nm_device_type_get_type;
nm_device_vlan_error_get_type;
nm_device_vlan_error_quark;
@ -250,7 +238,6 @@ global:
nm_device_vlan_get_hw_address;
nm_device_vlan_get_type;
nm_device_vlan_get_vlan_id;
nm_device_vlan_new;
nm_device_wifi_capabilities_get_type;
nm_device_wifi_error_get_type;
nm_device_wifi_error_quark;
@ -263,7 +250,6 @@ global:
nm_device_wifi_get_mode;
nm_device_wifi_get_permanent_hw_address;
nm_device_wifi_get_type;
nm_device_wifi_new;
nm_device_wifi_request_scan_simple;
nm_device_wimax_error_get_type;
nm_device_wimax_error_quark;
@ -277,15 +263,12 @@ global:
nm_device_wimax_get_rssi;
nm_device_wimax_get_tx_power;
nm_device_wimax_get_type;
nm_device_wimax_new;
nm_dhcp4_config_get_one_option;
nm_dhcp4_config_get_options;
nm_dhcp4_config_get_type;
nm_dhcp4_config_new;
nm_dhcp6_config_get_one_option;
nm_dhcp6_config_get_options;
nm_dhcp6_config_get_type;
nm_dhcp6_config_new;
nm_ip4_address_compare;
nm_ip4_address_dup;
nm_ip4_address_get_address;
@ -306,7 +289,6 @@ global:
nm_ip4_config_get_searches;
nm_ip4_config_get_type;
nm_ip4_config_get_wins_servers;
nm_ip4_config_new;
nm_ip4_route_compare;
nm_ip4_route_dup;
nm_ip4_route_get_dest;
@ -344,7 +326,6 @@ global:
nm_ip6_config_get_routes;
nm_ip6_config_get_searches;
nm_ip6_config_get_type;
nm_ip6_config_new;
nm_ip6_route_compare;
nm_ip6_route_dup;
nm_ip6_route_get_dest;
@ -374,7 +355,6 @@ global:
nm_remote_connection_get_secrets;
nm_remote_connection_get_type;
nm_remote_connection_get_unsaved;
nm_remote_connection_new;
nm_remote_connection_save;
nm_remote_settings_add_connection;
nm_remote_settings_add_connection_unsaved;
@ -946,7 +926,6 @@ global:
nm_vpn_connection_get_banner;
nm_vpn_connection_get_type;
nm_vpn_connection_get_vpn_state;
nm_vpn_connection_new;
nm_vpn_connection_state_get_type;
nm_vpn_connection_state_reason_get_type;
nm_vpn_plugin_failure_get_type;
@ -959,7 +938,6 @@ global:
nm_wimax_nsp_get_signal_quality;
nm_wimax_nsp_get_type;
nm_wimax_nsp_network_type_get_type;
nm_wimax_nsp_new;
local:
*;
};

View file

@ -70,27 +70,6 @@ enum {
LAST_PROP
};
/**
* nm_access_point_new:
* @connection: the #DBusGConnection
* @path: the DBusobject path of the access point
*
* Creates a new #NMAccessPoint.
*
* Returns: (transfer full): a new access point
**/
GObject *
nm_access_point_new (DBusGConnection *connection, const char *path)
{
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
return (GObject *) g_object_new (NM_TYPE_ACCESS_POINT,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
}
/**
* nm_access_point_get_flags:
* @ap: a #NMAccessPoint

View file

@ -64,8 +64,6 @@ typedef struct {
GType nm_access_point_get_type (void);
GObject *nm_access_point_new (DBusGConnection *connection, const char *path);
NM80211ApFlags nm_access_point_get_flags (NMAccessPoint *ap);
NM80211ApSecurityFlags nm_access_point_get_wpa_flags (NMAccessPoint *ap);
NM80211ApSecurityFlags nm_access_point_get_rsn_flags (NMAccessPoint *ap);

View file

@ -88,27 +88,6 @@ enum {
LAST_PROP
};
/**
* nm_active_connection_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
*
* Creates a new #NMActiveConnection.
*
* Returns: (transfer full): a new active connection
**/
GObject *
nm_active_connection_new (DBusGConnection *connection, const char *path)
{
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
return g_object_new (NM_TYPE_ACTIVE_CONNECTION,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
}
static GType
_nm_active_connection_type_for_path (DBusGConnection *connection,
const char *path)

View file

@ -70,8 +70,6 @@ typedef struct {
GType nm_active_connection_get_type (void);
GObject *nm_active_connection_new (DBusGConnection *connection, const char *path);
const char * nm_active_connection_get_connection (NMActiveConnection *connection);
const char * nm_active_connection_get_id (NMActiveConnection *connection);
const char * nm_active_connection_get_uuid (NMActiveConnection *connection);

View file

@ -62,31 +62,6 @@ nm_device_adsl_error_quark (void)
return quark;
}
/**
* nm_device_adsl_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
*
* Creates a new #NMDeviceAdsl.
*
* Returns: (transfer full): a new device
**/
GObject *
nm_device_adsl_new (DBusGConnection *connection, const char *path)
{
GObject *device;
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
device = g_object_new (NM_TYPE_DEVICE_ADSL,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
_nm_object_ensure_inited (NM_OBJECT (device));
return device;
}
/**
* nm_device_adsl_get_carrier:
* @device: a #NMDeviceAdsl

View file

@ -62,7 +62,6 @@ typedef struct {
GType nm_device_adsl_get_type (void);
GObject *nm_device_adsl_new (DBusGConnection *connection, const char *path);
gboolean nm_device_adsl_get_carrier (NMDeviceAdsl *device);
G_END_DECLS

View file

@ -71,31 +71,6 @@ nm_device_bond_error_quark (void)
return quark;
}
/**
* nm_device_bond_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
*
* Creates a new #NMDeviceBond.
*
* Returns: (transfer full): a new device
**/
GObject *
nm_device_bond_new (DBusGConnection *connection, const char *path)
{
GObject *device;
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
device = g_object_new (NM_TYPE_DEVICE_BOND,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
_nm_object_ensure_inited (NM_OBJECT (device));
return device;
}
/**
* nm_device_bond_get_hw_address:
* @device: a #NMDeviceBond

View file

@ -66,8 +66,6 @@ typedef struct {
GType nm_device_bond_get_type (void);
GObject *nm_device_bond_new (DBusGConnection *connection, const char *path);
const char *nm_device_bond_get_hw_address (NMDeviceBond *device);
gboolean nm_device_bond_get_carrier (NMDeviceBond *device);
const GPtrArray *nm_device_bond_get_slaves (NMDeviceBond *device);

View file

@ -71,31 +71,6 @@ nm_device_bridge_error_quark (void)
return quark;
}
/**
* nm_device_bridge_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
*
* Creates a new #NMDeviceBridge.
*
* Returns: (transfer full): a new device
**/
GObject *
nm_device_bridge_new (DBusGConnection *connection, const char *path)
{
GObject *device;
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
device = g_object_new (NM_TYPE_DEVICE_BRIDGE,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
_nm_object_ensure_inited (NM_OBJECT (device));
return device;
}
/**
* nm_device_bridge_get_hw_address:
* @device: a #NMDeviceBridge

View file

@ -70,27 +70,6 @@ nm_device_bt_error_quark (void)
return quark;
}
/**
* nm_device_bt_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
*
* Creates a new #NMDeviceBt.
*
* Returns: (transfer full): a new device
**/
GObject *
nm_device_bt_new (DBusGConnection *connection, const char *path)
{
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
return g_object_new (NM_TYPE_DEVICE_BT,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
}
/**
* nm_device_bt_get_hw_address:
* @device: a #NMDeviceBt

View file

@ -72,8 +72,6 @@ typedef struct {
GType nm_device_bt_get_type (void);
GObject *nm_device_bt_new (DBusGConnection *connection, const char *path);
const char *nm_device_bt_get_hw_address (NMDeviceBt *device);
const char *nm_device_bt_get_name (NMDeviceBt *device);

View file

@ -73,31 +73,6 @@ nm_device_ethernet_error_quark (void)
return quark;
}
/**
* nm_device_ethernet_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
*
* Creates a new #NMDeviceEthernet.
*
* Returns: (transfer full): a new device
**/
GObject *
nm_device_ethernet_new (DBusGConnection *connection, const char *path)
{
GObject *device;
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
device = g_object_new (NM_TYPE_DEVICE_ETHERNET,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
_nm_object_ensure_inited (NM_OBJECT (device));
return device;
}
/**
* nm_device_ethernet_get_hw_address:
* @device: a #NMDeviceEthernet

View file

@ -70,8 +70,6 @@ typedef struct {
GType nm_device_ethernet_get_type (void);
GObject *nm_device_ethernet_new (DBusGConnection *connection, const char *path);
const char * nm_device_ethernet_get_hw_address (NMDeviceEthernet *device);
const char * nm_device_ethernet_get_permanent_hw_address (NMDeviceEthernet *device);
guint32 nm_device_ethernet_get_speed (NMDeviceEthernet *device);

View file

@ -63,31 +63,6 @@ nm_device_generic_error_quark (void)
return quark;
}
/**
* nm_device_generic_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
*
* Creates a new #NMDeviceGeneric.
*
* Returns: (transfer full): a new device
**/
GObject *
nm_device_generic_new (DBusGConnection *connection, const char *path)
{
GObject *device;
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
device = g_object_new (NM_TYPE_DEVICE_GENERIC,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
_nm_object_ensure_inited (NM_OBJECT (device));
return device;
}
/**
* nm_device_generic_get_hw_address:
* @device: a #NMDeviceGeneric

View file

@ -63,8 +63,6 @@ typedef struct {
GType nm_device_generic_get_type (void);
GObject *nm_device_generic_new (DBusGConnection *connection, const char *path);
const char *nm_device_generic_get_hw_address (NMDeviceGeneric *device);
G_END_DECLS

View file

@ -69,31 +69,6 @@ nm_device_infiniband_error_quark (void)
return quark;
}
/**
* nm_device_infiniband_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
*
* Creates a new #NMDeviceInfiniband.
*
* Returns: (transfer full): a new device
**/
GObject *
nm_device_infiniband_new (DBusGConnection *connection, const char *path)
{
GObject *device;
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
device = g_object_new (NM_TYPE_DEVICE_INFINIBAND,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
_nm_object_ensure_inited (NM_OBJECT (device));
return device;
}
/**
* nm_device_infiniband_get_hw_address:
* @device: a #NMDeviceInfiniband

View file

@ -67,8 +67,6 @@ typedef struct {
GType nm_device_infiniband_get_type (void);
GObject *nm_device_infiniband_new (DBusGConnection *connection, const char *path);
const char * nm_device_infiniband_get_hw_address (NMDeviceInfiniband *device);
gboolean nm_device_infiniband_get_carrier (NMDeviceInfiniband *device);

View file

@ -69,32 +69,6 @@ nm_device_olpc_mesh_error_quark (void)
return quark;
}
/**
* nm_device_olpc_mesh_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
*
* Creates a new #NMDeviceOlpcMesh.
*
* Returns: (transfer full): a new OlpcMesh device
**/
GObject *
nm_device_olpc_mesh_new (DBusGConnection *connection, const char *path)
{
GObject *device;
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
device = g_object_new (NM_TYPE_DEVICE_OLPC_MESH,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
_nm_object_ensure_inited (NM_OBJECT (device));
return device;
}
/**
* nm_device_olpc_mesh_get_hw_address:
* @device: a #NMDeviceOlpcMesh

View file

@ -65,8 +65,6 @@ typedef struct {
GType nm_device_olpc_mesh_get_type (void);
GObject *nm_device_olpc_mesh_new (DBusGConnection *connection, const char *path);
const char *nm_device_olpc_mesh_get_hw_address (NMDeviceOlpcMesh *device);
NMDeviceWifi *nm_device_olpc_mesh_get_companion (NMDeviceOlpcMesh *device);
guint32 nm_device_olpc_mesh_get_active_channel (NMDeviceOlpcMesh *device);

View file

@ -71,31 +71,6 @@ nm_device_team_error_quark (void)
return quark;
}
/**
* nm_device_team_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
*
* Creates a new #NMDeviceTeam.
*
* Returns: (transfer full): a new device
**/
GObject *
nm_device_team_new (DBusGConnection *connection, const char *path)
{
GObject *device;
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
device = g_object_new (NM_TYPE_DEVICE_TEAM,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
_nm_object_ensure_inited (NM_OBJECT (device));
return device;
}
/**
* nm_device_team_get_hw_address:
* @device: a #NMDeviceTeam

View file

@ -66,8 +66,6 @@ typedef struct {
GType nm_device_team_get_type (void);
GObject *nm_device_team_new (DBusGConnection *connection, const char *path);
const char *nm_device_team_get_hw_address (NMDeviceTeam *device);
gboolean nm_device_team_get_carrier (NMDeviceTeam *device);
const GPtrArray *nm_device_team_get_slaves (NMDeviceTeam *device);

View file

@ -70,31 +70,6 @@ nm_device_vlan_error_quark (void)
return quark;
}
/**
* nm_device_vlan_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
*
* Creates a new #NMDeviceVlan.
*
* Returns: (transfer full): a new device
**/
GObject *
nm_device_vlan_new (DBusGConnection *connection, const char *path)
{
GObject *device;
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
device = g_object_new (NM_TYPE_DEVICE_VLAN,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
_nm_object_ensure_inited (NM_OBJECT (device));
return device;
}
/**
* nm_device_vlan_get_hw_address:
* @device: a #NMDeviceVlan

View file

@ -70,8 +70,6 @@ typedef struct {
GType nm_device_vlan_get_type (void);
GObject *nm_device_vlan_new (DBusGConnection *connection, const char *path);
const char * nm_device_vlan_get_hw_address (NMDeviceVlan *device);
gboolean nm_device_vlan_get_carrier (NMDeviceVlan *device);
guint nm_device_vlan_get_vlan_id (NMDeviceVlan *device);

View file

@ -101,31 +101,6 @@ nm_device_wifi_error_quark (void)
return quark;
}
/**
* nm_device_wifi_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
*
* Creates a new #NMDeviceWifi.
*
* Returns: (transfer full): a new Wi-Fi device
**/
GObject *
nm_device_wifi_new (DBusGConnection *connection, const char *path)
{
GObject *device;
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
device = g_object_new (NM_TYPE_DEVICE_WIFI,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
_nm_object_ensure_inited (NM_OBJECT (device));
return device;
}
/**
* nm_device_wifi_get_hw_address:
* @device: a #NMDeviceWifi

View file

@ -84,8 +84,6 @@ typedef struct {
GType nm_device_wifi_get_type (void);
GObject *nm_device_wifi_new (DBusGConnection *connection, const char *path);
const char * nm_device_wifi_get_hw_address (NMDeviceWifi *device);
const char * nm_device_wifi_get_permanent_hw_address (NMDeviceWifi *device);
NM80211Mode nm_device_wifi_get_mode (NMDeviceWifi *device);

View file

@ -94,31 +94,6 @@ nm_device_wimax_error_quark (void)
return quark;
}
/**
* nm_device_wimax_new:
* @connection: the #DBusGConnection
* @path: the D-Bus object path of the WiMAX device
*
* Creates a new #NMDeviceWimax.
*
* Returns: (transfer full): a new WiMAX device
**/
GObject *
nm_device_wimax_new (DBusGConnection *connection, const char *path)
{
GObject *device;
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
device = g_object_new (NM_TYPE_DEVICE_WIMAX,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
_nm_object_ensure_inited (NM_OBJECT (device));
return device;
}
/**
* nm_device_wimax_get_hw_address:
* @wimax: a #NMDeviceWimax

View file

@ -79,9 +79,6 @@ typedef struct {
GType nm_device_wimax_get_type (void);
GObject *nm_device_wimax_new (DBusGConnection *connection,
const char *path);
const char *nm_device_wimax_get_hw_address (NMDeviceWimax *wimax);
NMWimaxNsp *nm_device_wimax_get_active_nsp (NMDeviceWimax *wimax);
NMWimaxNsp *nm_device_wimax_get_nsp_by_path (NMDeviceWimax *wimax,

View file

@ -900,36 +900,6 @@ _nm_device_type_for_path (DBusGConnection *connection,
return _nm_device_gtype_from_dtype (nm_dtype);
}
/**
* nm_device_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the device
*
* Creates a new #NMDevice.
*
* Returns: (transfer full): a new device
**/
GObject *
nm_device_new (DBusGConnection *connection, const char *path)
{
GType dtype;
NMDevice *device = NULL;
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
dtype = _nm_device_type_for_path (connection, path);
if (dtype == G_TYPE_INVALID)
return NULL;
device = (NMDevice *) g_object_new (dtype,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
_nm_object_ensure_inited (NM_OBJECT (device));
return G_OBJECT (device);
}
typedef struct {
DBusGConnection *connection;
NMObjectTypeCallbackFunc callback;

View file

@ -110,8 +110,6 @@ typedef struct {
GType nm_device_get_type (void);
GObject * nm_device_new (DBusGConnection *connection, const char *path);
const char * nm_device_get_iface (NMDevice *device);
const char * nm_device_get_ip_iface (NMDevice *device);
NMDeviceType nm_device_get_device_type (NMDevice *device);

View file

@ -160,24 +160,6 @@ nm_dhcp4_config_class_init (NMDhcp4ConfigClass *config_class)
G_PARAM_STATIC_STRINGS));
}
/**
* nm_dhcp4_config_new:
* @connection: the #DBusGConnection
* @object_path: the DBus object path of the device
*
* Creates a new #NMDhcp4Config.
*
* Returns: (transfer full): a new configuration
**/
GObject *
nm_dhcp4_config_new (DBusGConnection *connection, const char *object_path)
{
return (GObject *) g_object_new (NM_TYPE_DHCP4_CONFIG,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, object_path,
NULL);
}
/**
* nm_dhcp4_config_get_options:
* @config: a #NMDhcp4Config

View file

@ -50,8 +50,6 @@ typedef struct {
GType nm_dhcp4_config_get_type (void);
GObject *nm_dhcp4_config_new (DBusGConnection *connection, const char *object_path);
GHashTable * nm_dhcp4_config_get_options (NMDhcp4Config *config);
const char * nm_dhcp4_config_get_one_option (NMDhcp4Config *config, const char *option);

View file

@ -160,24 +160,6 @@ nm_dhcp6_config_class_init (NMDhcp6ConfigClass *config_class)
G_PARAM_STATIC_STRINGS));
}
/**
* nm_dhcp6_config_new:
* @connection: the #DBusGConnection
* @object_path: the DBus object path of the device
*
* Creates a new #NMDhcp6Config.
*
* Returns: (transfer full): a new configuration
**/
GObject *
nm_dhcp6_config_new (DBusGConnection *connection, const char *object_path)
{
return (GObject *) g_object_new (NM_TYPE_DHCP6_CONFIG,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, object_path,
NULL);
}
/**
* nm_dhcp6_config_get_options:
* @config: a #NMDhcp6Config

View file

@ -50,8 +50,6 @@ typedef struct {
GType nm_dhcp6_config_get_type (void);
GObject *nm_dhcp6_config_new (DBusGConnection *connection, const char *object_path);
GHashTable * nm_dhcp6_config_get_options (NMDhcp6Config *config);
const char * nm_dhcp6_config_get_one_option (NMDhcp6Config *config, const char *option);

View file

@ -312,24 +312,6 @@ nm_ip4_config_class_init (NMIP4ConfigClass *config_class)
G_PARAM_STATIC_STRINGS));
}
/**
* nm_ip4_config_new:
* @connection: the #DBusGConnection
* @object_path: the DBus object path of the device
*
* Creates a new #NMIP4Config.
*
* Returns: (transfer full): a new IP4 configuration
**/
GObject *
nm_ip4_config_new (DBusGConnection *connection, const char *object_path)
{
return (GObject *) g_object_new (NM_TYPE_IP4_CONFIG,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, object_path,
NULL);
}
/**
* nm_ip4_config_get_gateway:
* @config: a #NMIP4Config

View file

@ -57,8 +57,6 @@ typedef struct {
GType nm_ip4_config_get_type (void);
GObject *nm_ip4_config_new (DBusGConnection *connection, const char *object_path);
const char * nm_ip4_config_get_gateway (NMIP4Config *config);
const GSList * nm_ip4_config_get_addresses (NMIP4Config *config);
const GSList * nm_ip4_config_get_routes (NMIP4Config *config);

View file

@ -55,24 +55,6 @@ enum {
LAST_PROP
};
/**
* nm_ip6_config_new:
* @connection: the #DBusGConnection
* @object_path: the DBus object path of the device
*
* Creates a new #NMIP6Config.
*
* Returns: (transfer full): a new IP6 configuration
**/
GObject *
nm_ip6_config_new (DBusGConnection *connection, const char *object_path)
{
return (GObject *) g_object_new (NM_TYPE_IP6_CONFIG,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, object_path,
NULL);
}
static gboolean
demarshal_ip6_address_array (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field)
{

View file

@ -56,8 +56,6 @@ typedef struct {
GType nm_ip6_config_get_type (void);
GObject *nm_ip6_config_new (DBusGConnection *connection, const char *object_path);
const char * nm_ip6_config_get_gateway (NMIP6Config *config);
const GSList * nm_ip6_config_get_addresses (NMIP6Config *config);
const GSList * nm_ip6_config_get_routes (NMIP6Config *config);

View file

@ -33,7 +33,6 @@
#include "nm-glib-compat.h"
#include "nm-dbus-helpers-private.h"
#define NM_REMOTE_CONNECTION_BUS "bus"
#define NM_REMOTE_CONNECTION_DBUS_CONNECTION "dbus-connection"
#define NM_REMOTE_CONNECTION_DBUS_PATH "dbus-path"
@ -542,28 +541,6 @@ properties_changed_cb (DBusGProxy *proxy,
/****************************************************************/
/**
* nm_remote_connection_new:
* @bus: a valid and connected D-Bus connection
* @path: the D-Bus path of the connection as exported by the settings service
*
* Creates a new object representing the remote connection.
*
* Returns: the new remote connection object on success, or %NULL on failure
**/
NMRemoteConnection *
nm_remote_connection_new (DBusGConnection *bus,
const char *path)
{
g_return_val_if_fail (bus != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
return (NMRemoteConnection *) g_object_new (NM_TYPE_REMOTE_CONNECTION,
NM_REMOTE_CONNECTION_BUS, bus,
NM_CONNECTION_PATH, path,
NULL);
}
static void
constructed (GObject *object)
{

View file

@ -51,6 +51,7 @@ typedef enum {
GQuark nm_remote_connection_error_quark (void);
/* Properties */
#define NM_REMOTE_CONNECTION_BUS "bus"
#define NM_REMOTE_CONNECTION_UNSAVED "unsaved"
/* Signals */
@ -110,9 +111,6 @@ typedef void (*NMRemoteConnectionGetSecretsFunc) (NMRemoteConnection *connection
GType nm_remote_connection_get_type (void);
NMRemoteConnection *nm_remote_connection_new (DBusGConnection *bus,
const char *path);
void nm_remote_connection_commit_changes (NMRemoteConnection *connection,
NMRemoteConnectionResultFunc callback,
gpointer user_data);

View file

@ -525,7 +525,10 @@ new_connection_cb (DBusGProxy *proxy, const char *path, gpointer user_data)
return connection;
/* Create a new connection object for it */
connection = nm_remote_connection_new (priv->bus, path);
connection = g_object_new (NM_TYPE_REMOTE_CONNECTION,
NM_REMOTE_CONNECTION_BUS, priv->bus,
NM_CONNECTION_PATH, path,
NULL);
if (connection) {
g_async_initable_init_async (G_ASYNC_INITABLE (connection),
G_PRIORITY_DEFAULT, NULL,

View file

@ -53,27 +53,6 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
/**
* nm_vpn_connection_new:
* @connection: the #DBusGConnection
* @path: the DBus object path of the new connection
*
* Creates a new #NMVpnConnection.
*
* Returns: (transfer full): a new connection object
**/
GObject *
nm_vpn_connection_new (DBusGConnection *connection, const char *path)
{
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
return g_object_new (NM_TYPE_VPN_CONNECTION,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
}
/**
* nm_vpn_connection_get_banner:
* @vpn: a #NMVpnConnection

View file

@ -58,8 +58,6 @@ typedef struct {
GType nm_vpn_connection_get_type (void);
GObject * nm_vpn_connection_new (DBusGConnection *connection, const char *path);
NMVpnConnectionState nm_vpn_connection_get_vpn_state (NMVpnConnection *vpn);
const char * nm_vpn_connection_get_banner (NMVpnConnection *vpn);

View file

@ -53,27 +53,6 @@ enum {
LAST_PROP
};
/**
* nm_wimax_nsp_new:
* @connection: the #DBusGConnection
* @path: the D-Bus object path of the WiMAX NSP
*
* Creates a new #NMWimaxNsp.
*
* Returns: (transfer full): a new WiMAX NSP
**/
GObject *
nm_wimax_nsp_new (DBusGConnection *connection, const char *path)
{
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
return (GObject *) g_object_new (NM_TYPE_WIMAX_NSP,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
}
/**
* nm_wimax_nsp_get_name:
* @nsp: a #NMWimaxNsp

View file

@ -60,8 +60,6 @@ typedef struct {
GType nm_wimax_nsp_get_type (void);
GObject *nm_wimax_nsp_new (DBusGConnection *connection, const char *path);
const char * nm_wimax_nsp_get_name (NMWimaxNsp *nsp);
guint32 nm_wimax_nsp_get_signal_quality (NMWimaxNsp *nsp);
NMWimaxNspNetworkType nm_wimax_nsp_get_network_type (NMWimaxNsp *nsp);