Commit d7940bcb authored by Michael Biebl's avatar Michael Biebl

Rename private nm_* functions to _nm_*

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4012 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent 1e379db0
......@@ -198,7 +198,7 @@ g_file_monitor_class_init (GFileMonitorClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GFileMonitorClass, changed),
NULL, NULL,
nm_marshal_VOID__OBJECT_OBJECT_ENUM,
_nm_marshal_VOID__OBJECT_OBJECT_ENUM,
G_TYPE_NONE, 3,
G_TYPE_FILE, G_TYPE_FILE, G_TYPE_FILE_MONITOR_EVENT);
......
......@@ -91,7 +91,7 @@ nm_access_point_get_flags (NMAccessPoint *ap)
priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
if (!priv->flags) {
priv->flags = nm_object_get_uint_property (NM_OBJECT (ap),
priv->flags = _nm_object_get_uint_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_FLAGS);
}
......@@ -116,7 +116,7 @@ nm_access_point_get_wpa_flags (NMAccessPoint *ap)
priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
if (!priv->wpa_flags) {
priv->wpa_flags = nm_object_get_uint_property (NM_OBJECT (ap),
priv->wpa_flags = _nm_object_get_uint_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_WPA_FLAGS);
}
......@@ -141,7 +141,7 @@ nm_access_point_get_rsn_flags (NMAccessPoint *ap)
priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
if (!priv->rsn_flags) {
priv->rsn_flags = nm_object_get_uint_property (NM_OBJECT (ap),
priv->rsn_flags = _nm_object_get_uint_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_RSN_FLAGS);
}
......@@ -167,7 +167,7 @@ nm_access_point_get_ssid (NMAccessPoint *ap)
priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
if (!priv->ssid) {
priv->ssid = nm_object_get_byte_array_property (NM_OBJECT (ap),
priv->ssid = _nm_object_get_byte_array_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_SSID);
}
......@@ -192,7 +192,7 @@ nm_access_point_get_frequency (NMAccessPoint *ap)
priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
if (!priv->frequency) {
priv->frequency = nm_object_get_uint_property (NM_OBJECT (ap),
priv->frequency = _nm_object_get_uint_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_FREQUENCY);
}
......@@ -218,7 +218,7 @@ nm_access_point_get_hw_address (NMAccessPoint *ap)
priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
if (!priv->hw_address) {
priv->hw_address = nm_object_get_string_property (NM_OBJECT (ap),
priv->hw_address = _nm_object_get_string_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_HW_ADDRESS);
}
......@@ -243,7 +243,7 @@ nm_access_point_get_mode (NMAccessPoint *ap)
priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
if (!priv->mode) {
priv->mode = nm_object_get_uint_property (NM_OBJECT (ap),
priv->mode = _nm_object_get_uint_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_MODE);
}
......@@ -268,7 +268,7 @@ nm_access_point_get_max_bitrate (NMAccessPoint *ap)
priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
if (!priv->max_bitrate) {
priv->max_bitrate = nm_object_get_uint_property (NM_OBJECT (ap),
priv->max_bitrate = _nm_object_get_uint_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_MAX_BITRATE);
}
......@@ -293,7 +293,7 @@ nm_access_point_get_strength (NMAccessPoint *ap)
priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
if (!priv->strength) {
priv->strength = nm_object_get_byte_property (NM_OBJECT (ap),
priv->strength = _nm_object_get_byte_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_STRENGTH);
}
......@@ -384,10 +384,10 @@ get_property (GObject *object,
static gboolean
demarshal_ssid (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field)
{
if (!nm_ssid_demarshal (value, (GByteArray **) field))
if (!_nm_ssid_demarshal (value, (GByteArray **) field))
return FALSE;
nm_object_queue_notify (object, NM_ACCESS_POINT_SSID);
_nm_object_queue_notify (object, NM_ACCESS_POINT_SSID);
return TRUE;
}
......@@ -396,19 +396,19 @@ register_for_property_changed (NMAccessPoint *ap)
{
NMAccessPointPrivate *priv = NM_ACCESS_POINT_GET_PRIVATE (ap);
const NMPropertiesChangedInfo property_changed_info[] = {
{ NM_ACCESS_POINT_FLAGS, nm_object_demarshal_generic, &priv->flags },
{ NM_ACCESS_POINT_WPA_FLAGS, nm_object_demarshal_generic, &priv->wpa_flags },
{ NM_ACCESS_POINT_RSN_FLAGS, nm_object_demarshal_generic, &priv->rsn_flags },
{ NM_ACCESS_POINT_FLAGS, _nm_object_demarshal_generic, &priv->flags },
{ NM_ACCESS_POINT_WPA_FLAGS, _nm_object_demarshal_generic, &priv->wpa_flags },
{ NM_ACCESS_POINT_RSN_FLAGS, _nm_object_demarshal_generic, &priv->rsn_flags },
{ NM_ACCESS_POINT_SSID, demarshal_ssid, &priv->ssid },
{ NM_ACCESS_POINT_FREQUENCY, nm_object_demarshal_generic, &priv->frequency },
{ NM_ACCESS_POINT_HW_ADDRESS, nm_object_demarshal_generic, &priv->hw_address },
{ NM_ACCESS_POINT_MODE, nm_object_demarshal_generic, &priv->mode },
{ NM_ACCESS_POINT_MAX_BITRATE, nm_object_demarshal_generic, &priv->max_bitrate },
{ NM_ACCESS_POINT_STRENGTH, nm_object_demarshal_generic, &priv->strength },
{ NM_ACCESS_POINT_FREQUENCY, _nm_object_demarshal_generic, &priv->frequency },
{ NM_ACCESS_POINT_HW_ADDRESS, _nm_object_demarshal_generic, &priv->hw_address },
{ NM_ACCESS_POINT_MODE, _nm_object_demarshal_generic, &priv->mode },
{ NM_ACCESS_POINT_MAX_BITRATE, _nm_object_demarshal_generic, &priv->max_bitrate },
{ NM_ACCESS_POINT_STRENGTH, _nm_object_demarshal_generic, &priv->strength },
{ NULL },
};
nm_object_handle_properties_changed (NM_OBJECT (ap),
_nm_object_handle_properties_changed (NM_OBJECT (ap),
priv->proxy,
property_changed_info);
}
......
......@@ -100,7 +100,7 @@ nm_active_connection_get_service_name (NMActiveConnection *connection)
priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
if (!priv->service_name) {
priv->service_name = nm_object_get_string_property (NM_OBJECT (connection),
priv->service_name = _nm_object_get_string_property (NM_OBJECT (connection),
NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
DBUS_PROP_SERVICE_NAME);
priv->scope = get_scope_for_service_name (priv->service_name);
......@@ -145,7 +145,7 @@ nm_active_connection_get_connection (NMActiveConnection *connection)
priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
if (!priv->connection) {
priv->connection = nm_object_get_string_property (NM_OBJECT (connection),
priv->connection = _nm_object_get_string_property (NM_OBJECT (connection),
NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
DBUS_PROP_CONNECTION);
}
......@@ -171,7 +171,7 @@ nm_active_connection_get_specific_object (NMActiveConnection *connection)
priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
if (!priv->specific_object) {
priv->specific_object = nm_object_get_string_property (NM_OBJECT (connection),
priv->specific_object = _nm_object_get_string_property (NM_OBJECT (connection),
NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
DBUS_PROP_SPECIFIC_OBJECT);
}
......@@ -200,7 +200,7 @@ nm_active_connection_get_devices (NMActiveConnection *connection)
if (priv->devices)
return handle_ptr_array_return (priv->devices);
if (!nm_object_get_property (NM_OBJECT (connection),
if (!_nm_object_get_property (NM_OBJECT (connection),
NM_DBUS_INTERFACE,
DBUS_PROP_DEVICES,
&value)) {
......@@ -230,7 +230,7 @@ nm_active_connection_get_state (NMActiveConnection *connection)
priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
if (!priv->state) {
priv->state = nm_object_get_uint_property (NM_OBJECT (connection),
priv->state = _nm_object_get_uint_property (NM_OBJECT (connection),
NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
DBUS_PROP_STATE);
}
......@@ -256,7 +256,7 @@ nm_active_connection_get_default (NMActiveConnection *connection)
priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
if (!priv->is_default) {
priv->is_default = nm_object_get_boolean_property (NM_OBJECT (connection),
priv->is_default = _nm_object_get_boolean_property (NM_OBJECT (connection),
NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
DBUS_PROP_DEFAULT);
}
......@@ -341,10 +341,10 @@ demarshal_devices (NMObject *object, GParamSpec *pspec, GValue *value, gpointer
DBusGConnection *connection;
connection = nm_object_get_connection (object);
if (!nm_object_array_demarshal (value, (GPtrArray **) field, connection, nm_device_new))
if (!_nm_object_array_demarshal (value, (GPtrArray **) field, connection, nm_device_new))
return FALSE;
nm_object_queue_notify (object, NM_ACTIVE_CONNECTION_DEVICES);
_nm_object_queue_notify (object, NM_ACTIVE_CONNECTION_DEVICES);
return TRUE;
}
......@@ -353,7 +353,7 @@ demarshal_service (NMObject *object, GParamSpec *pspec, GValue *value, gpointer
{
NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (object);
if (nm_object_demarshal_generic (object, pspec, value, field)) {
if (_nm_object_demarshal_generic (object, pspec, value, field)) {
priv->scope = get_scope_for_service_name (priv->service_name);
return TRUE;
}
......@@ -366,15 +366,15 @@ register_for_property_changed (NMActiveConnection *connection)
NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
const NMPropertiesChangedInfo property_changed_info[] = {
{ NM_ACTIVE_CONNECTION_SERVICE_NAME, demarshal_service, &priv->service_name },
{ NM_ACTIVE_CONNECTION_CONNECTION, nm_object_demarshal_generic, &priv->connection },
{ NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT, nm_object_demarshal_generic, &priv->specific_object },
{ NM_ACTIVE_CONNECTION_CONNECTION, _nm_object_demarshal_generic, &priv->connection },
{ NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT, _nm_object_demarshal_generic, &priv->specific_object },
{ NM_ACTIVE_CONNECTION_DEVICES, demarshal_devices, &priv->devices },
{ NM_ACTIVE_CONNECTION_STATE, nm_object_demarshal_generic, &priv->state },
{ NM_ACTIVE_CONNECTION_DEFAULT, nm_object_demarshal_generic, &priv->is_default },
{ NM_ACTIVE_CONNECTION_STATE, _nm_object_demarshal_generic, &priv->state },
{ NM_ACTIVE_CONNECTION_DEFAULT, _nm_object_demarshal_generic, &priv->is_default },
{ NULL },
};
nm_object_handle_properties_changed (NM_OBJECT (connection),
_nm_object_handle_properties_changed (NM_OBJECT (connection),
priv->proxy,
property_changed_info);
}
......
......@@ -27,7 +27,7 @@ register_for_property_changed (NMCdmaDevice *device)
{ NULL },
};
nm_object_handle_properties_changed (NM_OBJECT (device),
_nm_object_handle_properties_changed (NM_OBJECT (device),
priv->proxy,
property_changed_info);
}
......
......@@ -20,7 +20,7 @@
#include "nm-client-bindings.h"
void nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device, gboolean enabled);
void _nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device, gboolean enabled);
G_DEFINE_TYPE (NMClient, nm_client, NM_TYPE_OBJECT)
......@@ -88,7 +88,7 @@ poke_wireless_devices_with_rf_status (NMClient *client)
NMDevice *device = g_ptr_array_index (priv->devices, i);
if (NM_IS_DEVICE_WIFI (device))
nm_device_wifi_set_wireless_enabled (NM_DEVICE_WIFI (device), priv->wireless_enabled);
_nm_device_wifi_set_wireless_enabled (NM_DEVICE_WIFI (device), priv->wireless_enabled);
}
}
......@@ -99,27 +99,27 @@ update_wireless_status (NMClient *client, gboolean notify)
gboolean val;
gboolean poke = FALSE;
val = nm_object_get_boolean_property (NM_OBJECT (client),
val = _nm_object_get_boolean_property (NM_OBJECT (client),
NM_DBUS_INTERFACE,
"WirelessHardwareEnabled");
if (val != priv->wireless_hw_enabled) {
priv->wireless_hw_enabled = val;
poke = TRUE;
if (notify)
nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_WIRELESS_HARDWARE_ENABLED);
_nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_WIRELESS_HARDWARE_ENABLED);
}
if (priv->wireless_hw_enabled == FALSE)
val = FALSE;
else
val = nm_object_get_boolean_property (NM_OBJECT (client),
val = _nm_object_get_boolean_property (NM_OBJECT (client),
NM_DBUS_INTERFACE,
"WirelessEnabled");
if (val != priv->wireless_enabled) {
priv->wireless_enabled = val;
poke = TRUE;
if (notify)
nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_WIRELESS_ENABLED);
_nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_WIRELESS_ENABLED);
}
if (poke)
......@@ -181,10 +181,10 @@ demarshal_active_connections (NMObject *object,
DBusGConnection *connection;
connection = nm_object_get_connection (object);
if (!nm_object_array_demarshal (value, (GPtrArray **) field, connection, new_active_connection))
if (!_nm_object_array_demarshal (value, (GPtrArray **) field, connection, new_active_connection))
return FALSE;
nm_object_queue_notify (object, NM_CLIENT_ACTIVE_CONNECTIONS);
_nm_object_queue_notify (object, NM_CLIENT_ACTIVE_CONNECTIONS);
return TRUE;
}
......@@ -193,14 +193,14 @@ register_for_property_changed (NMClient *client)
{
NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (client);
const NMPropertiesChangedInfo property_changed_info[] = {
{ NM_CLIENT_STATE, nm_object_demarshal_generic, &priv->state },
{ NM_CLIENT_WIRELESS_ENABLED, nm_object_demarshal_generic, &priv->wireless_enabled },
{ NM_CLIENT_WIRELESS_HARDWARE_ENABLED, nm_object_demarshal_generic, &priv->wireless_hw_enabled },
{ NM_CLIENT_STATE, _nm_object_demarshal_generic, &priv->state },
{ NM_CLIENT_WIRELESS_ENABLED, _nm_object_demarshal_generic, &priv->wireless_enabled },
{ NM_CLIENT_WIRELESS_HARDWARE_ENABLED, _nm_object_demarshal_generic, &priv->wireless_hw_enabled },
{ NM_CLIENT_ACTIVE_CONNECTIONS, demarshal_active_connections, &priv->active_connections },
{ NULL },
};
nm_object_handle_properties_changed (NM_OBJECT (client),
_nm_object_handle_properties_changed (NM_OBJECT (client),
priv->client_proxy,
property_changed_info);
}
......@@ -320,14 +320,14 @@ set_property (GObject *object, guint prop_id,
b = g_value_get_boolean (value);
if (priv->wireless_enabled != b) {
priv->wireless_enabled = b;
nm_object_queue_notify (NM_OBJECT (object), NM_CLIENT_WIRELESS_ENABLED);
_nm_object_queue_notify (NM_OBJECT (object), NM_CLIENT_WIRELESS_ENABLED);
}
break;
case PROP_WIRELESS_HARDWARE_ENABLED:
b = g_value_get_boolean (value);
if (priv->wireless_hw_enabled != b) {
priv->wireless_hw_enabled = b;
nm_object_queue_notify (NM_OBJECT (object), NM_CLIENT_WIRELESS_HARDWARE_ENABLED);
_nm_object_queue_notify (NM_OBJECT (object), NM_CLIENT_WIRELESS_HARDWARE_ENABLED);
}
break;
default:
......@@ -537,14 +537,14 @@ proxy_name_owner_changed (DBusGProxy *proxy,
priv->manager_running = new_running;
if (!priv->manager_running) {
priv->state = NM_STATE_UNKNOWN;
nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_MANAGER_RUNNING);
_nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_MANAGER_RUNNING);
poke_wireless_devices_with_rf_status (client);
free_object_array (&priv->devices);
free_object_array (&priv->active_connections);
priv->wireless_enabled = FALSE;
priv->wireless_hw_enabled = FALSE;
} else {
nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_MANAGER_RUNNING);
_nm_object_queue_notify (NM_OBJECT (client), NM_CLIENT_MANAGER_RUNNING);
update_wireless_status (client, TRUE);
}
}
......@@ -560,7 +560,7 @@ client_device_added_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
if (!device) {
DBusGConnection *connection = nm_object_get_connection (NM_OBJECT (client));
device = G_OBJECT (nm_object_cache_get (path));
device = G_OBJECT (_nm_object_cache_get (path));
if (device) {
g_ptr_array_add (priv->devices, g_object_ref (device));
} else {
......@@ -622,7 +622,7 @@ nm_client_get_devices (NMClient *client)
g_value_init (&value, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH);
g_value_take_boxed (&value, temp);
connection = nm_object_get_connection (NM_OBJECT (client));
nm_object_array_demarshal (&value, &priv->devices, connection, nm_device_new);
_nm_object_array_demarshal (&value, &priv->devices, connection, nm_device_new);
g_value_unset (&value);
return handle_ptr_array_return (priv->devices);
......@@ -782,7 +782,7 @@ nm_client_get_active_connections (NMClient *client)
if (!priv->manager_running)
return NULL;
if (!nm_object_get_property (NM_OBJECT (client),
if (!_nm_object_get_property (NM_OBJECT (client),
"org.freedesktop.DBus.Properties",
"ActiveConnections",
&value)) {
......@@ -828,7 +828,7 @@ nm_client_wireless_set_enabled (NMClient *client, gboolean enabled)
g_value_init (&value, G_TYPE_BOOLEAN);
g_value_set_boolean (&value, enabled);
nm_object_set_property (NM_OBJECT (client),
_nm_object_set_property (NM_OBJECT (client),
NM_DBUS_INTERFACE,
"WirelessEnabled",
&value);
......@@ -871,7 +871,7 @@ nm_client_get_state (NMClient *client)
return NM_STATE_UNKNOWN;
if (priv->state == NM_STATE_UNKNOWN)
priv->state = nm_object_get_uint_property (NM_OBJECT (client), NM_DBUS_INTERFACE, "State");
priv->state = _nm_object_get_uint_property (NM_OBJECT (client), NM_DBUS_INTERFACE, "State");
return priv->state;
}
......
#include "nm-dbus-utils.h"
char *
nm_dbus_get_string_property (DBusGProxy *proxy,
_nm_dbus_get_string_property (DBusGProxy *proxy,
const char *interface,
const char *prop_name)
{
......@@ -27,7 +27,7 @@ nm_dbus_get_string_property (DBusGProxy *proxy,
}
char *
nm_dbus_get_object_path_property (DBusGProxy *proxy,
_nm_dbus_get_object_path_property (DBusGProxy *proxy,
const char *interface,
const char *prop_name)
{
......@@ -53,7 +53,7 @@ nm_dbus_get_object_path_property (DBusGProxy *proxy,
}
gint32
nm_dbus_get_int_property (DBusGProxy *proxy,
_nm_dbus_get_int_property (DBusGProxy *proxy,
const char *interface,
const char *prop_name)
{
......@@ -79,7 +79,7 @@ nm_dbus_get_int_property (DBusGProxy *proxy,
}
guint32
nm_dbus_get_uint_property (DBusGProxy *proxy,
_nm_dbus_get_uint_property (DBusGProxy *proxy,
const char *interface,
const char *prop_name)
{
......@@ -105,7 +105,7 @@ nm_dbus_get_uint_property (DBusGProxy *proxy,
}
gboolean
nm_dbus_get_property (DBusGProxy *proxy,
_nm_dbus_get_property (DBusGProxy *proxy,
const char *interface,
const char *prop_name,
GValue *value)
......@@ -139,7 +139,7 @@ nm_dbus_get_property (DBusGProxy *proxy,
}
void
nm_dbus_set_property (DBusGProxy *proxy,
_nm_dbus_set_property (DBusGProxy *proxy,
const char *interface,
const char *prop_name,
GValue *value)
......@@ -164,7 +164,7 @@ nm_dbus_set_property (DBusGProxy *proxy,
}
char *
nm_dbus_introspect (DBusGConnection *connection,
_nm_dbus_introspect (DBusGConnection *connection,
const char *interface,
const char *path)
{
......
......@@ -3,32 +3,32 @@
#include <dbus/dbus-glib.h>
char *nm_dbus_get_string_property (DBusGProxy *proxy,
char *_nm_dbus_get_string_property (DBusGProxy *proxy,
const char *interface,
const char *prop_name);
char *nm_dbus_get_object_path_property (DBusGProxy *proxy,
char *_nm_dbus_get_object_path_property (DBusGProxy *proxy,
const char *interface,
const char *prop_name);
gint32 nm_dbus_get_int_property (DBusGProxy *proxy,
gint32 _nm_dbus_get_int_property (DBusGProxy *proxy,
const char *interface,
const char *prop_name);
guint32 nm_dbus_get_uint_property (DBusGProxy *proxy,
guint32 _nm_dbus_get_uint_property (DBusGProxy *proxy,
const char *interface,
const char *prop_name);
gboolean nm_dbus_get_property (DBusGProxy *proxy,
gboolean _nm_dbus_get_property (DBusGProxy *proxy,
const char *interface,
const char *prop_name,
GValue *value);
void nm_dbus_set_property (DBusGProxy *proxy,
void _nm_dbus_set_property (DBusGProxy *proxy,
const char *interface,
const char *prop_name,
GValue *value);
char *nm_dbus_introspect (DBusGConnection *connection,
char *_nm_dbus_introspect (DBusGConnection *connection,
const char *interface,
const char *path);
......
......@@ -71,7 +71,7 @@ nm_device_ethernet_get_hw_address (NMDeviceEthernet *device)
priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
if (!priv->hw_address) {
priv->hw_address = nm_object_get_string_property (NM_OBJECT (device),
priv->hw_address = _nm_object_get_string_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRED,
DBUS_PROP_HW_ADDRESS);
}
......@@ -96,7 +96,7 @@ nm_device_ethernet_get_speed (NMDeviceEthernet *device)
priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
if (!priv->speed) {
priv->speed = nm_object_get_uint_property (NM_OBJECT (device),
priv->speed = _nm_object_get_uint_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRED,
DBUS_PROP_SPEED);
}
......@@ -121,7 +121,7 @@ nm_device_ethernet_get_carrier (NMDeviceEthernet *device)
priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
if (!priv->carrier_valid) {
priv->carrier = nm_object_get_boolean_property (NM_OBJECT (device),
priv->carrier = _nm_object_get_boolean_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRED,
DBUS_PROP_CARRIER);
priv->carrier_valid = TRUE;
......@@ -145,13 +145,13 @@ register_for_property_changed (NMDeviceEthernet *device)
{
NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
const NMPropertiesChangedInfo property_changed_info[] = {
{ NM_DEVICE_ETHERNET_HW_ADDRESS, nm_object_demarshal_generic, &priv->hw_address },
{ NM_DEVICE_ETHERNET_SPEED, nm_object_demarshal_generic, &priv->speed },
{ NM_DEVICE_ETHERNET_CARRIER, nm_object_demarshal_generic, &priv->carrier },
{ NM_DEVICE_ETHERNET_HW_ADDRESS, _nm_object_demarshal_generic, &priv->hw_address },
{ NM_DEVICE_ETHERNET_SPEED, _nm_object_demarshal_generic, &priv->speed },
{ NM_DEVICE_ETHERNET_CARRIER, _nm_object_demarshal_generic, &priv->carrier },
{ NULL },
};
nm_object_handle_properties_changed (NM_OBJECT (device),
_nm_object_handle_properties_changed (NM_OBJECT (device),
priv->proxy,
property_changed_info);
}
......
......@@ -17,7 +17,7 @@ G_DEFINE_TYPE (NMDeviceWifi, nm_device_wifi, NM_TYPE_DEVICE)
static gboolean demarshal_active_ap (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field);
void nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device, gboolean enabled);
void _nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device, gboolean enabled);
typedef struct {
gboolean disposed;
......@@ -99,7 +99,7 @@ nm_device_wifi_get_hw_address (NMDeviceWifi *device)
priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
if (!priv->hw_address) {
priv->hw_address = nm_object_get_string_property (NM_OBJECT (device),
priv->hw_address = _nm_object_get_string_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRELESS,
DBUS_PROP_HW_ADDRESS);
}
......@@ -124,7 +124,7 @@ nm_device_wifi_get_mode (NMDeviceWifi *device)
priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
if (!priv->mode) {
priv->mode = nm_object_get_uint_property (NM_OBJECT (device),
priv->mode = _nm_object_get_uint_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRELESS,
DBUS_PROP_MODE);
}
......@@ -163,7 +163,7 @@ nm_device_wifi_get_bitrate (NMDeviceWifi *device)
priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
if (!priv->rate) {
priv->rate = nm_object_get_uint_property (NM_OBJECT (device),
priv->rate = _nm_object_get_uint_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRELESS,
DBUS_PROP_BITRATE);
}
......@@ -188,7 +188,7 @@ nm_device_wifi_get_capabilities (NMDeviceWifi *device)
priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
if (!priv->wireless_caps) {
priv->wireless_caps = nm_object_get_uint_property (NM_OBJECT (device),
priv->wireless_caps = _nm_object_get_uint_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRELESS,
DBUS_PROP_WIRELESS_CAPABILITIES);
}
......@@ -233,7 +233,7 @@ nm_device_wifi_get_active_access_point (NMDeviceWifi *self)
if (priv->null_active_ap)
return NULL;
path = nm_object_get_object_path_property (NM_OBJECT (self),
path = _nm_object_get_object_path_property (NM_OBJECT (self),
NM_DBUS_INTERFACE_DEVICE_WIRELESS,
DBUS_PROP_ACTIVE_ACCESS_POINT);
if (path) {
......@@ -279,7 +279,7 @@ nm_device_wifi_get_access_points (NMDeviceWifi *self)
g_value_init (&value, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH);
g_value_take_boxed (&value, temp);
connection = nm_object_get_connection (NM_OBJECT (self));
nm_object_array_demarshal (&value, &priv->aps, connection, nm_access_point_new);
_nm_object_array_demarshal (&value, &priv->aps, connection, nm_access_point_new);
g_value_unset (&value);
return handle_ptr_array_return (priv->aps);
......@@ -334,7 +334,7 @@ access_point_added_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
DBusGConnection *connection = nm_object_get_connection (NM_OBJECT (self));
priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
ap = G_OBJECT (nm_object_cache_get (path));
ap = G_OBJECT (_nm_object_cache_get (path));
if (ap) {
g_ptr_array_add (priv->aps, g_object_ref (ap));
} else {
......@@ -392,14 +392,14 @@ clean_up_aps (NMDeviceWifi *self, gboolean notify)
}
/**
* nm_device_wifi_set_wireless_enabled:
* _nm_device_wifi_set_wireless_enabled:
* @device: a #NMDeviceWifi
* @enabled: %TRUE to enable the device
*
* Enables or disables the wireless device.
**/
void
nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device,
_nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device,
gboolean enabled)
{
g_return_if_fail (NM_IS_DEVICE_WIFI (device));
......@@ -467,9 +467,9 @@ state_changed_cb (NMDevice *device, GParamSpec *pspec, gpointer user_data)
priv->active_ap = NULL;
priv->null_active_ap = FALSE;
}
nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT);
_nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT);
priv->rate = 0;
nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_WIFI_BITRATE);
_nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_WIFI_BITRATE);
break;
default:
break;
......@@ -494,7 +494,7 @@ demarshal_active_ap (NMObject *object, GParamSpec *pspec, GValue *value, gpointe
if (!strcmp (path, "/"))
priv->null_active_ap = TRUE;
else {
ap = NM_ACCESS_POINT (nm_object_cache_get (path));
ap = NM_ACCESS_POINT (_nm_object_cache_get (path));
if (ap)
ap = g_object_ref (ap);
else {
......@@ -512,7 +512,7 @@ demarshal_active_ap (NMObject *object, GParamSpec *pspec, GValue *value, gpointe
if (ap)
priv->active_ap = ap;
nm_object_queue_notify (object, NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT);
_nm_object_queue_notify (object, NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT);
return TRUE;
}
......@@ -521,15 +521,15 @@ register_for_property_changed (NMDeviceWifi *device)
{
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
const NMPropertiesChangedInfo property_changed_info[] = {
{ NM_DEVICE_WIFI_HW_ADDRESS, nm_object_demarshal_generic, &priv->hw_address },
{ NM_DEVICE_WIFI_MODE, nm_object_demarshal_generic, &priv->mode },
{ NM_DEVICE_WIFI_BITRATE, nm_object_demarshal_generic, &priv->rate },
{ NM_DEVICE_WIFI_HW_ADDRESS, _nm_object_demarshal_generic, &priv->hw_address },
{ NM_DEVICE_WIFI_MODE, _nm_object_demarshal_generic, &priv->mode },
{ NM_DEVICE_WIFI_BITRATE, _nm_object_demarshal_generic, &priv->rate },
{ NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT, demarshal_active_ap, &priv->active_ap },
{ NM_DEVICE_WIFI_CAPABILITIES, nm_object_demarshal_generic, &priv->wireless_caps },
{ NM_DEVICE_WIFI_CAPABILITIES, _nm_object_demarshal_generic, &priv->wireless_caps },
{ NULL },
};
nm_object_handle_properties_changed (NM_OBJECT (device),
_nm_object_handle_properties_changed (NM_OBJECT (device),
priv->proxy,
property_changed_info);
}
......
......@@ -87,7 +87,7 @@ demarshal_ip4_config (NMObject *object, GParamSpec *pspec, GValue *value, gpoint
if (!strcmp (path, "/"))
priv->null_ip4_config = TRUE;
else {
config = NM_IP4_CONFIG (nm_object_cache_get (path));
config = NM_IP4_CONFIG (_nm_object_cache_get (path));
if (config)
config = g_object_ref (config);
else {
......@@ -105,7 +105,7 @@ demarshal_ip4_config (NMObject *object, GParamSpec *pspec, GValue *value, gpoint
if (config)
priv->ip4_config = config;
nm_object_queue_notify (object, NM_DEVICE_IP4_CONFIG);
_nm_object_queue_notify (object, NM_DEVICE_IP4_CONFIG);
return TRUE;
}
......@@ -127,7 +127,7 @@ demarshal_dhcp4_config (NMObject *object, GParamSpec *pspec, GValue *value, gpoi
if (!strcmp (path, "/"))
priv->null_dhcp4_config = TRUE;
else {
config = NM_DHCP4_CONFIG (nm_object_cache_get (path));
config = NM_DHCP4_CONFIG (_nm_object_cache_get (path));
if (config)
config = g_object_ref (config);
else {
......@@ -145,7 +145,7 @@ demarshal_dhcp4_config (NMObject *object, GParamSpec *pspec, GValue *value, gpoi
if (config)
priv->dhcp4_config = config;
nm_object_queue_notify (object, NM_DEVICE_DHCP4_CONFIG);
_nm_object_queue_notify (object, NM_DEVICE_DHCP4_CONFIG);
return TRUE;
}
......@@ -154,17 +154,17 @@ register_for_property_changed (NMDevice *device)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device);
const NMPropertiesChangedInfo property_changed_info[] = {
{ NM_DEVICE_UDI, nm_object_demarshal_generic, &priv->udi },
{ NM_DEVICE_INTERFACE, nm_object_demarshal_generic, &priv->iface },
{ NM_DEVICE_DRIVER, nm_object_demarshal_generic, &priv->driver },
{ NM_DEVICE_CAPABILITIES, nm_object_demarshal_generic, &priv->capabilities },
{ NM_DEVICE_MANAGED, nm_object_demarshal_generic, &priv->managed },
{ NM_DEVICE_UDI, _nm_object_demarshal_generic, &priv->udi },
{ NM_DEVICE_INTERFACE, _nm_object_demarshal_generic, &priv->iface },
{ NM_DEVICE_DRIVER, _nm_object_demarshal_generic, &priv->driver },
{ NM_DEVICE_CAPABILITIES, _nm_object_demarshal_generic, &priv->capabilities },
{ NM_DEVICE_MANAGED, _nm_object_demarshal_generic, &priv->managed },
{ NM_DEVICE_IP4_CONFIG, demarshal_ip4_config, &priv->ip4_config },