*.lo
*.la
*.bz2
+*.gir
+*.typelib
Makefile
Makefile.in*
configure
--with-tests=yes \
--with-docs=yes \
--with-udev-dir=$$dc_install_base/lib/udev \
- --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
+ --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
+ --enable-wimax=no
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
AC_SUBST(GIO_CFLAGS)
AC_SUBST(GIO_LIBS)
+GOBJECT_INTROSPECTION_CHECK([0.9.6])
+
AC_ARG_WITH(udev-dir, AS_HELP_STRING([--with-udev-dir=DIR], [where the udev base directory is]))
if test -n "$with_udev_dir" ; then
UDEV_BASE_DIR="$with_udev_dir"
$(DBUS_LIBS) \
$(GLIB_LIBS)
+libdeprecateddir = $(includedir)/libnm-glib
+libdeprecated_HEADERS = libnm_glib.h
+
#####################################################
# Real libnm-glib stuff
#####################################################
$(GUDEV_CFLAGS)
libnmincludedir = $(includedir)/libnm-glib
+libnmvpndir = $(includedir)/libnm-glib
libnminclude_HEADERS = \
- libnm_glib.h \
nm-object.h \
nm-client.h \
nm-device.h \
nm-cdma-device.h \
nm-serial-device.h \
nm-vpn-connection.h \
- nm-vpn-plugin.h \
- nm-vpn-plugin-ui-interface.h \
nm-types.h \
nm-active-connection.h \
nm-dhcp4-config.h \
nm-device-wimax.h \
nm-wimax-nsp.h
-libnm_glib_la_SOURCES = \
+libnmvpn_HEADERS = \
+ nm-vpn-plugin.h \
+ nm-vpn-plugin-ui-interface.h
+
+libnm_glib_la_csources = \
nm-object.c \
- nm-object-private.h \
nm-client.c \
nm-dbus-utils.c \
- nm-dbus-utils.h \
nm-device.c \
- nm-device-private.h \
nm-device-ethernet.c \
nm-device-wifi.c \
nm-device-bt.c \
nm-serial-device.c \
nm-vpn-connection.c \
nm-types.c \
- nm-types-private.h \
nm-object-cache.c \
- nm-object-cache.h \
nm-active-connection.c \
nm-dhcp4-config.c \
nm-ip6-config.c \
nm-dhcp6-config.c \
nm-remote-connection.c \
- nm-remote-connection-private.h \
nm-remote-settings.c \
nm-secret-agent.c \
nm-device-wimax.c \
nm-wimax-nsp.c
+libnm_glib_la_private_headers = \
+ nm-object-private.h \
+ nm-dbus-utils.h \
+ nm-device-private.h \
+ nm-types-private.h \
+ nm-object-cache.h \
+ nm-remote-connection-private.h
+
+libnm_glib_la_SOURCES = \
+ $(libnm_glib_la_csources) \
+ $(libnm_glib_la_private_headers)
+
libnm_glib_la_LIBADD = \
$(top_builddir)/libnm-util/libnm-util.la \
$(top_builddir)/marshallers/libmarshallers.la \
$(GUDEV_LIBS)
libnm_glib_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libnm-glib.ver \
- -version-info "6:2:4"
+ -version-info "7:0:5"
noinst_PROGRAMS = libnm-glib-test
EXTRA_DIST = libnm-glib.pc.in libnm-glib-vpn.pc.in libnm-glib.ver libnm-glib-vpn.ver
CLEANFILES = $(BUILT_SOURCES)
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_COMPILER_ARGS = --includedir=$(top_builddir)/libnm-util
+
+if HAVE_INTROSPECTION
+introspection_sources = $(libnminclude_HEADERS) $(libnm_glib_la_csources)
+
+NMClient-1.0.gir: libnm-glib.la
+NMClient_1_0_gir_INCLUDES = GObject-2.0 DBusGLib-1.0
+NMClient_1_0_gir_PACKAGES = gobject-2.0 dbus-glib-1 gudev-1.0
+NMClient_1_0_gir_CFLAGS = $(INCLUDES)
+NMClient_1_0_gir_LIBS = libnm-glib.la
+NMClient_1_0_gir_FILES = $(introspection_sources)
+NMClient_1_0_gir_SCANNERFLAGS = --warn-all --identifier-prefix=NM --symbol-prefix=nm_ --include-uninstalled=$(top_builddir)/libnm-util/NetworkManager-1.0.gir
+INTROSPECTION_GIRS += NMClient-1.0.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(gir_DATA) $(typelib_DATA)
+endif
Name: libnm-glib
Description: Convenience library for clients of NetworkManager
Version: @VERSION@
-Requires: NetworkManager >= 0.7.999 glib-2.0 dbus-glib-1
+Requires: NetworkManager >= 0.7.999 gobject-2.0 dbus-glib-1
Cflags: -I${includedir}/libnm-glib
Libs: -L${libdir} -lnm-glib
*
* Gets the #NMDevice<!-- -->s used for the active connections.
*
- * Returns: the #GPtrArray containing #NMDevice<!-- -->s.
+ * Returns: (element-type NMClient.Device): the #GPtrArray containing #NMDevice<!-- -->s.
* This is the internal copy used by the connection, and must not be modified.
**/
const GPtrArray *
switch (prop_id) {
case PROP_CONNECTION:
- g_value_set_boxed (value, nm_active_connection_get_connection (self));
+ g_value_set_string (value, nm_active_connection_get_connection (self));
break;
case PROP_SPECIFIC_OBJECT:
g_value_set_boxed (value, nm_active_connection_get_specific_object (self));
g_value_set_boolean (value, priv->manager_running);
break;
case PROP_NETWORKING_ENABLED:
- g_value_set_boolean (value, priv->networking_enabled);
+ g_value_set_boolean (value, nm_client_networking_get_enabled (self));
break;
case PROP_WIRELESS_ENABLED:
g_value_set_boolean (value, priv->wireless_enabled);
* NMClient::active-connections:
*
* The active connections.
+ * Type: GPtrArray<NMClient.ActiveConnection>
**/
g_object_class_install_property
(object_class, PROP_ACTIVE_CONNECTIONS,
/**
* NMClient::device-added:
* @client: the client that received the signal
- * @device: the new device
+ * @device: (type NMClient.Device): the new device
*
* Notifies that a #NMDevice is added.
**/
/**
* NMClient::device-removed:
* @widget: the client that received the signal
- * @device: the removed device
+ * @device: (type NMClient.Device): the removed device
*
* Notifies that a #NMDevice is removed.
**/
*
* Gets all the detected devices.
*
- * Returns: a #GPtrArray containing all the #NMDevice<!-- -->s.
+ * Returns: (transfer none) (element-type NMClient.Device): a #GPtrArray containing all the #NMDevice<!-- -->s.
* The returned array is owned by the client and should not be modified.
**/
const GPtrArray *
*
* Gets a #NMDevice from a #NMClient.
*
- * Returns: the #NMDevice for the given @object_path or %NULL if none is found.
+ * Returns: (transfer none): the #NMDevice for the given @object_path or %NULL if none is found.
**/
NMDevice *
nm_client_get_device_by_path (NMClient *client, const char *object_path)
* @device: the #NMDevice
* @specific_object: the device specific object (currently used only for
* activating wireless devices and should be the #NMAccessPoint<!-- -->'s path.
- * @callback: the function to call when the call is done
+ * @callback: (scope async): the function to call when the call is done
* @user_data: user data to pass to the callback function
*
* Activates a connection with the given #NMDevice.
* and will be completed by NetworkManager using the given @device and
* @specific_object before being added
* @device: the #NMDevice
- * @specific_object: the object path of a connection-type-specific object this
- * activation should use. This parameter is currently ignored for wired and
- * mobile broadband connections, and the value of NULL should be used (ie, no
- * specific object). For WiFi connections, pass the object path of a specific
- * AP from the card's scan list, which will be used to complete the details of
- * the newly added connection.
- * @callback: the function to call when the call is done
- * @user_data: user data to pass to the callback function
+ * @specific_object: (allow-none): the object path of a connection-type-specific
+ * object this activation should use. This parameter is currently ignored for
+ * wired and mobile broadband connections, and the value of NULL should be used
+ * (ie, no specific object). For WiFi connections, pass the object path of a
+ * specific AP from the card's scan list, which will be used to complete the
+ * details of the newly added connection.
+ * @callback: (scope async): the function to call when the call is done
+ * @user_data: (closure): user data to pass to the callback function
*
* Adds a new connection using the given details (if any) as a template
* (automatically filling in missing settings with the capabilities of the
*
* Gets the active connections.
*
- * Returns: a #GPtrArray containing all the active #NMActiveConnection<!-- -->s.
+ * Returns: (transfer none) (element-type NMClient.ActiveConnection): a #GPtrArray
+* containing all the active #NMActiveConnection<!-- -->s.
* The returned array is owned by the client and should not be modified.
**/
const GPtrArray *
*
* Gets the active #NMAccessPoint.
*
- * Returns: the access point or %NULL if none is active
+ * Returns: (transfer none): the access point or %NULL if none is active
**/
NMAccessPoint *
nm_device_wifi_get_active_access_point (NMDeviceWifi *device)
*
* Gets all the scanned access points of the #NMDeviceWifi.
*
- * Returns: a #GPtrArray containing all the scanned #NMAccessPoint<!-- -->s.
+ * Returns: (element-type NMClient.AccessPoint): a #GPtrArray containing all the
+ * scanned #NMAccessPoint<!-- -->s.
* The returned array is owned by the client and should not be modified.
**/
const GPtrArray *
*
* Gets a #NMAccessPoint by path.
*
- * Returns: the access point or %NULL if none is found.
+ * Returns: (transfer none): the access point or %NULL if none is found.
**/
NMAccessPoint *
nm_device_wifi_get_access_point_by_path (NMDeviceWifi *device,
/**
* nm_device_wimax_get_hw_address:
- * @device: a #NMDeviceWimax
+ * @wimax: a #NMDeviceWimax
*
* Gets the hardware (MAC) address of the #NMDeviceWimax
*
* Returns: the hardware address. This is the internal string used by the
- * device, and must not be modified.
+ * device, and must not be modified.
**/
const char *
nm_device_wimax_get_hw_address (NMDeviceWimax *wimax)
*
* Gets the active #NMWimaxNsp.
*
- * Returns: the access point or %NULL if none is active
+ * Returns: (transfer full): the access point or %NULL if none is active
**/
NMWimaxNsp *
nm_device_wimax_get_active_nsp (NMDeviceWimax *wimax)
*
* Gets all the scanned NSPs of the #NMDeviceWimax.
*
- * Returns: a #GPtrArray containing all the scanned #NMWimaxNsp<!-- -->s.
+ * Returns: (element-type NMClient.WimaxNsp): a #GPtrArray containing
+ * all the scanned #NMWimaxNsp<!-- -->s.
* The returned array is owned by the client and should not be modified.
**/
const GPtrArray *
*
* Gets a #NMWimaxNsp by path.
*
- * Returns: the access point or %NULL if none is found.
+ * Returns: (transfer none): the access point or %NULL if none is found.
**/
NMWimaxNsp *
nm_device_wimax_get_nsp_by_path (NMDeviceWimax *wimax,
/**
* nm_device_wimax_get_center_frequency:
- * @device: a #NMDeviceWimax
+ * @self: a #NMDeviceWimax
*
* Gets the center frequency (in KHz) of the radio channel the device is using
* to communicate with the network when connected. Has no meaning when the
* Returns: the center frequency in KHz, or 0
**/
guint
-nm_device_wimax_get_center_frequency (NMDeviceWimax *wimax)
+nm_device_wimax_get_center_frequency (NMDeviceWimax *self)
{
NMDeviceWimaxPrivate *priv;
- g_return_val_if_fail (NM_IS_DEVICE_WIMAX (wimax), 0);
+ g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), 0);
- priv = NM_DEVICE_WIMAX_GET_PRIVATE (wimax);
+ priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
if (!priv->center_freq) {
- priv->center_freq = _nm_object_get_uint_property (NM_OBJECT (wimax),
+ priv->center_freq = _nm_object_get_uint_property (NM_OBJECT (self),
NM_DBUS_INTERFACE_DEVICE_WIMAX,
DBUS_PROP_CENTER_FREQUENCY);
}
/**
* nm_device_wimax_get_rssi:
- * @device: a #NMDeviceWimax
+ * @self: a #NMDeviceWimax
*
* Gets the RSSI of the current radio link in dBm. This value indicates how
* strong the raw received RF signal from the base station is, but does not
* Returns: the RSSI in dBm, or 0
**/
gint
-nm_device_wimax_get_rssi (NMDeviceWimax *wimax)
+nm_device_wimax_get_rssi (NMDeviceWimax *self)
{
NMDeviceWimaxPrivate *priv;
- g_return_val_if_fail (NM_IS_DEVICE_WIMAX (wimax), 0);
+ g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), 0);
- priv = NM_DEVICE_WIMAX_GET_PRIVATE (wimax);
+ priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
if (!priv->rssi) {
- priv->rssi = _nm_object_get_int_property (NM_OBJECT (wimax),
+ priv->rssi = _nm_object_get_int_property (NM_OBJECT (self),
NM_DBUS_INTERFACE_DEVICE_WIMAX,
DBUS_PROP_RSSI);
}
/**
* nm_device_wimax_get_cinr:
- * @device: a #NMDeviceWimax
+ * @self: a #NMDeviceWimax
*
* Gets the CINR (Carrier to Interference + Noise Ratio) of the current radio
* link in dB. CINR is a more accurate measure of radio link quality. Has no
* Returns: the CINR in dB, or 0
**/
gint
-nm_device_wimax_get_cinr (NMDeviceWimax *wimax)
+nm_device_wimax_get_cinr (NMDeviceWimax *self)
{
NMDeviceWimaxPrivate *priv;
- g_return_val_if_fail (NM_IS_DEVICE_WIMAX (wimax), 0);
+ g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), 0);
- priv = NM_DEVICE_WIMAX_GET_PRIVATE (wimax);
+ priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
if (!priv->cinr) {
- priv->cinr = _nm_object_get_int_property (NM_OBJECT (wimax),
+ priv->cinr = _nm_object_get_int_property (NM_OBJECT (self),
NM_DBUS_INTERFACE_DEVICE_WIMAX,
DBUS_PROP_CINR);
}
/**
* nm_device_wimax_get_tx_power:
- * @device: a #NMDeviceWimax
+ * @self: a #NMDeviceWimax
*
* Average power of the last burst transmitted by the device, in units of
* 0.5 dBm. i.e. a TxPower of -11 represents an actual device TX power of
* Returns: the TX power in dBm, or 0
**/
gint
-nm_device_wimax_get_tx_power (NMDeviceWimax *wimax)
+nm_device_wimax_get_tx_power (NMDeviceWimax *self)
{
NMDeviceWimaxPrivate *priv;
- g_return_val_if_fail (NM_IS_DEVICE_WIMAX (wimax), 0);
+ g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), 0);
- priv = NM_DEVICE_WIMAX_GET_PRIVATE (wimax);
+ priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
if (!priv->tx_power) {
- priv->tx_power = _nm_object_get_int_property (NM_OBJECT (wimax),
+ priv->tx_power = _nm_object_get_int_property (NM_OBJECT (self),
NM_DBUS_INTERFACE_DEVICE_WIMAX,
DBUS_PROP_TX_POWER);
}
/**
* nm_device_wimax_get_bsid:
- * @device: a #NMDeviceWimax
+ * @self: a #NMDeviceWimax
*
* Gets the ID of the serving Base Station when the device is connected.
*
* Returns: the ID of the serving Base Station, or NULL
**/
const char *
-nm_device_wimax_get_bsid (NMDeviceWimax *wimax)
+nm_device_wimax_get_bsid (NMDeviceWimax *self)
{
NMDeviceWimaxPrivate *priv;
- g_return_val_if_fail (NM_IS_DEVICE_WIMAX (wimax), NULL);
+ g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), NULL);
- priv = NM_DEVICE_WIMAX_GET_PRIVATE (wimax);
+ priv = NM_DEVICE_WIMAX_GET_PRIVATE (self);
if (!priv->bsid) {
- priv->bsid = _nm_object_get_string_property (NM_OBJECT (wimax),
+ priv->bsid = _nm_object_get_string_property (NM_OBJECT (self),
NM_DBUS_INTERFACE_DEVICE_WIMAX,
DBUS_PROP_BSID);
}
*
* Gets the current #NMIP4Config associated with the #NMDevice.
*
- * Returns: the #NMIP4Config or %NULL if the device is not activated.
+ * Returns: (transfer none): the #NMIP4Config or %NULL if the device is not activated.
**/
NMIP4Config *
nm_device_get_ip4_config (NMDevice *device)
*
* Gets the current #NMDHCP4Config associated with the #NMDevice.
*
- * Returns: the #NMDHCPConfig or %NULL if the device is not activated or not
+ * Returns: (transfer none): the #NMDHCPConfig or %NULL if the device is not activated or not
* using DHCP.
**/
NMDHCP4Config *
*
* Gets the current #NMIP6Config associated with the #NMDevice.
*
- * Returns: the #NMIP6Config or %NULL if the device is not activated.
+ * Returns: (transfer none): the #NMIP6Config or %NULL if the device is not activated.
**/
NMIP6Config *
nm_device_get_ip6_config (NMDevice *device)
*
* Gets the current #NMDHCP6Config associated with the #NMDevice.
*
- * Returns: the #NMDHCPConfig or %NULL if the device is not activated or not
+ * Returns: (transfer none): the #NMDHCPConfig or %NULL if the device is not activated or not
* using DHCP.
**/
NMDHCP6Config *
/**
* nm_device_disconnect:
* @device: a #NMDevice
- * @callback: callback to be called when disconnect operation completes
+ * @callback: (scope async): callback to be called when disconnect operation completes
* @user_data: caller-specific data passed to @callback
*
* Disconnects the device if currently connected, and prevents the device from
*
* Gets all the options contained in the configuration.
*
- * Returns: the #GHashTable containing strings for keys and values.
+ * Returns: (transfer none) (element-type utf8 GObject.Value): the #GHashTable containing strings for keys and values.
* This is the internal copy used by the configuration, and must not be modified.
**/
GHashTable *
*
* Gets all the options contained in the configuration.
*
- * Returns: the #GHashTable containing strings for keys and values.
+ * Returns: (transfer none) (element-type utf8 GObject.Value): the #GHashTable containing strings for keys and values.
* This is the internal copy used by the configuration, and must not be modified.
**/
GHashTable *
*
* Gets the IP4 addresses (containing the address, prefix, and gateway).
*
- * Returns: the #GSList containing #NMSettingIP4Address<!-- -->es. This is the internal copy
- * used by the configuration and must not be modified.
+ * Returns: (element-type NetworkManager.IP4Address): the #GSList containing #NMIP4Address<!-- -->es.
+ * This is the internal copy used by the configuration and must not be modified.
**/
const GSList *
nm_ip4_config_get_addresses (NMIP4Config *config)
}
/**
- * nm_ip4_config_get_hostname:
+ * nm_ip4_config_get_hostname: (skip):
* @config: a #NMIP4Config
*
* DEPRECATED. Don't use.
*
* Gets the domain name servers (DNS).
*
- * Returns: the #GArray containing %guint32<!-- -->s. This is the internal copy used by the
+ * Returns: (element-type guint32): the #GArray containing %guint32<!-- -->s. This is the internal copy used by the
* configuration and must not be modified.
**/
const GArray *
*
* Gets the domain names.
*
- * Returns: the #GPtrArray containing domains as strings. This is the
+ * Returns: (element-type utf8): the #GPtrArray containing domains as strings. This is the
* internal copy used by the configuration, and must not be modified.
**/
const GPtrArray *
*
* Gets the Windows Internet Name Service servers (WINS).
*
- * Returns: the #GArray containing %guint32<!-- -->s. This is the internal copy used by the
- * configuration and must not be modified.
+ * Returns: (element-type guint32): the #GArray containing %guint32<!-- -->s.
+ * This is the internal copy used by the configuration and must not be modified.
**/
const GArray *
nm_ip4_config_get_wins_servers (NMIP4Config *config)
*
* Gets the routes.
*
- * Returns: the #GSList containing #NMSettingIP4Route<!-- -->s. This is the
- * internal copy used by the configuration, and must not be modified.
+ * Returns: (element-type NetworkManager.IP4Route): the #GSList containing
+ * #NMIP4Route<!-- -->s. This is the internal copy used by the configuration,
+ * and must not be modified.
**/
const GSList *
nm_ip4_config_get_routes (NMIP4Config *config)
*
* Gets the IP6 addresses (containing the address, prefix, and gateway).
*
- * Returns: the #GSList containing #NMSettingIP6Address<!-- -->es. This is the internal copy
- * used by the configuration and must not be modified.
+ * Returns: (element-type NetworkManager.IP6Address): the #GSList containing
+ * #NMIP6Address<!-- -->es. This is the internal copy used by the configuration
+ * and must not be modified.
**/
const GSList *
nm_ip6_config_get_addresses (NMIP6Config *config)
return priv->addresses;
}
+/* FIXME: like in libnm_util, in6_addr is not introspectable, so skipping here */
/**
- * nm_ip6_config_get_nameservers:
+ * nm_ip6_config_get_nameservers: (skip)
* @config: a #NMIP6Config
*
* Gets the domain name servers (DNS).
*
- * Returns: a #GSList containing elements of type 'struct in6_addr' which contain
- * the addresses of nameservers of the configuration. This is the internal copy
- * used by the configuration and must not be modified.
+ * Returns: (element-type Posix.in6_addr): a #GSList containing elements of type
+ * 'struct in6_addr' which contain the addresses of nameservers of the configuration.
+ * This is the internal copy used by the configuration and must not be modified.
**/
const GSList *
nm_ip6_config_get_nameservers (NMIP6Config *config)
*
* Gets the domain names.
*
- * Returns: the #GPtrArray containing domains as strings. This is the
- * internal copy used by the configuration, and must not be modified.
+ * Returns: (element-type utf8): the #GPtrArray containing domains as strings.
+ * This is the internal copy used by the configuration, and must not be modified.
**/
const GPtrArray *
nm_ip6_config_get_domains (NMIP6Config *config)
*
* Gets the routes.
*
- * Returns: the #GSList containing #NMSettingIP6Route<!-- -->s. This is the
- * internal copy used by the configuration, and must not be modified.
+ * Returns: (element-type NetworkManager.IP6Route): the #GSList containing
+ * #NMIP6Route<!-- -->s. This is the internal copy used by the configuration,
+ * and must not be modified.
**/
const GSList *
nm_ip6_config_get_routes (NMIP6Config *config)
*
* Gets the #NMObject's DBusGConnection.
*
- * Returns: the connection
+ * Returns: (transfer none): the connection
**/
DBusGConnection *
nm_object_get_connection (NMObject *object)
/**
* nm_remote_connection_commit_changes:
* @connection: the #NMRemoteConnection
- * @callback: a function to be called when the commit completes
+ * @callback: (scope async): a function to be called when the commit completes
* @user_data: caller-specific data to be passed to @callback
*
* Save any local changes to the settings and properties of this connection and
/**
* nm_remote_connection_delete:
* @connection: the #NMRemoteConnection
- * @callback: a function to be called when the delete completes
+ * @callback: (scope async): a function to be called when the delete completes
* @user_data: caller-specific data to be passed to @callback
*
* Delete the connection.
* @hints: #NMSetting key names to get secrets for (optional)
* @request_new: hint that new secrets (instead of cached or stored secrets)
* should be returned
- * @callback: a function to be called when the update completes
+ * @callback: (scope async): a function to be called when the update completes
* @user_data: caller-specific data to be passed to @callback
*
* Request the connection's secrets.
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (NMRemoteConnectionClass, updated),
NULL, NULL,
- g_cclosure_marshal_VOID__BOXED,
- G_TYPE_NONE, 1, DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT);
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
signals[REMOVED] =
g_signal_new (NM_REMOTE_CONNECTION_REMOVED,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
}
*
* Returns the %NMRemoteConnection representing the connection at @path.
*
- * Returns: the remote connection object on success, or NULL if the object was
+ * Returns: (transfer none): the remote connection object on success, or NULL if the object was
* not known
**/
NMRemoteConnection *
* nm_remote_settings_list_connections:
* @settings: the %NMRemoteSettings
*
- * Returns: all connections in the remote settings service, represented as
+ * Returns: (transfer container) (element-type NMClient.RemoteConnection): all connections in the remote settings service, represented as
* %NMRemoteConnection instances
**/
GSList *
g_free (path);
}
+
/**
* nm_remote_settings_add_connection:
* @settings: the %NMRemoteSettings
* @connection: the connection to add. Note that this object's settings will be
* added, not the object itself
- * @callback: callback to be called when the add operation completes
+ * @callback: (scope async): callback to be called when the add operation completes
* @user_data: caller-specific data passed to @callback
*
* Requests that the remote settings service add the given settings to a new
* @settings: the %NMRemoteSettings
* @hostname: the new persistent hostname to set, or NULL to clear any existing
* persistent hostname
- * @callback: callback to be called when the hostname operation completes
+ * @callback: (scope async): callback to be called when the hostname operation completes
* @user_data: caller-specific data passed to @callback
*
* Requests that the machine's persistent hostname be set to the specified value
/**
* nm_remote_settings_new:
- * @bus: a valid and connected D-Bus connection
+ * @bus: (allow-none): a valid and connected D-Bus connection
*
* Creates a new object representing the remote settings service.
*
NMRemoteSettings *
nm_remote_settings_new (DBusGConnection *bus)
{
- g_return_val_if_fail (bus != NULL, NULL);
+ if (bus == NULL)
+ bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
return (NMRemoteSettings *) g_object_new (NM_TYPE_REMOTE_SETTINGS,
NM_REMOTE_SETTINGS_BUS, bus,
NMRemoteConnection * nm_remote_settings_get_connection_by_path (NMRemoteSettings *settings,
const char *path);
-gboolean nm_remote_settings_add_connection (NMRemoteSettings *self,
+gboolean nm_remote_settings_add_connection (NMRemoteSettings *settings,
NMConnection *connection,
NMRemoteSettingsAddConnectionFunc callback,
gpointer user_data);
static GType our_type = 0;
if (our_type == 0)
- our_type = g_boxed_type_register_static (g_intern_static_string ("nm-ssid"),
+ our_type = g_boxed_type_register_static (g_intern_static_string ("NMSsid"),
(GBoxedCopyFunc) nm_ssid_copy,
(GBoxedFreeFunc) nm_ssid_free);
return our_type;
static GType our_type = 0;
if (our_type == 0)
- our_type = g_boxed_type_register_static (g_intern_static_string ("nm-uint-array"),
+ our_type = g_boxed_type_register_static (g_intern_static_string ("NMUintArray"),
(GBoxedCopyFunc) nm_uint_array_copy,
(GBoxedFreeFunc) nm_uint_array_free);
return our_type;
static GType our_type = 0;
if (our_type == 0)
- our_type = g_boxed_type_register_static (g_intern_static_string ("nm-string-array"),
+ our_type = g_boxed_type_register_static (g_intern_static_string ("NMStringArray"),
(GBoxedCopyFunc) nm_string_array_copy,
(GBoxedFreeFunc) nm_string_array_free);
return our_type;
static GType our_type = 0;
if (our_type == 0)
- our_type = g_boxed_type_register_static (g_intern_static_string ("nm-object-array"),
+ our_type = g_boxed_type_register_static (g_intern_static_string ("NMObjectArray"),
(GBoxedCopyFunc) nm_object_array_copy,
(GBoxedFreeFunc) nm_object_array_free);
return our_type;
static GType our_type = 0;
if (our_type == 0)
- our_type = g_boxed_type_register_static (g_intern_static_string ("nm-ip6-address-object-array"),
+ our_type = g_boxed_type_register_static (g_intern_static_string ("NMIP6AddressObjectArray"),
(GBoxedCopyFunc) nm_ip6_address_object_array_copy,
(GBoxedFreeFunc) nm_ip6_address_object_array_free);
return our_type;
static GType our_type = 0;
if (our_type == 0)
- our_type = g_boxed_type_register_static (g_intern_static_string ("nm-ip6-address-array"),
+ our_type = g_boxed_type_register_static (g_intern_static_string ("NMIP6AddressArray"),
(GBoxedCopyFunc) nm_ip6_address_array_copy,
(GBoxedFreeFunc) nm_ip6_address_array_free);
return our_type;
static GType our_type = 0;
if (our_type == 0)
- our_type = g_boxed_type_register_static (g_intern_static_string ("nm-ip6-route-object-array"),
+ our_type = g_boxed_type_register_static (g_intern_static_string ("NMIP6RouteObjectArray"),
(GBoxedCopyFunc) nm_ip6_route_object_array_copy,
(GBoxedFreeFunc) nm_ip6_route_object_array_free);
return our_type;
nm-setting-vpn.h \
nm-utils.h
-libnm_util_la_SOURCES= \
- crypto.c \
+libnm_util_la_private_headers = \
crypto.h \
+ nm-param-spec-specialized.h \
+ nm-utils-private.h
+
+libnm_util_la_csources = \
+ crypto.c \
nm-connection.c \
nm-param-spec-specialized.c \
- nm-param-spec-specialized.h \
nm-setting.c \
nm-setting-8021x.c \
nm-setting-bluetooth.c \
nm-setting-wireless.c \
nm-setting-wireless-security.c \
nm-setting-vpn.c \
- nm-utils.c \
- nm-utils-private.h \
- $(libnm_util_include_HEADERS)
+ nm-utils.c
+
+libnm_util_la_SOURCES = \
+ $(libnm_util_la_csources) \
+ $(libnm_util_la_private_headers)
libnm_util_la_LIBADD = $(GLIB_LIBS) $(DBUS_LIBS) $(UUID_LIBS)
libnm_util_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libnm-util.ver \
- -version-info "7:0:6"
+ -version-info "8:0:7"
if WITH_GNUTLS
libnm_util_la_SOURCES += crypto_gnutls.c
libtest_crypto_la_LIBADD += $(NSS_LIBS)
endif
-
-
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libnm-util.pc
DISTCLEANFILES = libnm-util.pc
+CLEANFILES =
EXTRA_DIST = libnm-util.pc.in libnm-util.ver
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = $(libnm_util_include_HEADERS) $(libnm_util_la_csources) $(top_srcdir)/include/NetworkManager.h $(top_srcdir)/include/NetworkManagerVPN.h
+
+NetworkManager-1.0.gir: libnm-util.la
+NetworkManager_1_0_gir_INCLUDES = GObject-2.0 DBusGLib-1.0
+NetworkManager_1_0_gir_PACKAGES = gobject-2.0 dbus-glib-1
+NetworkManager_1_0_gir_CFLAGS = $(INCLUDES)
+NetworkManager_1_0_gir_LIBS = libnm-util.la
+NetworkManager_1_0_gir_FILES = $(introspection_sources)
+NetworkManager_1_0_gir_SCANNERFLAGS = --warn-all --identifier-prefix=NM --symbol-prefix=nm_
+INTROSPECTION_GIRS += NetworkManager-1.0.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(gir_DATA) $(typelib_DATA)
+endif
nm_setting_ip4_config_get_dhcp_send_hostname;
nm_setting_ip4_config_get_never_default;
nm_setting_ip4_config_get_may_fail;
+ nm_ip6_address_get_type;
nm_ip6_address_new;
nm_ip6_address_dup;
nm_ip6_address_ref;
nm_ip6_address_set_gateway;
nm_ip6_address_get_prefix;
nm_ip6_address_set_prefix;
+ nm_ip6_route_get_type;
nm_ip6_route_new;
nm_ip6_route_dup;
nm_ip6_route_ref;
nm_ip4_address_compare;
nm_ip4_address_dup;
nm_ip4_address_get_address;
- nm_ip4_address_get_prefix;
nm_ip4_address_get_gateway;
+ nm_ip4_address_get_prefix;
+ nm_ip4_address_get_type;
nm_ip4_address_new;
nm_ip4_address_ref;
nm_ip4_address_set_address;
nm_ip4_route_get_prefix;
nm_ip4_route_get_next_hop;
nm_ip4_route_get_metric;
+ nm_ip4_route_get_type;
nm_ip4_route_new;
nm_ip4_route_ref;
nm_ip4_route_unref;
*
* Create a new #NMSetting object of the desired type, given a setting name.
*
- * Returns: the new setting object, or NULL if the setting name was unknown
+ * Returns: (transfer full): the new setting object, or NULL if the setting name was unknown
**/
NMSetting *
nm_connection_create_setting (const char *name)
/**
* nm_connection_add_setting:
* @connection: a #NMConnection
- * @setting: the #NMSetting to add to the connection object
+ * @setting: (transfer full): the #NMSetting to add to the connection object
*
* Adds a #NMSetting to the connection, replacing any previous #NMSetting of the
* same name which has previously been added to the #NMConnection. The
* Gets the #NMSetting with the given #GType, if one has been previously added
* to the #NMConnection.
*
- * Returns: the #NMSetting, or NULL if no setting of that type was previously
+ * Returns: (transfer none): the #NMSetting, or NULL if no setting of that type was previously
* added to the #NMConnection
**/
NMSetting *
* Gets the #NMSetting with the given name, if one has been previously added
* the the #NMConnection.
*
- * Returns: the #NMSetting, or NULL if no setting with that name was previously
+ * Returns: (transfer none): the #NMSetting, or NULL if no setting with that name was previously
* added to the #NMConnection
**/
NMSetting *
/**
* nm_connection_replace_settings:
* @connection: a #NMConnection
- * @new_settings: a #GHashTable of settings
+ * @new_settings: (element-type utf8 GLib.HashTable): a #GHashTable of settings
* @error: location to store error, or %NULL
*
* Returns: %TRUE if the settings were valid and added to the connection, %FALSE
* nm_connection_update_secrets:
* @connection: the #NMConnection
* @setting_name: the setting object name to which the secrets apply
- * @secrets: a #GHashTable mapping string:#GValue of setting property names and
+ * @secrets: (element-type utf8 GObject.Value): a #GHashTable mapping string:#GValue of setting property names and
* secrets
* @error: location to store error, or %NULL
*
* are #GHashTables mapping string:GValue, each of which represents the
* properties of the #NMSetting object.
*
- * Returns: a new #GHashTable describing the connection, its settings, and
- * each setting's properties. The caller owns the hash table and must unref
- * the hash table with g_hash_table_unref() when it is no longer needed.
+ * Returns: (transfer full) (element-type utf8 GLib.HashTable): a new
+ * #GHashTable describing the connection, its settings, and each setting's
+ * properties. The caller owns the hash table and must unref the hash table
+ * with g_hash_table_unref() when it is no longer needed.
**/
GHashTable *
nm_connection_to_hash (NMConnection *connection)
/**
* nm_connection_for_each_setting_value:
* @connection: the #NMConnection
- * @func: user-supplied function called for each setting's property
+ * @func: (scope call): user-supplied function called for each setting's property
* @user_data: user data passed to @func at each invocation
*
* Iterates over the properties of each #NMSetting object in the #NMConnection,
/**
* nm_connection_new_from_hash:
- * @hash: the #GHashTable describing the connection
+ * @hash: (element-type utf8 GLib.HashTable): the #GHashTable describing
+ * the connection
* @error: on unsuccessful return, an error
*
* Creates a new #NMConnection from a hash table describing the connection. See
*
* Duplicates a #NMConnection.
*
- * Returns: a new #NMConnection containing the same settings and properties
+ * Returns: (transfer full): a new #NMConnection containing the same settings and properties
* as the source #NMConnection
**/
NMConnection *
return etype;
}
+G_DEFINE_BOXED_TYPE (NMIP4Address, nm_ip4_address, nm_ip4_address_dup, nm_ip4_address_unref)
+G_DEFINE_BOXED_TYPE (NMIP4Route, nm_ip4_route, nm_ip4_route_dup, nm_ip4_route_unref)
G_DEFINE_TYPE (NMSettingIP4Config, nm_setting_ip4_config, NM_TYPE_SETTING)
typedef struct NMIP4Address NMIP4Address;
+GType nm_ip4_address_get_type (void);
+
NMIP4Address * nm_ip4_address_new (void);
NMIP4Address * nm_ip4_address_dup (NMIP4Address *source);
void nm_ip4_address_ref (NMIP4Address *address);
typedef struct NMIP4Route NMIP4Route;
+GType nm_ip4_route_get_type (void);
+
NMIP4Route * nm_ip4_route_new (void);
NMIP4Route * nm_ip4_route_dup (NMIP4Route *route);
void nm_ip4_route_ref (NMIP4Route *route);
return etype;
}
+G_DEFINE_BOXED_TYPE (NMIP6Address, nm_ip6_address, nm_ip6_address_dup, nm_ip6_address_unref)
+G_DEFINE_BOXED_TYPE (NMIP6Route, nm_ip6_route, nm_ip6_route_dup, nm_ip6_route_unref)
G_DEFINE_TYPE (NMSettingIP6Config, nm_setting_ip6_config, NM_TYPE_SETTING)
typedef struct NMIP6Address NMIP6Address;
+GType nm_ip6_address_get_type (void);
+
NMIP6Address * nm_ip6_address_new (void);
NMIP6Address * nm_ip6_address_dup (NMIP6Address *source);
void nm_ip6_address_ref (NMIP6Address *address);
typedef struct NMIP6Route NMIP6Route;
+GType nm_ip6_route_get_type (void);
+
NMIP6Route * nm_ip6_route_new (void);
NMIP6Route * nm_ip6_route_dup (NMIP6Route *route);
void nm_ip6_route_ref (NMIP6Route *route);
g_hash_table_remove (NM_SETTING_VPN_GET_PRIVATE (setting)->data, key);
}
+/**
+ * nm_setting_vpn_foreach_data_item:
+ * @setting: a #NMSettingVPN
+ * @func: (scope call): an user provided function
+ * @user_data:
+ *
+ * Iterates all data items stored in this setting
+ */
void
nm_setting_vpn_foreach_data_item (NMSettingVPN *setting,
- VPNIterFunc func,
+ NMVPNIterFunc func,
gpointer user_data)
{
g_return_if_fail (NM_IS_SETTING_VPN (setting));
g_hash_table_remove (NM_SETTING_VPN_GET_PRIVATE (setting)->secrets, key);
}
+/**
+ * nm_setting_vpn_foreach_secret:
+ * @setting: a #NMSettingVPN
+ * @func: (scope call): an user provided function
+ * @user_data:
+ *
+ * Iterates all secrets stored in this setting.
+ */
void
nm_setting_vpn_foreach_secret (NMSettingVPN *setting,
- VPNIterFunc func,
+ NMVPNIterFunc func,
gpointer user_data)
{
g_return_if_fail (NM_IS_SETTING_VPN (setting));
void (*_reserved4) (void);
} NMSettingVPNClass;
-typedef void (*VPNIterFunc) (const char *key, const char *value, gpointer user_data);
+typedef void (*NMVPNIterFunc) (const char *key, const char *value, gpointer user_data);
+/* For backward compatibility */
+typedef NMVPNIterFunc VPNIterFunc;
GType nm_setting_vpn_get_type (void);
void nm_setting_vpn_remove_data_item (NMSettingVPN *setting,
const char *key);
void nm_setting_vpn_foreach_data_item (NMSettingVPN *setting,
- VPNIterFunc func,
+ NMVPNIterFunc func,
gpointer user_data);
void nm_setting_vpn_add_secret (NMSettingVPN *setting,
void nm_setting_vpn_remove_secret (NMSettingVPN *setting,
const char *key);
void nm_setting_vpn_foreach_secret (NMSettingVPN *setting,
- VPNIterFunc func,
+ NMVPNIterFunc func,
gpointer user_data);
G_END_DECLS
* name to a GValue describing that property, suitable for marshalling over
* D-Bus or serializing. The mapping is string:GValue.
*
- * Returns: a new #GHashTable describing the setting's properties
+ * Returns: (transfer full) (element-type utf8 GObject.Value): a new #GHashTable describing the setting's properties
**/
GHashTable *
nm_setting_to_hash (NMSetting *setting)
*
* Duplicates a #NMSetting.
*
- * Returns: a new #NMSetting containing the same properties and values as the
+ * Returns: (transfer full): a new #NMSetting containing the same properties and values as the
* source #NMSetting
**/
NMSetting *
/**
* nm_setting_enumerate_values:
* @setting: the #NMSetting
- * @func: user-supplied function called for each property of the setting
+ * @func: (scope call): user-supplied function called for each property of the setting
* @user_data: user data passed to @func at each invocation
*
* Iterates over each property of the #NMSetting object, calling the supplied
* guide to what secrets may be required, because in some circumstances, there
* is no way to conclusively determine exactly which secrets are needed.
*
- * Returns: a #GPtrArray containing the property names of secrets of the
+ * Returns: (transfer full) (element-type utf8): a #GPtrArray containing the property names of secrets of the
* #NMSetting which may be required; the caller owns the array
* and must free the each array element with g_free(), as well as the array
* itself with g_ptr_array_free()
*
* Utility function to duplicate a hash table of GValues.
*
- * Returns: a newly allocated duplicated #GHashTable, caller must free the
+ * Returns: (transfer container) (element-type utf8 GObject.Value): a newly allocated duplicated #GHashTable, caller must free the
* returned hash with g_hash_table_unref() or g_hash_table_destroy()
**/
GHashTable *
* this serialization is not guaranteed to be stable and the #GArray may be
* extended in the future.
*
- * Returns: a newly allocated #GSList of #NMIP4Address objects
+ * Returns: (transfer full) (element-type NetworkManager.IP4Address): a newly allocated #GSList of #NMIP4Address objects
**/
GSList *
nm_utils_ip4_addresses_from_gvalue (const GValue *value)
* format of this serialization is not guaranteed to be stable and may be
* extended in the future.
*
- * Returns: a newly allocated #GSList of #NMIP4Route objects
+ * Returns: (transfer full) (element-type NetworkManager.IP4Route): a newly allocated #GSList of #NMIP4Route objects
**/
GSList *
nm_utils_ip4_routes_from_gvalue (const GValue *value)
* this serialization is not guaranteed to be stable and the #GValueArray may be
* extended in the future.
*
- * Returns: a newly allocated #GSList of #NMIP6Address objects
+ * Returns: (transfer full) (element-type NetworkManager.IP6Address): a newly allocated #GSList of #NMIP6Address objects
**/
GSList *
nm_utils_ip6_addresses_from_gvalue (const GValue *value)
* into a GSList of #NMIP6Route objects. The specific format of this serialization
* is not guaranteed to be stable and may be extended in the future.
*
- * Returns: a newly allocated #GSList of #NMIP6Route objects
+ * Returns: (transfer full) (element-type NetworkManager.IP6Route): a newly allocated #GSList of #NMIP6Route objects
**/
GSList *
nm_utils_ip6_routes_from_gvalue (const GValue *value)
g_value_take_boxed (value, routes);
}
+/* FIXME: the Posix namespace does not exist, and thus neither does
+ the in6_addr struct. Marking (skip) for now */
+/**
+ * nm_utils_ip6_dns_from_gvalue: (skip):
+ * @value: a #GValue
+ *
+ * Converts a #GValue containing a #GPtrArray of IP6 DNS, represented as
+ * #GByteArray<!-- -->s into a #GSList of #in6_addr<!-- -->s.
+ *
+ * Returns: (transfer full) (element-type Posix.in6_addr): a #GSList of IP6
+ * addresses.
+ */
GSList *
nm_utils_ip6_dns_from_gvalue (const GValue *value)
{
/**
* nm_utils_rsa_key_encrypt:
* @data: RSA private key data to be encrypted
- * @in_password: existing password to use, if any
- * @out_password: if @in_password was NULL, a random password will be generated
+ * @in_password: (allow-none): existing password to use, if any
+ * @out_password: (out) (allow-none): if @in_password was NULL, a random password will be generated
* and returned in this argument
* @error: detailed error information on return, if an error occurred
*
* a password if no password was given) and converts the data to PEM format
* suitable for writing to a file.
*
- * Returns: on success, PEM-formatted data suitable for writing to a PEM-formatted
+ * Returns: (transfer full): on success, PEM-formatted data suitable for writing to a PEM-formatted
* certificate/private key file.
**/
GByteArray *
--- /dev/null
+dnl -*- mode: autoconf -*-
+dnl Copyright 2009 Johan Dahlin
+dnl
+dnl This file is free software; the author(s) gives unlimited
+dnl permission to copy and/or distribute it, with or without
+dnl modifications, as long as this notice is preserved.
+dnl
+
+# serial 1
+
+m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
+[
+ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
+ AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
+ AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
+
+ dnl enable/disable introspection
+ m4_if([$2], [require],
+ [dnl
+ enable_introspection=yes
+ ],[dnl
+ AC_ARG_ENABLE(introspection,
+ AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
+ [Enable introspection for this build]),,
+ [enable_introspection=auto])
+ ])dnl
+
+ AC_MSG_CHECKING([for gobject-introspection])
+
+ dnl presence/version checking
+ AS_CASE([$enable_introspection],
+ [no], [dnl
+ found_introspection="no (disabled, use --enable-introspection to enable)"
+ ],dnl
+ [yes],[dnl
+ PKG_CHECK_EXISTS([gobject-introspection-1.0],,
+ AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
+ PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
+ found_introspection=yes,
+ AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
+ ],dnl
+ [auto],[dnl
+ PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
+ ],dnl
+ [dnl
+ AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
+ ])dnl
+
+ AC_MSG_RESULT([$found_introspection])
+
+ INTROSPECTION_SCANNER=
+ INTROSPECTION_COMPILER=
+ INTROSPECTION_GENERATE=
+ INTROSPECTION_GIRDIR=
+ INTROSPECTION_TYPELIBDIR=
+ if test "x$found_introspection" = "xyes"; then
+ INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+ INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+ INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+ INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+ INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+ INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
+ INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
+ INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
+ fi
+ AC_SUBST(INTROSPECTION_SCANNER)
+ AC_SUBST(INTROSPECTION_COMPILER)
+ AC_SUBST(INTROSPECTION_GENERATE)
+ AC_SUBST(INTROSPECTION_GIRDIR)
+ AC_SUBST(INTROSPECTION_TYPELIBDIR)
+ AC_SUBST(INTROSPECTION_CFLAGS)
+ AC_SUBST(INTROSPECTION_LIBS)
+ AC_SUBST(INTROSPECTION_MAKEFILE)
+
+ AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
+])
+
+
+dnl Usage:
+dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
+
+AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
+[
+ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
+])
+
+dnl Usage:
+dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
+
+
+AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
+[
+ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
+])