team: Add NM_CAPABILITY_TEAM

This commit is contained in:
Marius Vollmer 2016-09-16 11:14:20 +03:00 committed by Thomas Haller
parent 1bb00ae66a
commit 2ca1ce5d88
3 changed files with 5 additions and 1 deletions

View file

@ -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;
/**

View file

@ -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

View file

@ -23,6 +23,7 @@
#include <string.h>
#include <gmodule.h>
#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);
}