2007-02-20 Tambet Ingo <tambet@ximian.com>
* libnm-glib/nm-device-802-11-wireless.c: Add "network-added" and "network-removed" signals. * libnm-glib/libnm-glib.pc.in: Require NetworkManager >= 0.7.0. * libnm-glib/nm-access-point.c: Add "strength-changed" signal, emit it when receiving the signal from dbus. * src/nm-device-802-11-wireless.c (get_property): Fix PROP_ACTIVE_NETWORK property. * src/NetworkManagerPolicy.c (state_changed): Fix a typo to make the deactivation of the previously activated device working again. * src/nm-activation-request.c: Remove NMActStage property and it's getter and setter. * src/nm-device.c (nm_device_is_activated): Remove. state == NM_DEVICE_STATE_ACTIVATED is just as easy to use. * include/NetworkManager.h: Remove NM_DBUS_NO_DEVICES_ERROR, NM_DBUS_NO_DIALUP_ERROR, NM_DBUS_NO_NETWORKS_ERROR, NM_DBUS_NO_ACTIVE_DEVICE_ERROR, NM_DBUS_NO_ACTIVE_NET_ERROR errors and NM_DBUS_SIGNAL_STATE_CHANGE signal. Remove NMNetworkStatus and NMActStage enums. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2345 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -40,7 +40,6 @@ struct NMActRequest
|
||||
|
||||
gboolean user_requested;
|
||||
|
||||
NMActStage stage;
|
||||
DBusPendingCall * user_key_pcall;
|
||||
};
|
||||
|
||||
@@ -143,57 +142,6 @@ void nm_act_request_set_ip4_config (NMActRequest *req, NMIP4Config *ip4_config)
|
||||
req->ip4_config = g_object_ref (ip4_config);
|
||||
}
|
||||
|
||||
NMActStage nm_act_request_get_stage (NMActRequest *req)
|
||||
{
|
||||
g_return_val_if_fail (req != NULL, NM_ACT_STAGE_UNKNOWN);
|
||||
|
||||
return req->stage;
|
||||
}
|
||||
|
||||
void nm_act_request_set_stage (NMActRequest *req, NMActStage stage)
|
||||
{
|
||||
DBusMessage * message;
|
||||
char * dev_path = NULL;
|
||||
NMDBusManager * dbus_mgr = NULL;
|
||||
DBusConnection *dbus_connection;
|
||||
|
||||
g_return_if_fail (req != NULL);
|
||||
|
||||
req->stage = stage;
|
||||
|
||||
g_return_if_fail (req->data);
|
||||
g_return_if_fail (req->dev);
|
||||
|
||||
dbus_mgr = nm_dbus_manager_get ();
|
||||
dbus_connection = nm_dbus_manager_get_dbus_connection (dbus_mgr);
|
||||
if (!dbus_connection) {
|
||||
nm_warning ("couldn't get the dbus connection.");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!(dev_path = nm_dbus_get_object_path_for_device (req->dev)))
|
||||
goto out;
|
||||
|
||||
message = dbus_message_new_signal (NM_DBUS_PATH,
|
||||
NM_DBUS_INTERFACE,
|
||||
"DeviceActivationStage");
|
||||
if (!message) {
|
||||
nm_warning ("couldn't allocate the dbus message.");
|
||||
goto out;
|
||||
}
|
||||
|
||||
dbus_message_append_args (message,
|
||||
DBUS_TYPE_OBJECT_PATH, &dev_path,
|
||||
DBUS_TYPE_UINT32, &stage,
|
||||
DBUS_TYPE_INVALID);
|
||||
dbus_connection_send (dbus_connection, message, NULL);
|
||||
dbus_message_unref (message);
|
||||
|
||||
out:
|
||||
g_free (dev_path);
|
||||
g_object_unref (dbus_mgr);
|
||||
}
|
||||
|
||||
DBusPendingCall * nm_act_request_get_user_key_pending_call (NMActRequest *req)
|
||||
{
|
||||
g_return_val_if_fail (req != NULL, NULL);
|
||||
|
Reference in New Issue
Block a user