From 2ca1ce5d88a659ca396547cf884dc35fb52257a2 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Fri, 16 Sep 2016 11:14:20 +0300 Subject: [PATCH] team: Add NM_CAPABILITY_TEAM --- libnm-core/nm-dbus-interface.h | 2 ++ src/devices/team/Makefile.am | 2 +- src/devices/team/nm-team-factory.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libnm-core/nm-dbus-interface.h b/libnm-core/nm-dbus-interface.h index 1e69cd0dac..7934f565d0 100644 --- a/libnm-core/nm-dbus-interface.h +++ b/libnm-core/nm-dbus-interface.h @@ -85,10 +85,12 @@ /** * NMCapability: + * @NM_CAPABILITY_TEAM: Teams can be managed * * #NMCapability names the numbers in the Capabilities property. **/ typedef enum { + NM_CAPABILITY_TEAM } NMCapability; /** diff --git a/src/devices/team/Makefile.am b/src/devices/team/Makefile.am index 00d824915d..f0ed8201be 100644 --- a/src/devices/team/Makefile.am +++ b/src/devices/team/Makefile.am @@ -9,6 +9,7 @@ AM_CPPFLAGS = \ -I${top_builddir}/src \ -I${top_srcdir}/src/devices \ -I${top_srcdir}/src/platform \ + -I${top_srcdir}/src/settings \ -I${top_builddir}/introspection \ -I${top_srcdir}/shared \ -I$(top_builddir)/shared \ @@ -54,4 +55,3 @@ check-local: $(call check_so_symbols,$(builddir)/.libs/libnm-device-plugin-team.so) endif - diff --git a/src/devices/team/nm-team-factory.c b/src/devices/team/nm-team-factory.c index 971efe8722..edb1329995 100644 --- a/src/devices/team/nm-team-factory.c +++ b/src/devices/team/nm-team-factory.c @@ -23,6 +23,7 @@ #include #include +#include "nm-manager.h" #include "nm-device-factory.h" #include "nm-team-factory.h" #include "nm-device-team.h" @@ -41,6 +42,7 @@ G_DEFINE_TYPE_EXTENDED (NMTeamFactory, nm_team_factory, G_TYPE_OBJECT, 0, G_MODULE_EXPORT NMDeviceFactory * nm_device_factory_create (GError **error) { + nm_manager_set_capability (nm_manager_get (), NM_CAPABILITY_TEAM); return (NMDeviceFactory *) g_object_new (NM_TYPE_TEAM_FACTORY, NULL); }