mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-21 21:30:33 +01:00
core: add nm_connection_provider_get_unmanaged_specs()
This commit is contained in:
parent
dbd0634c84
commit
7961e1bb8a
3 changed files with 21 additions and 3 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#include "nm-default.h"
|
||||
|
||||
#include "nm-connection-provider.h"
|
||||
|
||||
#include "nm-utils.h"
|
||||
|
||||
G_DEFINE_INTERFACE (NMConnectionProvider, nm_connection_provider, G_TYPE_OBJECT)
|
||||
|
|
@ -90,6 +91,14 @@ nm_connection_provider_get_connection_by_uuid (NMConnectionProvider *self,
|
|||
return NM_CONNECTION_PROVIDER_GET_INTERFACE (self)->get_connection_by_uuid (self, uuid);
|
||||
}
|
||||
|
||||
const GSList *
|
||||
nm_connection_provider_get_unmanaged_specs (NMConnectionProvider *self)
|
||||
{
|
||||
g_return_val_if_fail (NM_IS_CONNECTION_PROVIDER (self), NULL);
|
||||
|
||||
return NM_CONNECTION_PROVIDER_GET_INTERFACE (self)->get_unmanaged_specs (self);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -16,9 +16,7 @@
|
|||
#ifndef __NETWORKMANAGER_CONNECTION_PROVIDER_H__
|
||||
#define __NETWORKMANAGER_CONNECTION_PROVIDER_H__
|
||||
|
||||
#include <nm-connection.h>
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "nm-connection.h"
|
||||
|
||||
#define NM_TYPE_CONNECTION_PROVIDER (nm_connection_provider_get_type ())
|
||||
#define NM_CONNECTION_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CONNECTION_PROVIDER, NMConnectionProvider))
|
||||
|
|
@ -63,6 +61,8 @@ typedef struct {
|
|||
|
||||
NMConnection * (*get_connection_by_uuid) (NMConnectionProvider *self,
|
||||
const char *uuid);
|
||||
|
||||
const GSList * (*get_unmanaged_specs) (NMConnectionProvider *self);
|
||||
} NMConnectionProviderInterface;
|
||||
|
||||
GType nm_connection_provider_get_type (void);
|
||||
|
|
@ -124,4 +124,6 @@ NMConnection *nm_connection_provider_add_connection (NMConnectionProvider *self,
|
|||
NMConnection *nm_connection_provider_get_connection_by_uuid (NMConnectionProvider *self,
|
||||
const char *uuid);
|
||||
|
||||
const GSList *nm_connection_provider_get_unmanaged_specs (NMConnectionProvider *self);
|
||||
|
||||
#endif /* __NETWORKMANAGER_CONNECTION_PROVIDER_H__ */
|
||||
|
|
|
|||
|
|
@ -2151,6 +2151,12 @@ cp_get_connection_by_uuid (NMConnectionProvider *provider, const char *uuid)
|
|||
return NM_CONNECTION (nm_settings_get_connection_by_uuid (NM_SETTINGS (provider), uuid));
|
||||
}
|
||||
|
||||
static const GSList *
|
||||
cp_get_unmanaged_specs (NMConnectionProvider *provider)
|
||||
{
|
||||
return nm_settings_get_unmanaged_specs (NM_SETTINGS (provider));
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
|
||||
gboolean
|
||||
|
|
@ -2318,6 +2324,7 @@ connection_provider_iface_init (NMConnectionProviderInterface *cp_iface)
|
|||
cp_iface->get_connections = get_connections;
|
||||
cp_iface->add_connection = _nm_connection_provider_add_connection;
|
||||
cp_iface->get_connection_by_uuid = cp_get_connection_by_uuid;
|
||||
cp_iface->get_unmanaged_specs = cp_get_unmanaged_specs;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue