summaryrefslogtreecommitdiffstats
path: root/src/itdb_device.c
diff options
context:
space:
mode:
authorChristophe Fergeau <teuf@gnome.org>2006-04-10 18:17:25 +0000
committerChristophe Fergeau <teuf@gnome.org>2006-04-10 18:17:25 +0000
commit94ca87f3e5f9a2de994893f4927bd374f36a8dc7 (patch)
tree5129c69fdbd110e8c536ce0fc4082b4b1a90dbe1 /src/itdb_device.c
parent7252444ca4b911507beaa9d62f6ddb28520b2284 (diff)
downloadlibgpod-94ca87f3e5f9a2de994893f4927bd374f36a8dc7.tar.gz
libgpod-94ca87f3e5f9a2de994893f4927bd374f36a8dc7.tar.xz
libgpod-94ca87f3e5f9a2de994893f4927bd374f36a8dc7.zip
* docs/Makefile.am:
* docs/reference/Makefile.am: * docs/reference/libgpod-docs.xml: * docs/reference/libgpod-sections.txt: * docs/reference/tmpl/Internal.sgml: * docs/reference/tmpl/artwork.sgml: * docs/reference/tmpl/device.sgml: * docs/reference/tmpl/itunesdb-copying.sgml: * docs/reference/tmpl/itunesdb-db.sgml: * docs/reference/tmpl/itunesdb-lowlevel.sgml: * docs/reference/tmpl/itunesdb-time.sgml: * docs/reference/tmpl/libgpod-unused.sgml: * docs/reference/tmpl/playlists.sgml: * docs/reference/tmpl/smart-playlists.sgml: * docs/reference/tmpl/track.sgml: * docs/reference/version.xml.in: all the files below are new files needed for gtk-doc support * Makefile.am: * configure.ac: add gtk-doc support to build system * src/itdb_artwork.c: * src/itdb_device.c: * src/itdb_itunesdb.c: * src/itdb_playlist.c: * src/itdb_track.c: update inline comments in those files so that gtk-doc can pick them up to build documentation git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1243 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src/itdb_device.c')
-rw-r--r--src/itdb_device.c46
1 files changed, 38 insertions, 8 deletions
diff --git a/src/itdb_device.c b/src/itdb_device.c
index f8812e9..f475be3 100644
--- a/src/itdb_device.c
+++ b/src/itdb_device.c
@@ -228,7 +228,14 @@ static void itdb_device_reset_sysinfo (Itdb_Device *device)
}
-/* Create new Itdb_Device structure */
+/**
+ * itdb_device_new:
+ *
+ * Creates a new #Itdb_Device structure
+ *
+ * Return value: a newly allocated #Itdb_Device which must be freed with
+ * itdb_device_free() when no longer needed
+ **/
Itdb_Device *itdb_device_new ()
{
Itdb_Device *dev;
@@ -238,7 +245,12 @@ Itdb_Device *itdb_device_new ()
return dev;
}
-/* Free memory used by @device */
+/**
+ * itdb_device_free:
+ * @device: an #Itdb_Device
+ *
+ * Frees memory used by @device
+ **/
void itdb_device_free (Itdb_Device *device)
{
if (device)
@@ -251,7 +263,14 @@ void itdb_device_free (Itdb_Device *device)
}
-/* Set mountpoint and read SysInfo file */
+/**
+ * itdb_device_set_mountpoint:
+ * @device: an #Itdb_Device
+ * @mp: the new mount point
+ *
+ * Sets the mountpoint of @device to @mp and update the cached device
+ * information (in particular, re-read the SysInfo file)
+ **/
void itdb_device_set_mountpoint (Itdb_Device *device, const gchar *mp)
{
g_return_if_fail (device);
@@ -263,10 +282,15 @@ void itdb_device_set_mountpoint (Itdb_Device *device, const gchar *mp)
}
-/* Read SysInfo file and store information in device->sysinfo for
+/**
+ * itdb_device_read_sysinfo:
+ * @device: an #Itdb_Device
+ *
+ * Reads the SysInfo file and stores information in device->sysinfo for
* later use.
*
- * Return value: TRUE if file could be read, FALSE otherwise */
+ * Return value: TRUE if file could be read, FALSE otherwise
+ **/
gboolean itdb_device_read_sysinfo (Itdb_Device *device)
{
const gchar *p_sysinfo[] = {"SysInfo", NULL};
@@ -325,10 +349,16 @@ gboolean itdb_device_read_sysinfo (Itdb_Device *device)
}
-/* Retrieve specified field from the SysInfo file.
+/**
+ * itdb_device_get_sysinfo:
+ * @device: an #Itdb_Device
+ * @field: field to retrive information from
*
- * Return value: g_free() after use
- */
+ * Retrieve specified field from the SysInfo file.
+ *
+ * Return value: the information associated with @field, or NULL if @field
+ * couldn't be found. g_free() after use
+ **/
gchar *itdb_device_get_sysinfo (Itdb_Device *device, const gchar *field)
{
g_return_val_if_fail (device, NULL);