mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 02:30:08 +01:00
libnm-glib: implement stub update & delete functions
This commit is contained in:
parent
ce7ebaa7f9
commit
4fb162e754
1 changed files with 30 additions and 1 deletions
|
|
@ -44,7 +44,11 @@ static void impl_exported_connection_get_secrets (NMExportedConnection *connecti
|
|||
|
||||
#include "nm-exported-connection-glue.h"
|
||||
|
||||
G_DEFINE_TYPE (NMExportedConnection, nm_exported_connection, NM_TYPE_CONNECTION)
|
||||
static void settings_connection_interface_init (NMSettingsConnectionInterface *class);
|
||||
|
||||
G_DEFINE_TYPE_EXTENDED (NMExportedConnection, nm_exported_connection, NM_TYPE_CONNECTION, 0,
|
||||
G_IMPLEMENT_INTERFACE (NM_TYPE_SETTINGS_CONNECTION_INTERFACE,
|
||||
settings_connection_interface_init))
|
||||
|
||||
#define NM_EXPORTED_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
|
||||
NM_TYPE_EXPORTED_CONNECTION, \
|
||||
|
|
@ -90,6 +94,15 @@ impl_exported_connection_get_settings (NMExportedConnection *self,
|
|||
return *settings ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
update (NMSettingsConnectionInterface *connection,
|
||||
NMSettingsConnectionInterfaceUpdateFunc callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
callback (connection, NULL, user_data);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
impl_exported_connection_update (NMExportedConnection *self,
|
||||
GHashTable *new_settings,
|
||||
|
|
@ -117,6 +130,15 @@ impl_exported_connection_update (NMExportedConnection *self,
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
do_delete (NMSettingsConnectionInterface *connection,
|
||||
NMSettingsConnectionInterfaceDeleteFunc callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
callback (connection, NULL, user_data);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
impl_exported_connection_delete (NMExportedConnection *self,
|
||||
DBusGMethodInvocation *context)
|
||||
|
|
@ -152,6 +174,13 @@ impl_exported_connection_get_secrets (NMExportedConnection *self,
|
|||
|
||||
/**************************************************************/
|
||||
|
||||
static void
|
||||
settings_connection_interface_init (NMSettingsConnectionInterface *iface)
|
||||
{
|
||||
iface->update = update;
|
||||
iface->delete = do_delete;
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_exported_connection_new:
|
||||
* @scope: the Connection scope (either user or system)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue