Commit 3ebecd2a authored by Giovanni Campagna's avatar Giovanni Campagna Committed by Dan Williams

introspection: add GObject introspection support (bgo #637032)

Add the necessary annotations (the mininum required, that is those
on return values. NULL parameters or container types may require
more), and the Autotools stuff to get a NetworkManager GIR for
libnm-util and a NMClient for libnm-glib.
parent 90673568
......@@ -3,6 +3,8 @@
*.lo
*.la
*.bz2
*.gir
*.typelib
Makefile
Makefile.in*
configure
......
......@@ -29,7 +29,8 @@ DISTCHECK_CONFIGURE_FLAGS = \
--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
......
......@@ -241,6 +241,8 @@ PKG_CHECK_MODULES(GIO, gio-2.0)
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"
......
......@@ -47,6 +47,9 @@ libdeprecated_nm_glib_la_LIBADD = \
$(DBUS_LIBS) \
$(GLIB_LIBS)
libdeprecateddir = $(includedir)/libnm-glib
libdeprecated_HEADERS = libnm_glib.h
#####################################################
# Real libnm-glib stuff
#####################################################
......@@ -59,9 +62,9 @@ libnm_glib_la_CFLAGS = \
$(GUDEV_CFLAGS)
libnmincludedir = $(includedir)/libnm-glib
libnmvpndir = $(includedir)/libnm-glib
libnminclude_HEADERS = \
libnm_glib.h \
nm-object.h \
nm-client.h \
nm-device.h \
......@@ -74,8 +77,6 @@ libnminclude_HEADERS = \
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 \
......@@ -87,14 +88,15 @@ libnminclude_HEADERS = \
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 \
......@@ -105,20 +107,29 @@ libnm_glib_la_SOURCES = \
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 \
......@@ -128,7 +139,7 @@ libnm_glib_la_LIBADD = \
$(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
......@@ -225,3 +236,28 @@ DISTCLEANFILES = libnm-glib.pc libnm-glib.pc
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
......@@ -6,7 +6,7 @@ includedir=@includedir@
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
......
......@@ -149,7 +149,7 @@ nm_active_connection_get_specific_object (NMActiveConnection *connection)
*
* 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 *
......@@ -301,7 +301,7 @@ get_property (GObject *object,
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));
......
......@@ -664,7 +664,7 @@ get_property (GObject *object,
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);
......@@ -829,6 +829,7 @@ nm_client_class_init (NMClientClass *client_class)
* NMClient::active-connections:
*
* The active connections.
* Type: GPtrArray<NMClient.ActiveConnection>
**/
g_object_class_install_property
(object_class, PROP_ACTIVE_CONNECTIONS,
......@@ -843,7 +844,7 @@ nm_client_class_init (NMClientClass *client_class)
/**
* 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.
**/
......@@ -860,7 +861,7 @@ nm_client_class_init (NMClientClass *client_class)
/**
* 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.
**/
......@@ -1012,7 +1013,7 @@ client_device_removed_proxy (DBusGProxy *proxy, char *path, gpointer user_data)
*
* 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 *
......@@ -1052,7 +1053,7 @@ nm_client_get_devices (NMClient *client)
*
* 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)
......@@ -1109,7 +1110,7 @@ activate_cb (DBusGProxy *proxy,
* @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.
......@@ -1165,14 +1166,14 @@ add_activate_cb (DBusGProxy *proxy,
* 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
......@@ -1243,7 +1244,8 @@ nm_client_deactivate_connection (NMClient *client, NMActiveConnection *active)
*
* 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 *
......
......@@ -252,7 +252,7 @@ nm_device_wifi_get_capabilities (NMDeviceWifi *device)
*
* 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)
......@@ -302,7 +302,8 @@ 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 *
......@@ -342,7 +343,7 @@ nm_device_wifi_get_access_points (NMDeviceWifi *device)
*
* 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,
......
......@@ -108,12 +108,12 @@ nm_device_wimax_new (DBusGConnection *connection, const char *path)
/**
* 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)
......@@ -138,7 +138,7 @@ 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)
......@@ -188,7 +188,8 @@ 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 *
......@@ -228,7 +229,7 @@ nm_device_wimax_get_nsps (NMDeviceWimax *wimax)
*
* 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,
......@@ -339,7 +340,7 @@ clean_up_nsps (NMDeviceWimax *self, gboolean notify)
/**
* 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
......@@ -348,15 +349,15 @@ clean_up_nsps (NMDeviceWimax *self, gboolean notify)
* 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);
}
......@@ -365,7 +366,7 @@ nm_device_wimax_get_center_frequency (NMDeviceWimax *wimax)
/**
* 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
......@@ -375,15 +376,15 @@ nm_device_wimax_get_center_frequency (NMDeviceWimax *wimax)
* 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);
}
......@@ -392,7 +393,7 @@ nm_device_wimax_get_rssi (NMDeviceWimax *wimax)
/**
* 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
......@@ -401,15 +402,15 @@ nm_device_wimax_get_rssi (NMDeviceWimax *wimax)
* 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);
}
......@@ -418,7 +419,7 @@ nm_device_wimax_get_cinr (NMDeviceWimax *wimax)
/**
* 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
......@@ -427,15 +428,15 @@ nm_device_wimax_get_cinr (NMDeviceWimax *wimax)
* 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);
}
......@@ -444,22 +445,22 @@ nm_device_wimax_get_tx_power (NMDeviceWimax *wimax)
/**
* 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);
}
......
......@@ -934,7 +934,7 @@ nm_device_get_firmware_missing (NMDevice *device)
*
* 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)
......@@ -968,7 +968,7 @@ 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 *
......@@ -1003,7 +1003,7 @@ nm_device_get_dhcp4_config (NMDevice *device)
*
* 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)
......@@ -1037,7 +1037,7 @@ 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 *
......@@ -1317,7 +1317,7 @@ deactivate_cb (DBusGProxy *proxy,
/**
* 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
......
......@@ -203,7 +203,7 @@ nm_dhcp4_config_new (DBusGConnection *connection, const char *object_path)
*
* 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 *
......
......@@ -203,7 +203,7 @@ nm_dhcp6_config_new (DBusGConnection *connection, const char *object_path)
*
* 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 *
......
......@@ -337,8 +337,8 @@ nm_ip4_config_new (DBusGConnection *connection, const char *object_path)
*
* 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)
......@@ -366,7 +366,7 @@ 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.
......@@ -385,7 +385,7 @@ nm_ip4_config_get_hostname (NMIP4Config *config)
*
* 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 *
......@@ -421,7 +421,7 @@ nm_ip4_config_get_nameservers (NMIP4Config *config)
*
* 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 *
......@@ -460,8 +460,8 @@ nm_ip4_config_get_domains (NMIP4Config *config)
*
* 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)
......@@ -496,8 +496,9 @@ 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)
......
......@@ -146,8 +146,9 @@ register_for_property_changed (NMIP6Config *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)
......@@ -174,15 +175,16 @@ 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)
......@@ -217,8 +219,8 @@ 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)
......@@ -251,8 +253,9 @@ 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)
......
......@@ -223,7 +223,7 @@ nm_object_class_init (NMObjectClass *nm_object_class)
*
* Gets the #NMObject's DBusGConnection.
*
* Returns: the connection
* Returns: (transfer none): the connection
**/
DBusGConnection *
nm_object_get_connection (NMObject *object)
......
......@@ -101,7 +101,7 @@ update_cb (DBusGProxy *proxy, GError *error, gpointer user_data)
/**
* 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
......@@ -153,7 +153,7 @@ delete_cb (DBusGProxy *proxy, GError *error, gpointer user_data)
/**
* 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.
......@@ -202,7 +202,7 @@ get_secrets_cb (DBusGProxy *proxy, GHashTable *secrets, GError *error, gpointer
* @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.
......@@ -483,8 +483,8 @@ nm_remote_connection_class_init (NMRemoteConnectionClass *remote_class)
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,
......@@ -494,5 +494,4 @@ nm_remote_connection_class_init (NMRemoteConnectionClass *remote_class)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
......@@ -168,7 +168,7 @@ add_connection_info_complete (NMRemoteSettings *self,
*
* 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 *
......@@ -366,7 +366,7 @@ fetch_connections (gpointer user_data)
* 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 *
......@@ -407,12 +407,13 @@ add_connection_done (DBusGProxy *proxy,
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
......@@ -513,7 +514,7 @@ save_hostname_cb (DBusGProxy *proxy,
* @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
......@@ -637,7 +638,7 @@ get_all_cb (DBusGProxy *proxy,
/**
* 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.
*
......@@ -646,7 +647,8 @@ get_all_cb (DBusGProxy *proxy,
NMRemoteSettings *
nm_remote_settings_new (DBusGConnection *bus)
{
g_return_val_if_fail (bus != NULL, NULL);
if (bus == NULL)