core: PolicyKit protect Deactivate and Disconnect
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
* Copyright (C) 2007 - 2010 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include <dbus/dbus-glib.h>
|
||||
|
||||
#include "nm-marshal.h"
|
||||
#include "nm-setting-connection.h"
|
||||
#include "nm-device-interface.h"
|
||||
@@ -26,8 +28,8 @@
|
||||
#include "nm-properties-changed-signal.h"
|
||||
#include "nm-rfkill.h"
|
||||
|
||||
static gboolean impl_device_disconnect (NMDeviceInterface *device,
|
||||
GError **error);
|
||||
static void impl_device_disconnect (NMDeviceInterface *device,
|
||||
DBusGMethodInvocation *context);
|
||||
|
||||
#include "nm-device-interface-glue.h"
|
||||
|
||||
@@ -211,6 +213,13 @@ nm_device_interface_init (gpointer g_iface)
|
||||
G_TYPE_NONE, 3,
|
||||
G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
|
||||
|
||||
g_signal_new (NM_DEVICE_INTERFACE_DISCONNECT_REQUEST,
|
||||
iface_type,
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
0, NULL, NULL,
|
||||
g_cclosure_marshal_VOID__POINTER,
|
||||
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||
|
||||
dbus_g_object_type_install_info (iface_type,
|
||||
&dbus_glib_nm_device_interface_object_info);
|
||||
|
||||
@@ -334,11 +343,11 @@ nm_device_interface_disconnect (NMDeviceInterface *device,
|
||||
return success;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static void
|
||||
impl_device_disconnect (NMDeviceInterface *device,
|
||||
GError **error)
|
||||
DBusGMethodInvocation *context)
|
||||
{
|
||||
return nm_device_interface_disconnect (device, error);
|
||||
g_signal_emit_by_name (device, NM_DEVICE_INTERFACE_DISCONNECT_REQUEST, context);
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user