mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 08:10:17 +01:00
platform: add nm_linux_platform_new() constructor
(cherry picked from commit 45a9a6b30b)
This commit is contained in:
parent
4873850fd4
commit
b5bd562614
2 changed files with 12 additions and 1 deletions
|
|
@ -2417,12 +2417,21 @@ NM_LINUX_PLATFORM_GET_PRIVATE (const void *self)
|
|||
|
||||
G_DEFINE_TYPE (NMLinuxPlatform, nm_linux_platform, NM_TYPE_PLATFORM)
|
||||
|
||||
NMPlatform *
|
||||
nm_linux_platform_new (gboolean netns_support)
|
||||
{
|
||||
return g_object_new (NM_TYPE_LINUX_PLATFORM,
|
||||
NM_PLATFORM_REGISTER_SINGLETON, FALSE,
|
||||
NM_PLATFORM_NETNS_SUPPORT, netns_support,
|
||||
NULL);
|
||||
}
|
||||
|
||||
void
|
||||
nm_linux_platform_setup (void)
|
||||
{
|
||||
g_object_new (NM_TYPE_LINUX_PLATFORM,
|
||||
NM_PLATFORM_NETNS_SUPPORT, FALSE,
|
||||
NM_PLATFORM_REGISTER_SINGLETON, TRUE,
|
||||
NM_PLATFORM_NETNS_SUPPORT, FALSE,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ typedef struct {
|
|||
|
||||
GType nm_linux_platform_get_type (void);
|
||||
|
||||
NMPlatform *nm_linux_platform_new (gboolean netns_support);
|
||||
|
||||
void nm_linux_platform_setup (void);
|
||||
|
||||
#endif /* __NETWORKMANAGER_LINUX_PLATFORM_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue