2011-11-18 15:52:42 -06:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
|
|
|
/* NetworkManager -- Network link manager
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
|
*
|
2014-02-09 10:22:19 -06:00
|
|
|
* Copyright (C) 2007 - 2014 Red Hat, Inc.
|
2011-11-18 15:52:42 -06:00
|
|
|
*/
|
|
|
|
|
|
all: fix up multiple-include-guard defines
Previously, src/nm-ip4-config.h, libnm/nm-ip4-config.h, and
libnm-glib/nm-ip4-config.h all used "NM_IP4_CONFIG_H" as an include
guard, which meant that nm-test-utils.h could not tell which of them
was being included (and so, eg, if you tried to include
nm-ip4-config.h in a libnm test, it would fail to compile because
nm-test-utils.h was referring to symbols in src/nm-ip4-config.h).
Fix this by changing the include guards in the non-API-stable parts of
the tree:
- libnm-glib/nm-ip4-config.h remains NM_IP4_CONFIG_H
- libnm/nm-ip4-config.h now uses __NM_IP4_CONFIG_H__
- src/nm-ip4-config.h now uses __NETWORKMANAGER_IP4_CONFIG_H__
And likewise for all other headers.
The two non-"nm"-prefixed headers, libnm/NetworkManager.h and
src/NetworkManagerUtils.h are now __NETWORKMANAGER_H__ and
__NETWORKMANAGER_UTILS_H__ respectively, which, while not entirely
consistent with the general scheme, do still mostly make sense in
isolation.
2014-08-13 14:10:11 -04:00
|
|
|
#ifndef __NETWORKMANAGER_DEVICE_FACTORY_H__
|
|
|
|
|
#define __NETWORKMANAGER_DEVICE_FACTORY_H__
|
2011-11-18 15:52:42 -06:00
|
|
|
|
2014-07-05 16:23:30 -04:00
|
|
|
#include "nm-dbus-interface.h"
|
2014-02-09 10:22:19 -06:00
|
|
|
#include "nm-device.h"
|
2011-11-18 15:52:42 -06:00
|
|
|
|
|
|
|
|
/* WARNING: this file is private API between NetworkManager and its internal
|
|
|
|
|
* device plugins. Its API can change at any time and is not guaranteed to be
|
|
|
|
|
* stable. NM and device plugins are distributed together and this API is
|
|
|
|
|
* not meant to enable third-party plugins.
|
|
|
|
|
*/
|
|
|
|
|
|
2014-02-09 10:22:19 -06:00
|
|
|
typedef struct _NMDeviceFactory NMDeviceFactory;
|
|
|
|
|
|
2011-11-18 15:52:42 -06:00
|
|
|
/**
|
2014-02-09 10:22:19 -06:00
|
|
|
* nm_device_factory_create:
|
|
|
|
|
* @error: an error if creation of the factory failed, or %NULL
|
2011-11-18 15:52:42 -06:00
|
|
|
*
|
2014-02-09 10:22:19 -06:00
|
|
|
* Creates a #GObject that implements the #NMDeviceFactory interface. This
|
|
|
|
|
* function must not emit any signals or perform any actions that would cause
|
|
|
|
|
* devices or components to be created immediately. Instead these should be
|
2014-09-05 14:48:21 -05:00
|
|
|
* deferred to the "start" interface method.
|
2011-11-18 15:52:42 -06:00
|
|
|
*
|
2014-02-09 10:22:19 -06:00
|
|
|
* Returns: the #GObject implementing #NMDeviceFactory or %NULL
|
2011-11-18 15:52:42 -06:00
|
|
|
*/
|
2014-02-09 10:22:19 -06:00
|
|
|
NMDeviceFactory *nm_device_factory_create (GError **error);
|
2011-11-18 15:52:42 -06:00
|
|
|
|
2014-02-09 10:22:19 -06:00
|
|
|
/* Should match nm_device_factory_create() */
|
|
|
|
|
typedef NMDeviceFactory * (*NMDeviceFactoryCreateFunc) (GError **error);
|
2011-11-18 15:52:42 -06:00
|
|
|
|
2014-02-09 10:22:19 -06:00
|
|
|
/********************************************************************/
|
|
|
|
|
|
|
|
|
|
#define NM_TYPE_DEVICE_FACTORY (nm_device_factory_get_type ())
|
|
|
|
|
#define NM_DEVICE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_FACTORY, NMDeviceFactory))
|
|
|
|
|
#define NM_IS_DEVICE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_FACTORY))
|
core: fix interface type names
A GObject interface, like a class, has two different C types
associated with it; the type of the "class" struct (eg, GObjectClass,
GFileIface), and the type of instances of that class/interface (eg,
GObject, GFile).
NetworkManager was doing this wrong though, and using the same C type
to point to both the interface's class struct and to instances of the
interface. This ends up not actually breaking anything, since for
interface types, the instance type is a non-dereferenceable dummy type
anyway. But it's wrong, since if, eg, NMDeviceFactory is a struct type
containing members "start", "device_added", etc, then you should not
be using an NMDeviceFactory* to point to an object that does not
contain those members.
Fix this by splitting NMDeviceFactory into NMDeviceFactoryInterface
and NMDeviceFactory; by splitting NMConnectionProvider into
NMConnectionProviderInterface and NMConnectionProvider; and by
splitting NMSettingsPlugin into NMSettingsPluginInterface and
NMSettingsPlugin; and then use the right types in the right places.
As a bonus, this also lets us now use G_DEFINE_INTERFACE.
2015-04-16 09:05:49 -04:00
|
|
|
#define NM_DEVICE_FACTORY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), NM_TYPE_DEVICE_FACTORY, NMDeviceFactoryInterface))
|
2014-02-09 10:22:19 -06:00
|
|
|
|
|
|
|
|
/* signals */
|
|
|
|
|
#define NM_DEVICE_FACTORY_COMPONENT_ADDED "component-added"
|
|
|
|
|
#define NM_DEVICE_FACTORY_DEVICE_ADDED "device-added"
|
|
|
|
|
|
core: fix interface type names
A GObject interface, like a class, has two different C types
associated with it; the type of the "class" struct (eg, GObjectClass,
GFileIface), and the type of instances of that class/interface (eg,
GObject, GFile).
NetworkManager was doing this wrong though, and using the same C type
to point to both the interface's class struct and to instances of the
interface. This ends up not actually breaking anything, since for
interface types, the instance type is a non-dereferenceable dummy type
anyway. But it's wrong, since if, eg, NMDeviceFactory is a struct type
containing members "start", "device_added", etc, then you should not
be using an NMDeviceFactory* to point to an object that does not
contain those members.
Fix this by splitting NMDeviceFactory into NMDeviceFactoryInterface
and NMDeviceFactory; by splitting NMConnectionProvider into
NMConnectionProviderInterface and NMConnectionProvider; and by
splitting NMSettingsPlugin into NMSettingsPluginInterface and
NMSettingsPlugin; and then use the right types in the right places.
As a bonus, this also lets us now use G_DEFINE_INTERFACE.
2015-04-16 09:05:49 -04:00
|
|
|
typedef struct {
|
2014-02-09 10:22:19 -06:00
|
|
|
GTypeInterface g_iface;
|
|
|
|
|
|
2014-09-05 14:48:21 -05:00
|
|
|
/**
|
2014-09-17 14:17:30 -05:00
|
|
|
* get_supported_types:
|
2014-09-05 14:48:21 -05:00
|
|
|
* @factory: the #NMDeviceFactory
|
2014-09-17 14:17:30 -05:00
|
|
|
* @out_link_types: on return, a %NM_LINK_TYPE_NONE terminated
|
|
|
|
|
* list of #NMLinkType that the plugin supports
|
|
|
|
|
* @out_setting_types: on return, a %NULL terminated list of
|
|
|
|
|
* base-type #NMSetting names that the plugin can create devices for
|
2014-09-05 14:48:21 -05:00
|
|
|
*
|
2014-09-17 14:17:30 -05:00
|
|
|
* Returns the #NMLinkType and #NMSetting names that this plugin
|
|
|
|
|
* supports. This function MUST be implemented.
|
2014-09-05 14:48:21 -05:00
|
|
|
*/
|
2014-09-17 14:17:30 -05:00
|
|
|
void (*get_supported_types) (NMDeviceFactory *factory,
|
|
|
|
|
const NMLinkType **out_link_types,
|
|
|
|
|
const char ***out_setting_types);
|
2014-09-05 14:48:21 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* start:
|
|
|
|
|
* @factory: the #NMDeviceFactory
|
|
|
|
|
*
|
|
|
|
|
* Start the factory and discover any existing devices that the factory
|
|
|
|
|
* can manage.
|
|
|
|
|
*/
|
2014-09-05 08:50:02 -05:00
|
|
|
void (*start) (NMDeviceFactory *factory);
|
2014-06-19 08:42:35 +02:00
|
|
|
|
2014-09-18 17:50:47 -05:00
|
|
|
/**
|
|
|
|
|
* get_connection_parent:
|
|
|
|
|
* @factory: the #NMDeviceFactory
|
|
|
|
|
* @connection: the #NMConnection to return the parent name for, if supported
|
|
|
|
|
*
|
|
|
|
|
* Given a connection, returns the a parent interface name, parent connection
|
|
|
|
|
* UUID, or parent device hardware address for @connection.
|
|
|
|
|
*
|
|
|
|
|
* Returns: the parent interface name, parent connection UUID, parent
|
|
|
|
|
* device hardware address, or %NULL
|
|
|
|
|
*/
|
|
|
|
|
const char * (*get_connection_parent) (NMDeviceFactory *factory,
|
|
|
|
|
NMConnection *connection);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* get_virtual_iface_name:
|
|
|
|
|
* @factory: the #NMDeviceFactory
|
|
|
|
|
* @connection: the #NMConnection to return the virtual interface name for
|
|
|
|
|
* @parent_iface: parent interface name
|
|
|
|
|
*
|
|
|
|
|
* Given a connection, returns the interface name that a device activating
|
|
|
|
|
* that connection would have.
|
|
|
|
|
*
|
|
|
|
|
* Returns: the interface name, or %NULL
|
|
|
|
|
*/
|
|
|
|
|
char * (*get_virtual_iface_name) (NMDeviceFactory *factory,
|
|
|
|
|
NMConnection *connection,
|
|
|
|
|
const char *parent_iface);
|
2014-06-19 08:42:35 +02:00
|
|
|
|
2014-09-05 08:50:02 -05:00
|
|
|
/**
|
|
|
|
|
* create_device:
|
|
|
|
|
* @factory: the #NMDeviceFactory
|
|
|
|
|
* @iface: the interface name of the device
|
|
|
|
|
* @plink: the #NMPlatformLink if backed by a kernel device
|
|
|
|
|
* @connection: the #NMConnection if not backed by a kernel device
|
|
|
|
|
* @out_ignore: on return, %TRUE if the link should be ignored
|
|
|
|
|
*
|
|
|
|
|
* The plugin should create a new unrealized device using the details given
|
|
|
|
|
* by @iface and @plink or @connection. If both @iface and @plink are given,
|
|
|
|
|
* they are guaranteed to match. If both @iface and @connection are given,
|
|
|
|
|
* @iface is guaranteed to be the interface name that @connection specifies.
|
|
|
|
|
*
|
|
|
|
|
* If the plugin cannot create a #NMDevice for the link and wants the
|
|
|
|
|
* core to ignore it, set @out_ignore to %TRUE and return %NULL.
|
|
|
|
|
*
|
|
|
|
|
* Returns: the new unrealized #NMDevice, or %NULL
|
|
|
|
|
*/
|
|
|
|
|
NMDevice * (*create_device) (NMDeviceFactory *factory,
|
|
|
|
|
const char *iface,
|
2016-01-10 15:13:20 +01:00
|
|
|
const NMPlatformLink *plink,
|
2014-09-05 08:50:02 -05:00
|
|
|
NMConnection *connection,
|
|
|
|
|
gboolean *out_ignore);
|
|
|
|
|
|
2014-02-09 10:22:19 -06:00
|
|
|
/* Signals */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* device_added:
|
|
|
|
|
* @factory: the #NMDeviceFactory
|
|
|
|
|
* @device: the new #NMDevice subclass
|
|
|
|
|
*
|
|
|
|
|
* The factory emits this signal if it finds a new device by itself.
|
|
|
|
|
*/
|
|
|
|
|
void (*device_added) (NMDeviceFactory *factory, NMDevice *device);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* component_added:
|
|
|
|
|
* @factory: the #NMDeviceFactory
|
|
|
|
|
* @component: a new component which existing devices may wish to claim
|
|
|
|
|
*
|
|
|
|
|
* The factory emits this signal when it finds a new component. For example,
|
|
|
|
|
* the WWAN factory may indicate that a new modem is available, which an
|
|
|
|
|
* existing Bluetooth device may wish to claim. If no device claims the
|
|
|
|
|
* component, the plugin is allowed to create a new #NMDevice instance for
|
|
|
|
|
* that component and emit the "device-added" signal.
|
|
|
|
|
*
|
|
|
|
|
* Returns: %TRUE if the component was claimed by a device, %FALSE if not
|
|
|
|
|
*/
|
|
|
|
|
gboolean (*component_added) (NMDeviceFactory *factory, GObject *component);
|
core: fix interface type names
A GObject interface, like a class, has two different C types
associated with it; the type of the "class" struct (eg, GObjectClass,
GFileIface), and the type of instances of that class/interface (eg,
GObject, GFile).
NetworkManager was doing this wrong though, and using the same C type
to point to both the interface's class struct and to instances of the
interface. This ends up not actually breaking anything, since for
interface types, the instance type is a non-dereferenceable dummy type
anyway. But it's wrong, since if, eg, NMDeviceFactory is a struct type
containing members "start", "device_added", etc, then you should not
be using an NMDeviceFactory* to point to an object that does not
contain those members.
Fix this by splitting NMDeviceFactory into NMDeviceFactoryInterface
and NMDeviceFactory; by splitting NMConnectionProvider into
NMConnectionProviderInterface and NMConnectionProvider; and by
splitting NMSettingsPlugin into NMSettingsPluginInterface and
NMSettingsPlugin; and then use the right types in the right places.
As a bonus, this also lets us now use G_DEFINE_INTERFACE.
2015-04-16 09:05:49 -04:00
|
|
|
} NMDeviceFactoryInterface;
|
2014-02-09 10:22:19 -06:00
|
|
|
|
|
|
|
|
GType nm_device_factory_get_type (void);
|
|
|
|
|
|
2014-09-17 14:17:30 -05:00
|
|
|
void nm_device_factory_get_supported_types (NMDeviceFactory *factory,
|
|
|
|
|
const NMLinkType **out_link_types,
|
|
|
|
|
const char ***out_setting_types);
|
2014-09-05 14:48:21 -05:00
|
|
|
|
2014-09-18 17:50:47 -05:00
|
|
|
const char *nm_device_factory_get_connection_parent (NMDeviceFactory *factory,
|
|
|
|
|
NMConnection *connection);
|
|
|
|
|
|
|
|
|
|
char * nm_device_factory_get_virtual_iface_name (NMDeviceFactory *factory,
|
|
|
|
|
NMConnection *connection,
|
2016-01-21 17:36:08 +01:00
|
|
|
const char *parent_iface,
|
|
|
|
|
GError **error);
|
2014-09-18 17:50:47 -05:00
|
|
|
|
2014-09-05 14:48:21 -05:00
|
|
|
void nm_device_factory_start (NMDeviceFactory *factory);
|
|
|
|
|
|
2014-09-05 08:50:02 -05:00
|
|
|
NMDevice * nm_device_factory_create_device (NMDeviceFactory *factory,
|
|
|
|
|
const char *iface,
|
2016-01-10 15:13:20 +01:00
|
|
|
const NMPlatformLink *plink,
|
2014-09-05 08:50:02 -05:00
|
|
|
NMConnection *connection,
|
|
|
|
|
gboolean *out_ignore,
|
|
|
|
|
GError **error);
|
2014-06-19 08:42:35 +02:00
|
|
|
|
2014-02-09 10:22:19 -06:00
|
|
|
/* For use by implementations */
|
|
|
|
|
gboolean nm_device_factory_emit_component_added (NMDeviceFactory *factory,
|
|
|
|
|
GObject *component);
|
2011-11-18 15:52:42 -06:00
|
|
|
|
2014-09-17 14:17:30 -05:00
|
|
|
#define NM_DEVICE_FACTORY_DECLARE_LINK_TYPES(...) \
|
|
|
|
|
{ static const NMLinkType _df_links[] = { __VA_ARGS__, NM_LINK_TYPE_NONE }; *out_link_types = _df_links; }
|
|
|
|
|
#define NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES(...) \
|
|
|
|
|
{ static const char *_df_settings[] = { __VA_ARGS__, NULL }; *out_setting_types = _df_settings; }
|
|
|
|
|
|
|
|
|
|
extern const NMLinkType _nm_device_factory_no_default_links[];
|
|
|
|
|
extern const char *_nm_device_factory_no_default_settings[];
|
|
|
|
|
|
|
|
|
|
#define NM_DEVICE_FACTORY_DECLARE_TYPES(...) \
|
|
|
|
|
static void \
|
|
|
|
|
get_supported_types (NMDeviceFactory *factory, \
|
|
|
|
|
const NMLinkType **out_link_types, \
|
|
|
|
|
const char ***out_setting_types) \
|
|
|
|
|
{ \
|
|
|
|
|
*out_link_types = _nm_device_factory_no_default_links; \
|
|
|
|
|
*out_setting_types = _nm_device_factory_no_default_settings; \
|
|
|
|
|
\
|
|
|
|
|
{ __VA_ARGS__; } \
|
|
|
|
|
} \
|
|
|
|
|
\
|
|
|
|
|
|
2014-09-05 15:57:40 -05:00
|
|
|
/**************************************************************************
|
|
|
|
|
* INTERNAL DEVICE FACTORY FUNCTIONS - devices provided by plugins should
|
|
|
|
|
* not use these functions.
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
2014-09-17 14:17:30 -05:00
|
|
|
#define NM_DEVICE_FACTORY_DEFINE_INTERNAL(upper, mixed, lower, st_code, dfi_code) \
|
2014-09-05 15:57:40 -05:00
|
|
|
typedef GObject NM##mixed##Factory; \
|
|
|
|
|
typedef GObjectClass NM##mixed##FactoryClass; \
|
|
|
|
|
\
|
|
|
|
|
static GType nm_##lower##_factory_get_type (void); \
|
core: fix interface type names
A GObject interface, like a class, has two different C types
associated with it; the type of the "class" struct (eg, GObjectClass,
GFileIface), and the type of instances of that class/interface (eg,
GObject, GFile).
NetworkManager was doing this wrong though, and using the same C type
to point to both the interface's class struct and to instances of the
interface. This ends up not actually breaking anything, since for
interface types, the instance type is a non-dereferenceable dummy type
anyway. But it's wrong, since if, eg, NMDeviceFactory is a struct type
containing members "start", "device_added", etc, then you should not
be using an NMDeviceFactory* to point to an object that does not
contain those members.
Fix this by splitting NMDeviceFactory into NMDeviceFactoryInterface
and NMDeviceFactory; by splitting NMConnectionProvider into
NMConnectionProviderInterface and NMConnectionProvider; and by
splitting NMSettingsPlugin into NMSettingsPluginInterface and
NMSettingsPlugin; and then use the right types in the right places.
As a bonus, this also lets us now use G_DEFINE_INTERFACE.
2015-04-16 09:05:49 -04:00
|
|
|
static void device_factory_interface_init (NMDeviceFactoryInterface *factory_iface); \
|
2014-09-05 15:57:40 -05:00
|
|
|
\
|
|
|
|
|
G_DEFINE_TYPE_EXTENDED (NM##mixed##Factory, nm_##lower##_factory, G_TYPE_OBJECT, 0, \
|
|
|
|
|
G_IMPLEMENT_INTERFACE (NM_TYPE_DEVICE_FACTORY, device_factory_interface_init) \
|
|
|
|
|
_nm_device_factory_internal_register_type (g_define_type_id);) \
|
|
|
|
|
\
|
|
|
|
|
/* Use a module constructor to register the factory's GType at load \
|
|
|
|
|
* time, which then calls _nm_device_factory_internal_register_type() \
|
|
|
|
|
* to register the factory's GType with the Manager. \
|
|
|
|
|
*/ \
|
|
|
|
|
static void __attribute__((constructor)) \
|
|
|
|
|
register_device_factory_internal_##lower (void) \
|
|
|
|
|
{ \
|
2014-07-10 10:41:31 +02:00
|
|
|
nm_g_type_init (); \
|
2014-09-05 15:57:40 -05:00
|
|
|
g_type_ensure (NM_TYPE_##upper##_FACTORY); \
|
|
|
|
|
} \
|
|
|
|
|
\
|
2014-09-17 14:17:30 -05:00
|
|
|
NM_DEVICE_FACTORY_DECLARE_TYPES(st_code) \
|
2014-09-05 15:57:40 -05:00
|
|
|
\
|
|
|
|
|
static void \
|
core: fix interface type names
A GObject interface, like a class, has two different C types
associated with it; the type of the "class" struct (eg, GObjectClass,
GFileIface), and the type of instances of that class/interface (eg,
GObject, GFile).
NetworkManager was doing this wrong though, and using the same C type
to point to both the interface's class struct and to instances of the
interface. This ends up not actually breaking anything, since for
interface types, the instance type is a non-dereferenceable dummy type
anyway. But it's wrong, since if, eg, NMDeviceFactory is a struct type
containing members "start", "device_added", etc, then you should not
be using an NMDeviceFactory* to point to an object that does not
contain those members.
Fix this by splitting NMDeviceFactory into NMDeviceFactoryInterface
and NMDeviceFactory; by splitting NMConnectionProvider into
NMConnectionProviderInterface and NMConnectionProvider; and by
splitting NMSettingsPlugin into NMSettingsPluginInterface and
NMSettingsPlugin; and then use the right types in the right places.
As a bonus, this also lets us now use G_DEFINE_INTERFACE.
2015-04-16 09:05:49 -04:00
|
|
|
device_factory_interface_init (NMDeviceFactoryInterface *factory_iface) \
|
2014-09-05 15:57:40 -05:00
|
|
|
{ \
|
2014-09-17 14:17:30 -05:00
|
|
|
factory_iface->get_supported_types = get_supported_types; \
|
2014-09-05 15:57:40 -05:00
|
|
|
dfi_code \
|
|
|
|
|
} \
|
|
|
|
|
\
|
|
|
|
|
static void \
|
|
|
|
|
nm_##lower##_factory_init (NM##mixed##Factory *self) \
|
|
|
|
|
{ \
|
|
|
|
|
} \
|
|
|
|
|
\
|
|
|
|
|
static void \
|
|
|
|
|
nm_##lower##_factory_class_init (NM##mixed##FactoryClass *lower##_class) \
|
|
|
|
|
{ \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void _nm_device_factory_internal_register_type (GType factory_type);
|
2014-09-17 14:17:30 -05:00
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* PRIVATE FACTORY FUNCTIONS - for factory consumers (eg, NMManager).
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
|
typedef void (*NMDeviceFactoryManagerFactoryFunc) (NMDeviceFactory *factory,
|
|
|
|
|
gpointer user_data);
|
|
|
|
|
|
|
|
|
|
void nm_device_factory_manager_load_factories (NMDeviceFactoryManagerFactoryFunc callback,
|
|
|
|
|
gpointer user_data);
|
|
|
|
|
|
|
|
|
|
NMDeviceFactory * nm_device_factory_manager_find_factory_for_link_type (NMLinkType link_type);
|
|
|
|
|
|
|
|
|
|
NMDeviceFactory * nm_device_factory_manager_find_factory_for_connection (NMConnection *connection);
|
|
|
|
|
|
|
|
|
|
void nm_device_factory_manager_for_each_factory (NMDeviceFactoryManagerFactoryFunc callback,
|
|
|
|
|
gpointer user_data);
|
2011-11-18 15:52:42 -06:00
|
|
|
|
2014-09-05 15:57:40 -05:00
|
|
|
#endif /* __NETWORKMANAGER_DEVICE_FACTORY_H__ */
|