mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 00:40:19 +01:00
wwan: implement plugin symbol visibility
For the factory, the only public symbols should be the factory functions. For the WWAN library, the only public symbols should be those that NMDeviceModem and NMDeviceBt use.
This commit is contained in:
parent
e62ac0d469
commit
4a58ff0807
7 changed files with 55 additions and 17 deletions
|
|
@ -49,7 +49,11 @@ libnm_wwan_la_SOURCES += \
|
|||
nm-modem-broadband.h
|
||||
endif
|
||||
|
||||
libnm_wwan_la_LDFLAGS = -avoid-version
|
||||
WWAN_SYMBOL_VIS_FILE=$(srcdir)/wwan-exports.ver
|
||||
|
||||
libnm_wwan_la_LDFLAGS = \
|
||||
-avoid-version \
|
||||
-Wl,--version-script=$(WWAN_SYMBOL_VIS_FILE)
|
||||
libnm_wwan_la_LIBADD = $(DBUS_LIBS) $(MM_GLIB_LIBS)
|
||||
|
||||
###########################################################
|
||||
|
|
@ -59,6 +63,8 @@ nm-device-modem-glue.h: $(top_srcdir)/introspection/nm-device-modem.xml
|
|||
|
||||
BUILT_SOURCES += nm-device-modem-glue.h
|
||||
|
||||
SYMBOL_VIS_FILE=$(srcdir)/exports.ver
|
||||
|
||||
libnm_device_plugin_wwan_la_SOURCES = \
|
||||
nm-wwan-factory.c \
|
||||
nm-wwan-factory.h \
|
||||
|
|
@ -66,7 +72,10 @@ libnm_device_plugin_wwan_la_SOURCES = \
|
|||
nm-device-modem.h \
|
||||
nm-device-modem-glue.h
|
||||
|
||||
libnm_device_plugin_wwan_la_LDFLAGS = -module -avoid-version
|
||||
libnm_device_plugin_wwan_la_LDFLAGS = \
|
||||
-module -avoid-version \
|
||||
-Wl,--version-script=$(SYMBOL_VIS_FILE)
|
||||
|
||||
libnm_device_plugin_wwan_la_LIBADD = \
|
||||
libnm-wwan.la \
|
||||
$(DBUS_LIBS)
|
||||
|
|
@ -74,4 +83,13 @@ libnm_device_plugin_wwan_la_LIBADD = \
|
|||
###########################################################
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
EXTRA_DIST = $(SYMBOL_VIS_FILE) $(WWAN_SYMBOL_VIS_FILE)
|
||||
|
||||
if ENABLE_TESTS
|
||||
|
||||
check-local:
|
||||
$(top_srcdir)/tools/check-exports.sh $(builddir)/.libs/libnm-device-plugin-wwan.so $(SYMBOL_VIS_FILE)
|
||||
$(top_srcdir)/tools/check-exports.sh $(builddir)/.libs/libnm-wwan.so $(WWAN_SYMBOL_VIS_FILE)
|
||||
|
||||
endif
|
||||
|
||||
|
|
|
|||
7
src/devices/wwan/exports.ver
Normal file
7
src/devices/wwan/exports.ver
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
global:
|
||||
nm_device_factory_create;
|
||||
nm_device_factory_get_device_type;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
|
@ -241,14 +241,6 @@ modem_removed_cb (NMModem *modem, gpointer user_data)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
NMModem *
|
||||
nm_device_modem_get_modem (NMDeviceModem *self)
|
||||
{
|
||||
g_return_val_if_fail (NM_IS_DEVICE_MODEM (self), NULL);
|
||||
|
||||
return NM_DEVICE_MODEM_GET_PRIVATE (self)->modem;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
owns_iface (NMDevice *device, const char *iface)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,7 +51,4 @@ GType nm_device_modem_get_type (void);
|
|||
|
||||
NMDevice *nm_device_modem_new (NMModem *modem);
|
||||
|
||||
/* Private for subclases */
|
||||
NMModem *nm_device_modem_get_modem (NMDeviceModem *self);
|
||||
|
||||
#endif /* NM_DEVICE_MODEM_H */
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ mm_state_to_nm (MMOldModemState mm_state, const char *unlock_required)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
DBusGProxy *
|
||||
static DBusGProxy *
|
||||
nm_modem_old_get_proxy (NMModemOld *self, const char *interface)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -48,9 +48,6 @@ GType nm_modem_old_get_type (void);
|
|||
|
||||
NMModem *nm_modem_old_new (const char *path, GHashTable *properties, GError **error);
|
||||
|
||||
/* Protected */
|
||||
DBusGProxy *nm_modem_old_get_proxy (NMModemOld *modem, const gchar *interface);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* NM_MODEM_OLD_H */
|
||||
|
|
|
|||
27
src/devices/wwan/wwan-exports.ver
Normal file
27
src/devices/wwan/wwan-exports.ver
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
global:
|
||||
nm_modem_act_stage1_prepare;
|
||||
nm_modem_act_stage2_config;
|
||||
nm_modem_check_connection_compatible;
|
||||
nm_modem_complete_connection;
|
||||
nm_modem_deactivate;
|
||||
nm_modem_device_state_changed;
|
||||
nm_modem_error_quark;
|
||||
nm_modem_get_capabilities;
|
||||
nm_modem_get_control_port;
|
||||
nm_modem_get_data_port;
|
||||
nm_modem_get_driver;
|
||||
nm_modem_get_path;
|
||||
nm_modem_get_secrets;
|
||||
nm_modem_get_state;
|
||||
nm_modem_get_type;
|
||||
nm_modem_get_uid;
|
||||
nm_modem_ip4_pre_commit;
|
||||
nm_modem_owns_port;
|
||||
nm_modem_set_mm_enabled;
|
||||
nm_modem_stage3_ip4_config_start;
|
||||
nm_modem_stage3_ip6_config_start;
|
||||
nm_modem_state_to_string;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
Loading…
Add table
Reference in a new issue