Sophie

Sophie

distrib > PLD > th > x86_64 > by-pkgid > 74a7034237d9706b06f885a02e3ee519 > files > 12

libgpod-apidocs-0.8.3-11.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Low-level functions: libgpod Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="libgpod Reference Manual">
<link rel="up" href="itunesdb.html" title="Part I. iPod database">
<link rel="prev" href="libgpod-Time-handling.html" title="Time handling">
<link rel="next" href="ch01.html" title="iPod database components">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#libgpod-Low-level-functions.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="itunesdb.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libgpod-Time-handling.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ch01.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgpod-Low-level-functions"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgpod-Low-level-functions.top_of_page"></a>Low-level functions</span></h2>
<p>Low-level functions</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libgpod-Low-level-functions.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir" title="itdb_get_control_dir ()">itdb_get_control_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-get-itunes-dir" title="itdb_get_itunes_dir ()">itdb_get_itunes_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-get-music-dir" title="itdb_get_music_dir ()">itdb_get_music_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-get-artwork-dir" title="itdb_get_artwork_dir ()">itdb_get_artwork_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-get-device-dir" title="itdb_get_device_dir ()">itdb_get_device_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-get-photos-dir" title="itdb_get_photos_dir ()">itdb_get_photos_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-get-itunesdb-path" title="itdb_get_itunesdb_path ()">itdb_get_itunesdb_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-get-itunessd-path" title="itdb_get_itunessd_path ()">itdb_get_itunessd_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-get-itunescdb-path" title="itdb_get_itunescdb_path ()">itdb_get_itunescdb_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-get-artworkdb-path" title="itdb_get_artworkdb_path ()">itdb_get_artworkdb_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-get-photodb-path" title="itdb_get_photodb_path ()">itdb_get_photodb_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-get-photos-thumb-dir" title="itdb_get_photos_thumb_dir ()">itdb_get_photos_thumb_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-get-path" title="itdb_get_path ()">itdb_get_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-resolve-path" title="itdb_resolve_path ()">itdb_resolve_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-cp" title="itdb_cp ()">itdb_cp</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-cp-get-dest-filename" title="itdb_cp_get_dest_filename ()">itdb_cp_get_dest_filename</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libgpod-Tracks.html#Itdb-Track" title="struct Itdb_Track"><span class="returnvalue">Itdb_Track</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-cp-finalize" title="itdb_cp_finalize ()">itdb_cp_finalize</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB" title="struct Itdb_iTunesDB"><span class="returnvalue">Itdb_iTunesDB</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-parse-file" title="itdb_parse_file ()">itdb_parse_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-write-file" title="itdb_write_file ()">itdb_write_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-shuffle-write" title="itdb_shuffle_write ()">itdb_shuffle_write</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-shuffle-write-file" title="itdb_shuffle_write_file ()">itdb_shuffle_write_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB" title="struct Itdb_iTunesDB"><span class="returnvalue">Itdb_iTunesDB</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgpod-Low-level-functions.html#itdb-duplicate" title="itdb_duplicate ()">itdb_duplicate</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgpod-Low-level-functions.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="libgpod-Low-level-functions.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="itdb-get-control-dir"></a><h3>itdb_get_control_dir ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
itdb_get_control_dir (<em class="parameter"><code>const <span class="type">gchar</span> *mountpoint</code></em>);</pre>
<p>Get the i*_Control directory. Observed values are 'iPod_Control'
for standard iPods and 'iTunes/iTunes_Control' for mobile
applications.</p>
<div class="refsect3">
<a name="itdb-get-control-dir.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mountpoint</p></td>
<td class="parameter_description"><p>the iPod mountpoint</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-get-control-dir.returns"></a><h4>Returns</h4>
<p> path to the control dir or NULL if non-existent. Must
<code class="function">g_free()</code> after use.</p>
</div>
<p class="since">Since: 0.4.0</p>
</div>
<hr>
<div class="refsect2">
<a name="itdb-get-itunes-dir"></a><h3>itdb_get_itunes_dir ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
itdb_get_itunes_dir (<em class="parameter"><code>const <span class="type">gchar</span> *mountpoint</code></em>);</pre>
<p>Retrieve the iTunes directory (containing the iTunesDB) by first
calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir" title="itdb_get_control_dir ()"><code class="function">itdb_get_control_dir()</code></a> and then adding 'iTunes'</p>
<div class="refsect3">
<a name="itdb-get-itunes-dir.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mountpoint</p></td>
<td class="parameter_description"><p>the iPod mountpoint</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-get-itunes-dir.returns"></a><h4>Returns</h4>
<p> path to the iTunes directory or NULL if non-existent.
Must <code class="function">g_free()</code> after use.</p>
</div>
<p class="since">Since: 0.4.0</p>
</div>
<hr>
<div class="refsect2">
<a name="itdb-get-music-dir"></a><h3>itdb_get_music_dir ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
itdb_get_music_dir (<em class="parameter"><code>const <span class="type">gchar</span> *mountpoint</code></em>);</pre>
<p>Retrieve the Music directory (containing the Fnn dirs) by first
calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir" title="itdb_get_control_dir ()"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Music'</p>
<div class="refsect3">
<a name="itdb-get-music-dir.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mountpoint</p></td>
<td class="parameter_description"><p>the iPod mountpoint</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-get-music-dir.returns"></a><h4>Returns</h4>
<p> path to the Music directory or NULL if
non-existent. Must <code class="function">g_free()</code> after use.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="itdb-get-artwork-dir"></a><h3>itdb_get_artwork_dir ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
itdb_get_artwork_dir (<em class="parameter"><code>const <span class="type">gchar</span> *mountpoint</code></em>);</pre>
<p>Retrieve the Artwork directory (containing the ArtworDB) by
first calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir" title="itdb_get_control_dir ()"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Artwork'</p>
<div class="refsect3">
<a name="itdb-get-artwork-dir.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mountpoint</p></td>
<td class="parameter_description"><p>the iPod mountpoint</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-get-artwork-dir.returns"></a><h4>Returns</h4>
<p> path to the Artwork directory or NULL if
non-existent. Must <code class="function">g_free()</code> after use.</p>
</div>
<p class="since">Since: 0.4.0</p>
</div>
<hr>
<div class="refsect2">
<a name="itdb-get-device-dir"></a><h3>itdb_get_device_dir ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
itdb_get_device_dir (<em class="parameter"><code>const <span class="type">gchar</span> *mountpoint</code></em>);</pre>
<p>Retrieve the Device directory (containing the SysInfo file) by
first calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir" title="itdb_get_control_dir ()"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Device'</p>
<div class="refsect3">
<a name="itdb-get-device-dir.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mountpoint</p></td>
<td class="parameter_description"><p>the iPod mountpoint</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-get-device-dir.returns"></a><h4>Returns</h4>
<p> path to the Device directory or NULL if
non-existent. Must <code class="function">g_free()</code> after use.</p>
</div>
<p class="since">Since: 0.4.0</p>
</div>
<hr>
<div class="refsect2">
<a name="itdb-get-photos-dir"></a><h3>itdb_get_photos_dir ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
itdb_get_photos_dir (<em class="parameter"><code>const <span class="type">gchar</span> *mountpoint</code></em>);</pre>
<p>Retrieve the Photo directory by
first calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir" title="itdb_get_control_dir ()"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Photos'</p>
<div class="refsect3">
<a name="itdb-get-photos-dir.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mountpoint</p></td>
<td class="parameter_description"><p>mountpoint of iPod</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-get-photos-dir.returns"></a><h4>Returns</h4>
<p> path to the Artwork directory or NULL if
non-existent. Must <code class="function">g_free()</code> after use.</p>
</div>
<p class="since">Since: 0.4.0</p>
</div>
<hr>
<div class="refsect2">
<a name="itdb-get-itunesdb-path"></a><h3>itdb_get_itunesdb_path ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
itdb_get_itunesdb_path (<em class="parameter"><code>const <span class="type">gchar</span> *mountpoint</code></em>);</pre>
<p>Retrieve a path to the iTunesDB</p>
<div class="refsect3">
<a name="itdb-get-itunesdb-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mountpoint</p></td>
<td class="parameter_description"><p>the iPod mountpoint</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-get-itunesdb-path.returns"></a><h4>Returns</h4>
<p> path to the iTunesDB or NULL if non-existent. Must <code class="function">g_free()</code>
after use.</p>
</div>
<p class="since">Since: 0.4.0</p>
</div>
<hr>
<div class="refsect2">
<a name="itdb-get-itunessd-path"></a><h3>itdb_get_itunessd_path ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
itdb_get_itunessd_path (<em class="parameter"><code>const <span class="type">gchar</span> *mountpoint</code></em>);</pre>
<p>Retrieve a path to the iTunesSD</p>
<div class="refsect3">
<a name="itdb-get-itunessd-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mountpoint</p></td>
<td class="parameter_description"><p>the iPod mountpoint</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-get-itunessd-path.returns"></a><h4>Returns</h4>
<p> path to the iTunesSD or NULL if non-existent. Must <code class="function">g_free()</code>
after use.</p>
</div>
<p class="since">Since: 0.4.0</p>
</div>
<hr>
<div class="refsect2">
<a name="itdb-get-itunescdb-path"></a><h3>itdb_get_itunescdb_path ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
itdb_get_itunescdb_path (<em class="parameter"><code>const <span class="type">gchar</span> *mountpoint</code></em>);</pre>
<p>Retrieve a path to the iTunesCDB. The iTunesCDB is a compressed version
of the iTunesDB which can be found on iPhones/iPod Touch with firmware 3.0</p>
<div class="refsect3">
<a name="itdb-get-itunescdb-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mountpoint</p></td>
<td class="parameter_description"><p>the iPod mountpoint</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-get-itunescdb-path.returns"></a><h4>Returns</h4>
<p> path to the iTunesCDB or NULL if non-existent. Must <code class="function">g_free()</code>
after use.</p>
</div>
<p class="since">Since: 0.4.0</p>
</div>
<hr>
<div class="refsect2">
<a name="itdb-get-artworkdb-path"></a><h3>itdb_get_artworkdb_path ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
itdb_get_artworkdb_path (<em class="parameter"><code>const <span class="type">gchar</span> *mountpoint</code></em>);</pre>
<p>Retrieve a path to the ArtworkDB</p>
<div class="refsect3">
<a name="itdb-get-artworkdb-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mountpoint</p></td>
<td class="parameter_description"><p>the iPod mountpoint</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-get-artworkdb-path.returns"></a><h4>Returns</h4>
<p> path to the ArtworkDB or NULL if non-existent. Must <code class="function">g_free()</code>
after use.</p>
</div>
<p class="since">Since: 0.4.0</p>
</div>
<hr>
<div class="refsect2">
<a name="itdb-get-photodb-path"></a><h3>itdb_get_photodb_path ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
itdb_get_photodb_path (<em class="parameter"><code>const <span class="type">gchar</span> *mountpoint</code></em>);</pre>
<p>Retrieve a path to the Photo DB</p>
<div class="refsect3">
<a name="itdb-get-photodb-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mountpoint</p></td>
<td class="parameter_description"><p>the iPod mountpoint</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-get-photodb-path.returns"></a><h4>Returns</h4>
<p> path to the PhotoDB or NULL if non-existent. Must
<code class="function">g_free()</code> after use.</p>
</div>
<p class="since">Since: 0.4.0</p>
</div>
<hr>
<div class="refsect2">
<a name="itdb-get-photos-thumb-dir"></a><h3>itdb_get_photos_thumb_dir ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
itdb_get_photos_thumb_dir (<em class="parameter"><code>const <span class="type">gchar</span> *mountpoint</code></em>);</pre>
<p>Retrieve the Photo Thumbnail directory by
first calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir" title="itdb_get_control_dir ()"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Photos/Thumbs'</p>
<div class="refsect3">
<a name="itdb-get-photos-thumb-dir.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mountpoint</p></td>
<td class="parameter_description"><p>the iPod mountpoint</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-get-photos-thumb-dir.returns"></a><h4>Returns</h4>
<p> path to the Artwork directory or NULL if
non-existent. Must <code class="function">g_free()</code> after use.</p>
</div>
<p class="since">Since: 0.4.0</p>
</div>
<hr>
<div class="refsect2">
<a name="itdb-get-path"></a><h3>itdb_get_path ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
itdb_get_path (<em class="parameter"><code>const <span class="type">gchar</span> *dir</code></em>,
               <em class="parameter"><code>const <span class="type">gchar</span> *file</code></em>);</pre>
<p>Retrieve a path to the <em class="parameter"><code>file</code></em>
 in <em class="parameter"><code>dir</code></em>
</p>
<div class="refsect3">
<a name="itdb-get-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dir</p></td>
<td class="parameter_description"><p>a directory</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>file</p></td>
<td class="parameter_description"><p>a file</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-get-path.returns"></a><h4>Returns</h4>
<p> path to the <em class="parameter"><code>file</code></em>
or NULL if non-existent. Must <code class="function">g_free()</code>
after use.</p>
</div>
<p class="since">Since: 0.4.0</p>
</div>
<hr>
<div class="refsect2">
<a name="itdb-resolve-path"></a><h3>itdb_resolve_path ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
itdb_resolve_path (<em class="parameter"><code>const <span class="type">gchar</span> *root</code></em>,
                   <em class="parameter"><code>const <span class="type">gchar</span> * const *components</code></em>);</pre>
<p>Resolve the path to a track on the iPod</p>
<p>We start by assuming that the iPod mount point exists.  Then, for
each component c of <em class="parameter"><code>track-&gt;ipod_path</code></em>
, we try to find an entry d in
good_path that is case-insensitively equal to c.  If we find d, we
append d to good_path and make the result the new good_path.
Otherwise, we quit and return NULL.</p>
<div class="refsect3">
<a name="itdb-resolve-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>root</p></td>
<td class="parameter_description"><p>in local encoding</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>components</p></td>
<td class="parameter_description"><p>in utf8</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-resolve-path.returns"></a><h4>Returns</h4>
<p> path to track on the iPod or NULL.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="itdb-cp"></a><h3>itdb_cp ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
itdb_cp (<em class="parameter"><code>const <span class="type">gchar</span> *from_file</code></em>,
         <em class="parameter"><code>const <span class="type">gchar</span> *to_file</code></em>,
         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Copy file <em class="parameter"><code>from_file</code></em>
 to <em class="parameter"><code>to_file</code></em>
.</p>
<div class="refsect3">
<a name="itdb-cp.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>from_file</p></td>
<td class="parameter_description"><p>source file</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>to_file</p></td>
<td class="parameter_description"><p>destination file</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for a <span class="type">GError</span> or NULL</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-cp.returns"></a><h4>Returns</h4>
<p> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em>
is
set accordingly.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="itdb-cp-get-dest-filename"></a><h3>itdb_cp_get_dest_filename ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
itdb_cp_get_dest_filename (<em class="parameter"><code><a class="link" href="libgpod-Tracks.html#Itdb-Track" title="struct Itdb_Track"><span class="type">Itdb_Track</span></a> *track</code></em>,
                           <em class="parameter"><code>const <span class="type">gchar</span> *mountpoint</code></em>,
                           <em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>,
                           <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Creates a valid filename on the iPod where <em class="parameter"><code>filename</code></em>
 can be copied.</p>
<p>You must provide either <em class="parameter"><code>track</code></em>
 or <em class="parameter"><code>mountpoint</code></em>
. Providing <em class="parameter"><code>track</code></em>
 is
not thread-safe (accesses track-&gt;itdb-&gt;device and may even write to
track-&gt;itdb-&gt;device). Providing <em class="parameter"><code>mountpoint</code></em>
 is thread-safe but
slightly slower because the number of music directories is counted
each time the function is called.</p>
<p>You can use <a class="link" href="libgpod-Low-level-functions.html#itdb-cp" title="itdb_cp ()"><code class="function">itdb_cp()</code></a> to copy the track to the iPod or implement
your own copy function. After the file was copied you have to call
<a class="link" href="libgpod-Low-level-functions.html#itdb-cp-finalize" title="itdb_cp_finalize ()"><code class="function">itdb_cp_finalize()</code></a> to obtain relevant update information for
<a class="link" href="libgpod-Tracks.html#Itdb-Track" title="struct Itdb_Track"><span class="type">Itdb_Track</span></a>.</p>
<div class="refsect3">
<a name="itdb-cp-get-dest-filename.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>track</p></td>
<td class="parameter_description"><p>track to transfer or NULL</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mountpoint</p></td>
<td class="parameter_description"><p>mountpoint of your iPod or NULL</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>the source file</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for a <span class="type">GError</span> or NULL</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-cp-get-dest-filename.returns"></a><h4>Returns</h4>
<p> a valid filename on the iPod where <em class="parameter"><code>filename</code></em>
can be
copied or NULL in case of an error. In that case <em class="parameter"><code>error</code></em>
is set
accordingly. You must free the filename when it is no longer
needed.</p>
</div>
<p class="since">Since: 0.5.0</p>
</div>
<hr>
<div class="refsect2">
<a name="itdb-cp-finalize"></a><h3>itdb_cp_finalize ()</h3>
<pre class="programlisting"><a class="link" href="libgpod-Tracks.html#Itdb-Track" title="struct Itdb_Track"><span class="returnvalue">Itdb_Track</span></a> *
itdb_cp_finalize (<em class="parameter"><code><a class="link" href="libgpod-Tracks.html#Itdb-Track" title="struct Itdb_Track"><span class="type">Itdb_Track</span></a> *track</code></em>,
                  <em class="parameter"><code>const <span class="type">gchar</span> *mountpoint</code></em>,
                  <em class="parameter"><code>const <span class="type">gchar</span> *dest_filename</code></em>,
                  <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Updates information in <em class="parameter"><code>track</code></em>
 necessary for the iPod.</p>
<p>You must supply either <em class="parameter"><code>track</code></em>
 or <em class="parameter"><code>mountpoint</code></em>
. If <em class="parameter"><code>track</code></em>
 == NULL, a
new track structure is created that must be freed with
<a class="link" href="libgpod-Tracks.html#itdb-track-free" title="itdb_track_free ()"><code class="function">itdb_track_free()</code></a> when it is no longer needed.</p>
<p>The following <em class="parameter"><code>track</code></em>
 fields are updated:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
      ipod_path
  </li>
<li class="listitem">
      filetype_marker
  </li>
<li class="listitem">
      transferred
  </li>
<li class="listitem">
      size
  </li>
</ul></div>
<div class="refsect3">
<a name="itdb-cp-finalize.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>track</p></td>
<td class="parameter_description"><p>track to update or NULL</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mountpoint</p></td>
<td class="parameter_description"><p>mountpoint of your iPod or NULL</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_filename</p></td>
<td class="parameter_description"><p>the name of the file on the iPod copied to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for a <span class="type">GError</span> or NULL</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-cp-finalize.returns"></a><h4>Returns</h4>
<p> on success a pointer to the <a class="link" href="libgpod-Tracks.html#Itdb-Track" title="struct Itdb_Track"><span class="type">Itdb_Track</span></a> item passed
or a new <a class="link" href="libgpod-Tracks.html#Itdb-Track" title="struct Itdb_Track"><span class="type">Itdb_Track</span></a> item if <em class="parameter"><code>track</code></em>
was NULL. In the latter case
you must free the memory using <a class="link" href="libgpod-Tracks.html#itdb-track-free" title="itdb_track_free ()"><code class="function">itdb_track_free()</code></a> when the item is
no longer used. If an error occurs NULL is returned and <em class="parameter"><code>error</code></em>
is
set accordingly. Errors occur when <em class="parameter"><code>dest_filename</code></em>
cannot be
accessed or the mountpoint is not set.</p>
</div>
<p class="since">Since: 0.5.0</p>
</div>
<hr>
<div class="refsect2">
<a name="itdb-parse-file"></a><h3>itdb_parse_file ()</h3>
<pre class="programlisting"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB" title="struct Itdb_iTunesDB"><span class="returnvalue">Itdb_iTunesDB</span></a> *
itdb_parse_file (<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>,
                 <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Same as <code class="function">itunesdb_parse()</code>, but filename is specified directly.</p>
<div class="refsect3">
<a name="itdb-parse-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>path to a file in iTunesDB format</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for a <span class="type">GError</span> or NULL</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-parse-file.returns"></a><h4>Returns</h4>
<p> a newly allocated <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB" title="struct Itdb_iTunesDB"><span class="type">Itdb_iTunesDB</span></a> struct holding the tracks and
the playlists present in <em class="parameter"><code>filename</code></em>
, NULL if <em class="parameter"><code>filename</code></em>
isn't a parsable
iTunesDB file. If non-NULL, the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB" title="struct Itdb_iTunesDB"><span class="type">Itdb_iTunesDB</span></a> is to be freed with
<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free" title="itdb_free ()"><code class="function">itdb_free()</code></a> when it's no longer needed</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="itdb-write-file"></a><h3>itdb_write_file ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
itdb_write_file (<em class="parameter"><code><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB" title="struct Itdb_iTunesDB"><span class="type">Itdb_iTunesDB</span></a> *itdb</code></em>,
                 <em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>,
                 <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Write the content of <em class="parameter"><code>itdb</code></em>
 to <em class="parameter"><code>filename</code></em>
. If <em class="parameter"><code>filename</code></em>
 is NULL, it attempts
to write to <em class="parameter"><code>itdb-&gt;filename</code></em>
.</p>
<div class="refsect3">
<a name="itdb-write-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>itdb</p></td>
<td class="parameter_description"><p>the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB" title="struct Itdb_iTunesDB"><span class="type">Itdb_iTunesDB</span></a> to save</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>filename to save <em class="parameter"><code>itdb</code></em>
to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for a <span class="type">GError</span> or NULL</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-write-file.returns"></a><h4>Returns</h4>
<p> TRUE if all went well, FALSE otherwise</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="itdb-shuffle-write"></a><h3>itdb_shuffle_write ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
itdb_shuffle_write (<em class="parameter"><code><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB" title="struct Itdb_iTunesDB"><span class="type">Itdb_iTunesDB</span></a> *itdb</code></em>,
                    <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Write out an iTunesSD for the Shuffle.</p>
<p>First reassigns unique IDs to all tracks.  An existing "Play
Counts" file is renamed to "Play Counts.bak" if the export was
successful.  An existing "OTGPlaylistInfo" file is removed if the
export was successful.  <em class="parameter"><code>itdb-&gt;mountpoint</code></em>
 must point to the mount
point of the iPod, e.g. "/mnt/ipod" and be in local encoding.</p>
<div class="refsect3">
<a name="itdb-shuffle-write.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>itdb</p></td>
<td class="parameter_description"><p>the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB" title="struct Itdb_iTunesDB"><span class="type">Itdb_iTunesDB</span></a> to write to disk</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for a <span class="type">GError</span> or NULL</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-shuffle-write.returns"></a><h4>Returns</h4>
<p> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em>
is
set accordingly.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="itdb-shuffle-write-file"></a><h3>itdb_shuffle_write_file ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
itdb_shuffle_write_file (<em class="parameter"><code><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB" title="struct Itdb_iTunesDB"><span class="type">Itdb_iTunesDB</span></a> *itdb</code></em>,
                         <em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>,
                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Do the actual writing to the iTunesSD</p>
<div class="refsect3">
<a name="itdb-shuffle-write-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>itdb</p></td>
<td class="parameter_description"><p>the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB" title="struct Itdb_iTunesDB"><span class="type">Itdb_iTunesDB</span></a> to write to disk</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>file to write to, cannot be NULL</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for a <span class="type">GError</span> or NULL</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-shuffle-write-file.returns"></a><h4>Returns</h4>
<p> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em>
is
set accordingly.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="itdb-duplicate"></a><h3>itdb_duplicate ()</h3>
<pre class="programlisting"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB" title="struct Itdb_iTunesDB"><span class="returnvalue">Itdb_iTunesDB</span></a> *
itdb_duplicate (<em class="parameter"><code><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB" title="struct Itdb_iTunesDB"><span class="type">Itdb_iTunesDB</span></a> *itdb</code></em>);</pre>
<p>Duplicate <em class="parameter"><code>itdb</code></em>
 
FIXME: not implemented yet</p>
<div class="refsect3">
<a name="itdb-duplicate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>itdb</p></td>
<td class="parameter_description"><p>an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB" title="struct Itdb_iTunesDB"><span class="type">Itdb_iTunesDB</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="itdb-duplicate.returns"></a><h4>Returns</h4>
<p> always return NULL since it's unimplemented</p>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>