NetworkManager r3932 - in trunk: . docs/libnm-glib libnm-glib



Author: tambeti
Date: Tue Aug 12 08:05:21 2008
New Revision: 3932
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3932&view=rev

Log:
2008-08-12  Tambet Ingo  <tambet gmail com>

	Start documenting libnm-glib public API using gtk-doc.

	* libnm-glib/nm-serial-device.c:
	* libnm-glib/nm-object.c:
	* libnm-glib/nm-gsm-device.c:
	* libnm-glib/nm-device.c:
	* libnm-glib/nm-device-wifi.c:
	* libnm-glib/nm-device-ethernet.c:
	* libnm-glib/nm-client.c:
	* libnm-glib/nm-cdma-device.c: Document the public API.

	* docs/libnm-glib/libnm-glib.types: Implement.

	* docs/libnm-glib/Makefile.am: Implement.

	* autogen.sh:
	* configure.in:
	* Makefile.am: Add gtk-doc support.


Added:
   trunk/docs/libnm-glib/
   trunk/docs/libnm-glib/Makefile.am
   trunk/docs/libnm-glib/libnm-glib.types
Modified:
   trunk/ChangeLog
   trunk/Makefile.am
   trunk/autogen.sh
   trunk/configure.in
   trunk/libnm-glib/nm-cdma-device.c
   trunk/libnm-glib/nm-client.c
   trunk/libnm-glib/nm-device-ethernet.c
   trunk/libnm-glib/nm-device-wifi.c
   trunk/libnm-glib/nm-device.c
   trunk/libnm-glib/nm-gsm-device.c
   trunk/libnm-glib/nm-object.c
   trunk/libnm-glib/nm-serial-device.c

Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am	(original)
+++ trunk/Makefile.am	Tue Aug 12 08:05:21 2008
@@ -40,7 +40,8 @@
 	   callouts \
 	   system-settings \
 	   tools \
-	   policy
+	   policy \
+	   docs/libnm-glib
 
 EXTRA_DIST =				\
 	CONTRIBUTING			\

Modified: trunk/autogen.sh
==============================================================================
--- trunk/autogen.sh	(original)
+++ trunk/autogen.sh	Tue Aug 12 08:05:21 2008
@@ -14,6 +14,7 @@
 }
 
 (cd $srcdir;
+    gtkdocize || exit 1
     autoreconf --install --symlink &&
     intltoolize --force &&
     autoreconf &&

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Tue Aug 12 08:05:21 2008
@@ -407,6 +407,8 @@
 	AC_MSG_RESULT(no)
 fi
 
+GTK_DOC_CHECK(1.0)
+
 AC_CONFIG_FILES([
 Makefile
 include/Makefile
@@ -457,6 +459,7 @@
 man/nm-tool.1
 po/Makefile.in
 policy/Makefile
+docs/libnm-glib/Makefile
 NetworkManager.pc
 ])
 AC_OUTPUT

Added: trunk/docs/libnm-glib/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/docs/libnm-glib/Makefile.am	Tue Aug 12 08:05:21 2008
@@ -0,0 +1,79 @@
+## Process this file with automake to produce Makefile.in
+AUTOMAKE_OPTIONS = 1.6
+
+# The name of the module
+DOC_MODULE=libnm-glib
+
+# The top-level SGML file.
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
+
+# The directory containing the source code. Relative to $(srcdir).
+# gtk-doc will search all .c & .h files beneath here for inline comments
+# documenting functions and macros.
+DOC_SOURCE_DIR=../../libnm-glib
+
+# Extra options to supply to gtkdoc-scan.
+SCAN_OPTIONS=
+
+# Extra options to supply to gtkdoc-scangobj.
+SCANGOBJ_OPTIONS=--type-init-func 'g_type_init();'
+
+# Extra options to supply to gtkdoc-mkdb.
+MKDB_OPTIONS=--sgml-mode --output-format=xml
+
+# Extra options to supply to gtkdoc-fixref.
+FIXXREF_OPTIONS=
+
+# Used for dependencies.
+HFILE_GLOB=
+CFILE_GLOB=
+
+# Header files to ignore when scanning.
+IGNORE_HFILES= \
+	nm-dbus-utils.h \
+	nm-device-private.h \
+	nm-object-cache.h \
+	nm-object-private.h \
+	nm-types-private.h \
+	nm-access-point-bindings.h \
+	nm-client-bindings.h \
+	nm-device-bindings.h \
+	nm-device-ethernet-bindings.h \
+	nm-device-wifi-bindings.h \
+	nm-exported-connection-glue.h \
+	nm-exported-connection-bindings.h \
+	nm-settings-glue.h \
+	nm-settings-bindings.h \
+	nm-settings-system-bindings.h \
+	nm-vpn-connection-bindings.h \
+	nm-vpn-plugin-glue.h \
+	nm-active-connection-bindings.h \
+	nm-ip4-config-bindings.h \
+	nm-dhcp4-config-bindings.h
+
+# Images to copy into HTML directory.
+HTML_IMAGES = 
+
+# Extra XML files that are included by $(DOC_MAIN_SGML_FILE).
+content_files = 
+
+# Other files to distribute.
+extra_files =
+
+
+# CFLAGS and LDFLAGS for compiling scan program. Only needed
+# if $(DOC_MODULE).types is non-empty.
+GTKDOC_CFLAGS =				\
+	-I$(top_srcdir)/include		\
+	-I$(top_srcdir)/libnm-util	\
+	-I$(top_builddir)/marshallers	\
+	-I$(top_srcdir)/libnm-glib	\
+	$(GLIB_CFLAGS)			\
+	$(DBUS_CFLAGS)
+
+GTKDOC_LIBS = $(top_builddir)/libnm-glib/libnm_glib.la
+
+
+# include common portion ...
+include $(top_srcdir)/gtk-doc.make
+

Added: trunk/docs/libnm-glib/libnm-glib.types
==============================================================================
--- (empty file)
+++ trunk/docs/libnm-glib/libnm-glib.types	Tue Aug 12 08:05:21 2008
@@ -0,0 +1,15 @@
+#include <nm-client.h>
+#include <nm-device-ethernet.h>
+#include <nm-device-wifi.h>
+#include <nm-cdma-device.h>
+#include <nm-gsm-device.h>
+#include <nm-serial-device.h>
+
+nm_object_get_type
+nm_client_get_type
+nm_device_get_type
+nm_device_ethernet_get_type
+nm_device_wifi_get_type
+nm_gsm_device_get_type
+nm_cdma_device_get_type
+nm_serial_device_get_type

Modified: trunk/libnm-glib/nm-cdma-device.c
==============================================================================
--- trunk/libnm-glib/nm-cdma-device.c	(original)
+++ trunk/libnm-glib/nm-cdma-device.c	Tue Aug 12 08:05:21 2008
@@ -87,6 +87,15 @@
 	object_class->dispose = dispose;
 }
 
+/**
+ * nm_cdma_device_new:
+ * @connection: the #DBusGConnection
+ * @path: the DBus object path of the device
+ *
+ * Creates a new #NMCdmaDevice.
+ *
+ * Returns: a new device
+ **/
 GObject *
 nm_cdma_device_new (DBusGConnection *connection, const char *path)
 {

Modified: trunk/libnm-glib/nm-client.c
==============================================================================
--- trunk/libnm-glib/nm-client.c	(original)
+++ trunk/libnm-glib/nm-client.c	Tue Aug 12 08:05:21 2008
@@ -381,6 +381,12 @@
 	object_class->dispose = dispose;
 
 	/* properties */
+
+	/**
+	 * NMClient:state:
+	 *
+	 * The current daemon state.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_STATE,
 		 g_param_spec_uint (NM_CLIENT_STATE,
@@ -389,6 +395,11 @@
 						    NM_STATE_UNKNOWN, NM_STATE_DISCONNECTED, NM_STATE_UNKNOWN,
 						    G_PARAM_READABLE));
 
+	/**
+	 * NMClient::manager-running:
+	 *
+	 * Whether the daemon is running.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_MANAGER_RUNNING,
 		 g_param_spec_boolean (NM_CLIENT_MANAGER_RUNNING,
@@ -397,6 +408,11 @@
 						       FALSE,
 						       G_PARAM_READABLE));
 
+	/**
+	 * NMClient::wireless-enabled:
+	 *
+	 * Whether wireless is enabled.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_WIRELESS_ENABLED,
 		 g_param_spec_boolean (NM_CLIENT_WIRELESS_ENABLED,
@@ -405,6 +421,11 @@
 						   TRUE,
 						   G_PARAM_READWRITE));
 
+	/**
+	 * NMClient::wireless-hardware-enabled:
+	 *
+	 * Whether the wireless hardware is enabled.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_WIRELESS_HARDWARE_ENABLED,
 		 g_param_spec_boolean (NM_CLIENT_WIRELESS_HARDWARE_ENABLED,
@@ -413,6 +434,11 @@
 						   TRUE,
 						   G_PARAM_READABLE));
 
+	/**
+	 * NMClient::active-connections:
+	 *
+	 * The active connections.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_ACTIVE_CONNECTIONS,
 		 g_param_spec_boxed (NM_CLIENT_ACTIVE_CONNECTIONS,
@@ -422,6 +448,14 @@
 						   G_PARAM_READABLE));
 
 	/* signals */
+
+	/**
+	 * NMClient::device-added:
+	 * @client: the client that received the signal
+	 * @device: the new device
+	 *
+	 * Notifies that a #NMDevice is added.
+	 **/
 	signals[DEVICE_ADDED] =
 		g_signal_new ("device-added",
 					  G_OBJECT_CLASS_TYPE (object_class),
@@ -432,6 +466,13 @@
 					  G_TYPE_NONE, 1,
 					  G_TYPE_OBJECT);
 
+	/**
+	 * NMClient::device-removed:
+	 * @widget: the client that received the signal
+	 * @device: the removed device
+	 *
+	 * Notifies that a #NMDevice is removed.
+	 **/
 	signals[DEVICE_REMOVED] =
 		g_signal_new ("device-removed",
 					  G_OBJECT_CLASS_TYPE (object_class),
@@ -443,6 +484,13 @@
 					  G_TYPE_OBJECT);
 }
 
+/**
+ * nm_client_new:
+ *
+ * Creates a new #NMClient.
+ *
+ * Returns: a new #NMClient
+ **/
 NMClient *
 nm_client_new (void)
 {
@@ -541,6 +589,15 @@
 	}
 }
 
+/**
+ * nm_client_get_devices:
+ * @client: a #NMClient
+ *
+ * Gets all the detected devices.
+ *
+ * Returns: a #GPtrArray containing all the #NMDevice<!-- -->s.
+ * The returned array is owned by the client and should not be modified.
+ **/
 const GPtrArray *
 nm_client_get_devices (NMClient *client)
 {
@@ -571,6 +628,15 @@
 	return handle_ptr_array_return (priv->devices);
 }
 
+/**
+ * nm_client_get_device_by_path:
+ * @client: a #NMClient
+ * @object_path: the object path to search for
+ *
+ * Gets a #NMDevice from a #NMClient.
+ *
+ * Returns: 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)
 {
@@ -617,6 +683,19 @@
 	g_slice_free (ActivateDeviceInfo, info);
 }
 
+/**
+ * nm_client_activate_connection:
+ * @client: a #NMClient
+ * @service_name: the connection's service name
+ * @connection_path: the connection's DBus 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
+ * @user_data: user data to pass to the callback function
+ *
+ * Activates a connection with the given #NMDevice.
+ **/
 void
 nm_client_activate_connection (NMClient *client,
 					  const char *service_name,
@@ -653,6 +732,13 @@
 											    info);
 }
 
+/**
+ * nm_client_deactivate_connection:
+ * @client: a #NMClient
+ * @active: the #NMActiveConnection to deactivate
+ *
+ * Deactivates an active #NMActiveConnection.
+ **/
 void
 nm_client_deactivate_connection (NMClient *client, NMActiveConnection *active)
 {
@@ -672,6 +758,15 @@
 	}
 }
 
+/**
+ * nm_client_get_active_connections:
+ * @client: a #NMClient
+ *
+ * Gets the active connections.
+ *
+ * Returns: a #GPtrArray containing all the active #NMActiveConnection<!-- -->s.
+ * The returned array is owned by the client and should not be modified.
+ **/
 const GPtrArray * 
 nm_client_get_active_connections (NMClient *client)
 {
@@ -700,6 +795,14 @@
 	return handle_ptr_array_return (priv->active_connections);
 }
 
+/**
+ * nm_client_wireless_get_enabled:
+ * @client: a #NMClient
+ *
+ * Determines whether the wireless is enabled.
+ *
+ * Returns: %TRUE if wireless is enabled
+ **/
 gboolean
 nm_client_wireless_get_enabled (NMClient *client)
 {
@@ -708,6 +811,13 @@
 	return NM_CLIENT_GET_PRIVATE (client)->wireless_enabled;
 }
 
+/**
+ * nm_client_wireless_set_enabled:
+ * @client: a #NMClient
+ * @enabled: %TRUE to enable wireless
+ *
+ * Enables or disables wireless devices.
+ **/
 void
 nm_client_wireless_set_enabled (NMClient *client, gboolean enabled)
 {
@@ -724,6 +834,14 @@
 					    &value);
 }
 
+/**
+ * nm_client_wireless_hardware_get_enabled:
+ * @client: a #NMClient
+ *
+ * Determines whether the wireless hardware is enabled.
+ *
+ * Returns: %TRUE if the wireless hardware is enabled
+ **/
 gboolean
 nm_client_wireless_hardware_get_enabled (NMClient *client)
 {
@@ -732,6 +850,14 @@
 	return NM_CLIENT_GET_PRIVATE (client)->wireless_hw_enabled;
 }
 
+/**
+ * nm_client_get_state:
+ * @client: a #NMClient
+ *
+ * Gets the current daemon state.
+ *
+ * Returns: the current %NMState
+ **/
 NMState
 nm_client_get_state (NMClient *client)
 {
@@ -750,6 +876,14 @@
 	return priv->state;
 }
 
+/**
+ * nm_client_sleep:
+ * @client: a #NMClient
+ * @sleep: %TRUE to put the daemon to sleep
+ *
+ * Enables or disables networking. When the daemon is put to sleep, it'll deactivate and disable
+ * all the active devices.
+ **/
 void
 nm_client_sleep (NMClient *client, gboolean sleep)
 {
@@ -763,6 +897,14 @@
 	}
 }
 
+/**
+ * nm_client_get_manager_running:
+ * @client: a #NMClient
+ *
+ * Determines whether the daemon is running.
+ *
+ * Returns: %TRUE if the daemon is running
+ **/
 gboolean
 nm_client_get_manager_running (NMClient *client)
 {

Modified: trunk/libnm-glib/nm-device-ethernet.c
==============================================================================
--- trunk/libnm-glib/nm-device-ethernet.c	(original)
+++ trunk/libnm-glib/nm-device-ethernet.c	Tue Aug 12 08:05:21 2008
@@ -32,6 +32,15 @@
 #define DBUS_PROP_SPEED "Speed"
 #define DBUS_PROP_CARRIER "Carrier"
 
+/**
+ * nm_device_ethernet_new:
+ * @connection: the #DBusGConnection
+ * @path: the DBus object path of the device
+ *
+ * Creates a new #NMDeviceEthernet.
+ *
+ * Returns: a new device
+ **/
 GObject *
 nm_device_ethernet_new (DBusGConnection *connection, const char *path)
 {
@@ -44,6 +53,15 @@
 	                     NULL);
 }
 
+/**
+ * nm_device_ethernet_get_hw_address:
+ * @device: a #NMDeviceEthernet
+ *
+ * Gets the hardware (MAC) address of the #NMDeviceEthernet
+ *
+ * Returns: the hardware address. This is the internal string used by the
+ * device, and must not be modified.
+ **/
 const char *
 nm_device_ethernet_get_hw_address (NMDeviceEthernet *device)
 {
@@ -61,6 +79,14 @@
 	return priv->hw_address;
 }
 
+/**
+ * nm_device_ethernet_get_speed:
+ * @device: a #NMDeviceEthernet
+ *
+ * Gets the speed of the #NMDeviceEthernet.
+ *
+ * Returns: the speed of the device
+ **/
 guint32
 nm_device_ethernet_get_speed (NMDeviceEthernet *device)
 {
@@ -78,6 +104,14 @@
 	return priv->speed;
 }
 
+/**
+ * nm_device_ethernet_get_carrier:
+ * @device: a #NMDeviceEthernet
+ *
+ * Whether the device has carrier.
+ *
+ * Returns: %TRUE if the device has carrier
+ **/
 gboolean
 nm_device_ethernet_get_carrier (NMDeviceEthernet *device)
 {
@@ -214,6 +248,12 @@
 	object_class->get_property = get_property;
 
 	/* properties */
+
+	/**
+	 * NMDeviceEthernet:hw-address:
+	 *
+	 * The hardware (MAC) address of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_HW_ADDRESS,
 		 g_param_spec_string (NM_DEVICE_ETHERNET_HW_ADDRESS,
@@ -222,6 +262,11 @@
 						  NULL,
 						  G_PARAM_READABLE));
 
+	/**
+	 * NMDeviceEthernet:speed:
+	 *
+	 * The speed of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_SPEED,
 		 g_param_spec_uint (NM_DEVICE_ETHERNET_SPEED,
@@ -230,6 +275,11 @@
 					    0, G_MAXUINT32, 0,
 					    G_PARAM_READABLE));
 
+	/**
+	 * NMDeviceEthernet:carrier:
+	 *
+	 * Whether the device has carrier.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_CARRIER,
 		 g_param_spec_boolean (NM_DEVICE_ETHERNET_CARRIER,

Modified: trunk/libnm-glib/nm-device-wifi.c
==============================================================================
--- trunk/libnm-glib/nm-device-wifi.c	(original)
+++ trunk/libnm-glib/nm-device-wifi.c	Tue Aug 12 08:05:21 2008
@@ -60,6 +60,15 @@
 
 static guint signals[LAST_SIGNAL] = { 0 };
 
+/**
+ * nm_device_wifi_new:
+ * @connection: the #DBusGConnection
+ * @path: the DBus object path of the device
+ *
+ * Creates a new #NMDeviceWifi.
+ *
+ * Returns: a new device
+ **/
 GObject *
 nm_device_wifi_new (DBusGConnection *connection, const char *path)
 {
@@ -72,6 +81,15 @@
 	                     NULL);
 }
 
+/**
+ * nm_device_wifi_get_hw_address:
+ * @device: a #NMDeviceWifi
+ *
+ * Gets the hardware (MAC) address of the #NMDeviceWifi
+ *
+ * Returns: the hardware address. This is the internal string used by the
+ * device, and must not be modified.
+ **/
 const char *
 nm_device_wifi_get_hw_address (NMDeviceWifi *device)
 {
@@ -89,6 +107,14 @@
 	return priv->hw_address;
 }
 
+/**
+ * nm_device_wifi_get_mode:
+ * @device: a #NMDeviceWifi
+ *
+ * Gets the #NMDeviceWifi mode.
+ *
+ * Returns: the mode
+ **/
 NM80211Mode
 nm_device_wifi_get_mode (NMDeviceWifi *device)
 {
@@ -106,6 +132,14 @@
 	return priv->mode;
 }
 
+/**
+ * nm_device_wifi_get_bitrate:
+ * @device: a #NMDeviceWifi
+ *
+ * Gets the bit rate of the #NMDeviceWifi.
+ *
+ * Returns: the bit rate
+ **/
 guint32
 nm_device_wifi_get_bitrate (NMDeviceWifi *device)
 {
@@ -137,6 +171,14 @@
 	return priv->rate;
 }
 
+/**
+ * nm_device_wifi_get_capabilities:
+ * @device: a #NMDeviceWifi
+ *
+ * Gets the WIFI capabilities of the #NMDeviceWifi.
+ *
+ * Returns: the capabilities
+ **/
 guint32
 nm_device_wifi_get_capabilities (NMDeviceWifi *device)
 {
@@ -154,6 +196,14 @@
 	return priv->wireless_caps;
 }
 
+/**
+ * nm_device_wifi_get_active_access_point:
+ * @self: a #NMDeviceWifi
+ *
+ * Gets the active #NMAccessPoint.
+ *
+ * Returns: the access point or %NULL if none is active
+ **/
 NMAccessPoint *
 nm_device_wifi_get_active_access_point (NMDeviceWifi *self)
 {
@@ -196,6 +246,15 @@
 	return priv->active_ap;
 }
 
+/**
+ * nm_device_wifi_get_access_points:
+ * @self: a #NMDeviceWifi
+ *
+ * Gets all the scanned access points of the #NMDeviceWifi.
+ *
+ * Returns: a #GPtrArray containing all the scanned #NMAccessPoint<!-- -->s.
+ * The returned array is owned by the client and should not be modified.
+ **/
 const GPtrArray *
 nm_device_wifi_get_access_points (NMDeviceWifi *self)
 {
@@ -226,6 +285,15 @@
 	return handle_ptr_array_return (priv->aps);
 }
 
+/**
+ * nm_device_wifi_get_access_point_by_path:
+ * @self: a #NMDeviceWifi
+ * @path: the object path of the access point
+ *
+ * Gets a #NMAccessPoint by path.
+ *
+ * Returns: the access point or %NULL if none is found.
+ **/
 NMAccessPoint *
 nm_device_wifi_get_access_point_by_path (NMDeviceWifi *self,
 											        const char *path)
@@ -323,6 +391,13 @@
 	}
 }
 
+/**
+ * nm_device_wifi_set_wireless_enabled:
+ * @device: a #NMDeviceWifi
+ * @enabled: %TRUE to enable the device
+ *
+ * Enables or disables the wireless device.
+ **/
 void
 nm_device_wifi_set_wireless_enabled (NMDeviceWifi *device,
                                                 gboolean enabled)
@@ -547,6 +622,12 @@
 	object_class->finalize = finalize;
 
 	/* properties */
+
+	/**
+	 * NMDeviceWifi:hw-address:
+	 *
+	 * The hardware (MAC) address of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_HW_ADDRESS,
 		 g_param_spec_string (NM_DEVICE_WIFI_HW_ADDRESS,
@@ -555,6 +636,11 @@
 						  NULL,
 						  G_PARAM_READABLE));
 
+	/**
+	 * NMDeviceWifi:mode:
+	 *
+	 * The mode of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_MODE,
 		 g_param_spec_uint (NM_DEVICE_WIFI_MODE,
@@ -563,6 +649,11 @@
 					    NM_802_11_MODE_UNKNOWN, NM_802_11_MODE_INFRA, NM_802_11_MODE_INFRA,
 					    G_PARAM_READABLE));
 
+	/**
+	 * NMDeviceWifi:bitrate:
+	 *
+	 * The bit rate of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_BITRATE,
 		 g_param_spec_uint (NM_DEVICE_WIFI_BITRATE,
@@ -571,6 +662,11 @@
 					    0, G_MAXUINT32, 0,
 					    G_PARAM_READABLE));
 
+	/**
+	 * NMDeviceWifi:active-access-point:
+	 *
+	 * The active #NMAccessPoint of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_ACTIVE_ACCESS_POINT,
 		 g_param_spec_object (NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT,
@@ -579,6 +675,11 @@
 						 NM_TYPE_ACCESS_POINT,
 						 G_PARAM_READABLE));
 
+	/**
+	 * NMDeviceWifi:wireless-capabilities:
+	 *
+	 * The wireless capabilities of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_WIRELESS_CAPABILITIES,
 		 g_param_spec_uint (NM_DEVICE_WIFI_CAPABILITIES,
@@ -588,6 +689,14 @@
 		                    G_PARAM_READABLE));
 
 	/* signals */
+
+	/**
+	 * NMDeviceWifi::access-point-added:
+	 * @device: the wifi device that received the signal
+	 * @ap: the new access point
+	 *
+	 * Notifies that a #NMAccessPoint is added to the wifi device.
+	 **/
 	signals[ACCESS_POINT_ADDED] =
 		g_signal_new ("access-point-added",
 				    G_OBJECT_CLASS_TYPE (object_class),
@@ -598,6 +707,13 @@
 				    G_TYPE_NONE, 1,
 				    G_TYPE_OBJECT);
 
+	/**
+	 * NMDeviceWifi::access-point-removed:
+	 * @device: the wifi device that received the signal
+	 * @ap: the removed access point
+	 *
+	 * Notifies that a #NMAccessPoint is removed from the wifi device.
+	 **/
 	signals[ACCESS_POINT_REMOVED] =
 		g_signal_new ("access-point-removed",
 				    G_OBJECT_CLASS_TYPE (object_class),

Modified: trunk/libnm-glib/nm-device.c
==============================================================================
--- trunk/libnm-glib/nm-device.c	(original)
+++ trunk/libnm-glib/nm-device.c	Tue Aug 12 08:05:21 2008
@@ -321,6 +321,12 @@
 	object_class->finalize = finalize;
 
 	/* properties */
+
+	/**
+	 * NMDevice:interface:
+	 *
+	 * The interface of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_INTERFACE,
 		 g_param_spec_string (NM_DEVICE_INTERFACE,
@@ -329,6 +335,11 @@
 						  NULL,
 						  G_PARAM_READABLE));
 
+	/**
+	 * NMDevice:udi:
+	 *
+	 * The HAL UDI of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_UDI,
 		 g_param_spec_string (NM_DEVICE_UDI,
@@ -337,6 +348,11 @@
 						  NULL,
 						  G_PARAM_READABLE));
 
+	/**
+	 * NMDevice:driver:
+	 *
+	 * The driver of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_DRIVER,
 		 g_param_spec_string (NM_DEVICE_DRIVER,
@@ -345,6 +361,11 @@
 						  NULL,
 						  G_PARAM_READABLE));
 
+	/**
+	 * NMDevice:capabilities:
+	 *
+	 * The capabilities of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_CAPABILITIES,
 		 g_param_spec_uint (NM_DEVICE_CAPABILITIES,
@@ -353,6 +374,11 @@
 						  0, G_MAXUINT32, 0,
 						  G_PARAM_READABLE));
 
+	/**
+	 * NMDevice:managed:
+	 *
+	 * Whether the device is managed by NetworkManager.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_MANAGED,
 		 g_param_spec_boolean (NM_DEVICE_MANAGED,
@@ -361,6 +387,11 @@
 						  FALSE,
 						  G_PARAM_READABLE));
 
+	/**
+	 * NMDevice:ip4-config:
+	 *
+	 * The #NMIP4Config of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_IP4_CONFIG,
 		 g_param_spec_object (NM_DEVICE_IP4_CONFIG,
@@ -369,6 +400,11 @@
 						  NM_TYPE_IP4_CONFIG,
 						  G_PARAM_READABLE));
 
+	/**
+	 * NMDevice:dhcp4-config:
+	 *
+	 * The #NMDHCP4Config of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_DHCP4_CONFIG,
 		 g_param_spec_object (NM_DEVICE_DHCP4_CONFIG,
@@ -377,6 +413,11 @@
 						  NM_TYPE_DHCP4_CONFIG,
 						  G_PARAM_READABLE));
 
+	/**
+	 * NMDevice:state:
+	 *
+	 * The state of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_STATE,
 		 g_param_spec_uint (NM_DEVICE_STATE,
@@ -385,6 +426,11 @@
 						  0, G_MAXUINT32, 0,
 						  G_PARAM_READABLE));
 
+	/**
+	 * NMDevice:vendor:
+	 *
+	 * The vendor string of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_VENDOR,
 		 g_param_spec_string (NM_DEVICE_VENDOR,
@@ -393,6 +439,11 @@
 						  NULL,
 						  G_PARAM_READABLE));
 
+	/**
+	 * NMDevice:product:
+	 *
+	 * The product string of the device.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_PRODUCT,
 		 g_param_spec_string (NM_DEVICE_PRODUCT,
@@ -402,6 +453,14 @@
 						  G_PARAM_READABLE));
 
 	/* signals */
+
+	/**
+	 * NMDevice::state-changed:
+	 * @device: the client that received the signal
+	 * @state: the new state of the device
+	 *
+	 * Notifies the state change of a #NMDevice.
+	 **/
 	signals[STATE_CHANGED] =
 		g_signal_new ("state-changed",
 				    G_OBJECT_CLASS_TYPE (object_class),
@@ -413,6 +472,15 @@
 				    G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
 }
 
+/**
+ * nm_device_new:
+ * @connection: the #DBusGConnection
+ * @path: the DBus object path of the device
+ *
+ * Creates a new #NMDevice.
+ *
+ * Returns: a new device
+ **/
 GObject *
 nm_device_new (DBusGConnection *connection, const char *path)
 {
@@ -475,6 +543,15 @@
 	return G_OBJECT (device);
 }
 
+/**
+ * nm_device_get_iface:
+ * @device: a #NMDevice
+ *
+ * Gets the interface name of the #NMDevice.
+ *
+ * Returns: the interface of the device. This is the internal string used by the
+ * device, and must not be modified.
+ **/
 const char *
 nm_device_get_iface (NMDevice *device)
 {
@@ -492,6 +569,15 @@
 	return priv->iface;
 }
 
+/**
+ * nm_device_get_udi:
+ * @device: a #NMDevice
+ *
+ * Gets the HAL UDI of the #NMDevice.
+ *
+ * Returns: the HAL UDI of the device. This is the internal string used by the
+ * device, and must not be modified.
+ **/
 const char *
 nm_device_get_udi (NMDevice *device)
 {
@@ -509,6 +595,15 @@
 	return priv->udi;
 }
 
+/**
+ * nm_device_get_driver:
+ * @device: a #NMDevice
+ *
+ * Gets the driver of the #NMDevice.
+ *
+ * Returns: the driver of the device. This is the internal string used by the
+ * device, and must not be modified.
+ **/
 const char *
 nm_device_get_driver (NMDevice *device)
 {
@@ -526,6 +621,14 @@
 	return priv->driver;
 }
 
+/**
+ * nm_device_get_capabilities:
+ * @device: a #NMDevice
+ *
+ * Gets the device' capabilities.
+ *
+ * Returns: the capabilities
+ **/
 guint32
 nm_device_get_capabilities (NMDevice *device)
 {
@@ -543,6 +646,14 @@
 	return priv->capabilities;
 }
 
+/**
+ * nm_device_get_managed:
+ * @device: a #NMDevice
+ *
+ * Whether the #NMDevice is managed by NetworkManager.
+ *
+ * Returns: %TRUE if the device is managed by NetworkManager
+ **/
 gboolean
 nm_device_get_managed (NMDevice *device)
 {
@@ -560,6 +671,14 @@
 	return priv->managed;
 }
 
+/**
+ * nm_device_get_ip4_config:
+ * @device: a #NMDevice
+ *
+ * Gets the current #NMIP4Config associated with the #NMDevice.
+ *
+ * Returns: the #NMIP4Config or %NULL if the device is not activated.
+ **/
 NMIP4Config *
 nm_device_get_ip4_config (NMDevice *device)
 {
@@ -586,6 +705,15 @@
 	return priv->ip4_config;
 }
 
+/**
+ * nm_device_get_dhcp4_config:
+ * @device: a #NMDevice
+ *
+ * Gets the current #NMDHCP4Config associated with the #NMDevice.
+ *
+ * Returns: the #NMDHCPConfig or %NULL if the device is not activated or not
+ * using DHCP.
+ **/
 NMDHCP4Config *
 nm_device_get_dhcp4_config (NMDevice *device)
 {
@@ -612,6 +740,14 @@
 	return priv->dhcp4_config;
 }
 
+/**
+ * nm_device_get_state:
+ * @device: a #NMDevice
+ *
+ * Gets the current #NMDevice state.
+ *
+ * Returns: the current device state
+ **/
 NMDeviceState
 nm_device_get_state (NMDevice *device)
 {
@@ -807,6 +943,15 @@
 	nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_PRODUCT);
 }
 
+/**
+ * nm_device_get_product:
+ * @device: a #NMDevice
+ *
+ * Gets the product string of the #NMDevice.
+ *
+ * Returns: the product name of the device. This is the internal string used by the
+ * device, and must not be modified.
+ **/
 const char *
 nm_device_get_product (NMDevice *device)
 {
@@ -820,6 +965,15 @@
 	return priv->product;
 }
 
+/**
+ * nm_device_get_vendor:
+ * @device: a #NMDevice
+ *
+ * Gets the vendor string of the #NMDevice.
+ *
+ * Returns: the vendor name of the device. This is the internal string used by the
+ * device, and must not be modified.
+ **/
 const char *
 nm_device_get_vendor (NMDevice *device)
 {

Modified: trunk/libnm-glib/nm-gsm-device.c
==============================================================================
--- trunk/libnm-glib/nm-gsm-device.c	(original)
+++ trunk/libnm-glib/nm-gsm-device.c	Tue Aug 12 08:05:21 2008
@@ -87,6 +87,15 @@
 	object_class->dispose = dispose;
 }
 
+/**
+ * nm_gsm_device_new:
+ * @connection: the #DBusGConnection
+ * @path: the DBus object path of the device
+ *
+ * Creates a new #NMGsmDevice.
+ *
+ * Returns: a new device
+ **/
 NMGsmDevice *
 nm_gsm_device_new (DBusGConnection *connection, const char *path)
 {

Modified: trunk/libnm-glib/nm-object.c
==============================================================================
--- trunk/libnm-glib/nm-object.c	(original)
+++ trunk/libnm-glib/nm-object.c	Tue Aug 12 08:05:21 2008
@@ -168,6 +168,12 @@
 	object_class->finalize = finalize;
 
 	/* porperties */
+
+	/**
+	 * NMObject:connection:
+	 *
+	 * The #DBusGConnection of the object.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_CONNECTION,
 		 g_param_spec_boxed (NM_OBJECT_DBUS_CONNECTION,
@@ -176,6 +182,11 @@
 							 DBUS_TYPE_G_CONNECTION,
 							 G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
+	/**
+	 * NMObject:path:
+	 *
+	 * The DBus object path.
+	 **/
 	g_object_class_install_property
 		(object_class, PROP_PATH,
 		 g_param_spec_string (NM_OBJECT_DBUS_PATH,
@@ -185,6 +196,14 @@
 							  G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 }
 
+/**
+ * nm_object_get_connection:
+ * @object: a #NMObject
+ *
+ * Gets the #NMObject's DBusGConnection.
+ *
+ * Returns: the connection
+ **/
 DBusGConnection *
 nm_object_get_connection (NMObject *object)
 {
@@ -193,6 +212,15 @@
 	return NM_OBJECT_GET_PRIVATE (object)->connection;
 }
 
+/**
+ * nm_object_get_path:
+ * @object: a #NMObject
+ *
+ * Gets the DBus path of the #NMObject.
+ *
+ * Returns: the object's path. This is the internal string used by the
+ * device, and must not be modified.
+ **/
 const char *
 nm_object_get_path (NMObject *object)
 {

Modified: trunk/libnm-glib/nm-serial-device.c
==============================================================================
--- trunk/libnm-glib/nm-serial-device.c	(original)
+++ trunk/libnm-glib/nm-serial-device.c	Tue Aug 12 08:05:21 2008
@@ -26,6 +26,15 @@
 
 static guint signals[LAST_SIGNAL] = { 0 };
 
+/**
+ * nm_serial_device_get_bytes_received:
+ * @self: a #NMSerialDevice
+ *
+ * Gets the amount of bytes received by the serial device.
+ * This counter is reset when the device is activated.
+ *
+ * Returns: bytes received
+ **/
 guint32
 nm_serial_device_get_bytes_received (NMSerialDevice *self)
 {
@@ -34,6 +43,15 @@
 	return NM_SERIAL_DEVICE_GET_PRIVATE (self)->in_bytes;
 }
 
+/**
+ * nm_serial_device_get_bytes_sent:
+ * @self: a #NMSerialDevice
+ *
+ * Gets the amount of bytes sent by the serial device.
+ * This counter is reset when the device is activated.
+ *
+ * Returns: bytes sent
+ **/
 guint32
 nm_serial_device_get_bytes_sent (NMSerialDevice *self)
 {
@@ -148,6 +166,15 @@
 	object_class->dispose = dispose;
 
 	/* Signals */
+
+	/**
+	 * NMSerialDevice::ppp-stats:
+	 * @device: the serial device that received the signal
+	 * @in_bytes: the amount of bytes received
+	 * @out_bytes: the amount of bytes sent
+	 *
+	 * Notifies that a #NMAccessPoint is added to the wifi device.
+	 **/
 	signals[PPP_STATS] =
 		g_signal_new ("ppp-stats",
 					  G_OBJECT_CLASS_TYPE (object_class),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]