| Top |
| Itdb_Device * | itdb_device_new () |
| void | itdb_device_free () |
| void | itdb_device_set_mountpoint () |
| gboolean | itdb_device_supports_artwork () |
| gboolean | itdb_device_supports_chapter_image () |
| gboolean | itdb_device_supports_photo () |
| gboolean | itdb_device_supports_podcast () |
| gboolean | itdb_device_supports_video () |
| const Itdb_IpodInfo * | itdb_device_get_ipod_info () |
| const Itdb_IpodInfo * | itdb_info_get_ipod_info_table () |
| const gchar * | itdb_info_get_ipod_generation_string () |
| const gchar * | itdb_info_get_ipod_model_name_string () |
| gboolean | itdb_device_read_sysinfo () |
| gchar * | itdb_device_get_sysinfo () |
| void | itdb_device_set_sysinfo () |
| gboolean | itdb_device_write_sysinfo () |
| Itdb_Device | |
| struct | Itdb_IpodInfo |
| enum | Itdb_IpodGeneration |
| enum | Itdb_IpodModel |
| Itdb_ArtworkFormat |
Itdb_Device *
itdb_device_new (void);
Creates a new Itdb_Device structure
a newly allocated Itdb_Device which must be freed with
itdb_device_free() when no longer needed
Since: 0.4.0
void
itdb_device_free (Itdb_Device *device);
Frees memory used by device
Since: 0.4.0
void itdb_device_set_mountpoint (Itdb_Device *device,const gchar *mp);
Sets the mountpoint of device
to mp
and update the cached device
information (in particular, re-read the SysInfo file)
Calling this function invalidates all the artwork in the
Itdb_iTunesDB database using this Itdb_Device. Trying to access this
artwork will result in memory corruption. It's recommended to use
itdb_set_mountpoint() instead which will clean the invalidated artwork
for you.
Since: 0.4.0
gboolean
itdb_device_supports_artwork (const Itdb_Device *device);
Indicates whether device
can display artwork or not. When dealing
with a non-art capable iPod, no artwork data will be written to the
iPod so you can spare calls to the artwork handling methods.
Since: 0.5.0
gboolean
itdb_device_supports_chapter_image (const Itdb_Device *device);
Indicates whether device
can display chapter images or not.
Since: 0.7.2
gboolean
itdb_device_supports_photo (const Itdb_Device *device);
Indicates whether device
can display photos or not.
Since: 0.5.0
gboolean
itdb_device_supports_podcast (const Itdb_Device *device);
Indicates whether device
can play podcasts or not.
Since: 0.7.2
gboolean
itdb_device_supports_video (const Itdb_Device *device);
Indicates whether device
can play videos or not.
Since: 0.7.0
const Itdb_IpodInfo *
itdb_device_get_ipod_info (const Itdb_Device *device);
Retrieve the Itdb_IpodInfo entry for this iPod
Since: 0.4.0
const Itdb_IpodInfo *
itdb_info_get_ipod_info_table (void);
Return a pointer to the start of valid iPod model descriptions, which is an array of Itdb_IpodInfo entries. This can be useful if you want to build a list of all iPod models known to the current libgpod.
Since: 0.4.0
const gchar *
itdb_info_get_ipod_generation_string (Itdb_IpodGeneration generation);
Return the iPod's generic generation name, like "First Generation", "Mobile Phone"...
Since: 0.4.0
const gchar *
itdb_info_get_ipod_model_name_string (Itdb_IpodModel model);
Return the iPod's generic model name, like "Color", "Nano"...
Since: 0.4.0
gboolean
itdb_device_read_sysinfo (Itdb_Device *device);
Reads the SysInfo file and stores information in device->sysinfo for later use.
Calling this function invalidates all the artwork in the Itdb_iTunesDB database using this Itdb_Device. Trying to access this artwork will result in memory corruption. Directly calling this function shouldn't ever be needed and it will be deprecated soon.
Since: 0.4.0
gchar * itdb_device_get_sysinfo (const Itdb_Device *device,const gchar *field);
Retrieve specified field from the SysInfo file.
the information associated with field
, or NULL if field
couldn't be found. g_free() after use
Since: 0.4.0
void itdb_device_set_sysinfo (Itdb_Device *device,const gchar *field,const gchar *value);
Set specified field. It can later be written to the iPod using
itdb_device_write_sysinfo()
device |
an Itdb_Device |
|
field |
field to set |
|
value |
value to set (or NULL to remove the field). |
Since: 0.4.0
gboolean itdb_device_write_sysinfo (Itdb_Device *device,GError **error);
Fills the SysInfo file with information in device->sysinfo. Note: no directories are created if not already existent.
Since: 0.4.0
typedef struct {
gchar *mountpoint;
gint musicdirs;
guint byte_order;
GHashTable *sysinfo;
SysInfoIpodProperties *sysinfo_extended;
gboolean sysinfo_changed;
gint timezone_shift;
void *iphone_sync_context;
int iphone_sync_nest_level;
} Itdb_Device;
Structure representing an iPod device
The mountpoint of the iPod |
||
The number of /iPod_Control/Music/F.. dirs |
||
G_LITTLE_ENDIAN "regular" endianness G_BIG_ENDIAN "reversed" endianness (e.g. mobile phone iTunesDBs) |
||
A hash with key/value pairs of all entries in Device/SysInfo |
||
The parsed content of SysInfoExtended, which can be NULL |
||
True if the sysinfo hash been changed by the user, false
otherwise. (see |
||
The difference in seconds between the current timezone and UTC |
||
Private data passed as is to libimobiledevice by itdb_start/stop_sync |
||
Nesting count for itdb_start/stop_sync calls itdb_start/stop_sync |
Since: 0.4.0
struct Itdb_IpodInfo {
const gchar *model_number;
const double capacity;
const Itdb_IpodModel ipod_model;
const Itdb_IpodGeneration ipod_generation;
const guint musicdirs;
/* reserved for future use */
const gint32 reserved_int1;
const gint32 reserved_int2;
gconstpointer reserved1;
gconstpointer reserved2;
};
Structure representing information about an iPod
The model number. This is abbreviated. If the first character is not numeric, it is ommited. e.g. "MA350 -> A350", "M9829 -> 9829" |
||
The iPod's capacity in gigabytes |
||
const Itdb_IpodModel |
The iPod model |
|
const Itdb_IpodGeneration |
The iPod generation |
|
The number of music (Fnn) dirs created by iTunes. The exact number seems to be version dependent. Therefore, the numbers here represent a mixture of reported values and common sense. Note: this number does not necessarily represent the number of dirs present on a particular iPod. It is used when setting up a new iPod from scratch. |
||
Reserved for future use |
||
Reserved for future use |
||
Reserved for future use |
||
Reserved for future use |
Since: 0.4.0
iPod generation information
See http://support.apple.com/kb/HT1353 and http://en.wikipedia.org/wiki/IPod for more details.
|
Unknown iPod |
||
|
First Generation iPod |
||
|
Second Generation iPod |
||
|
Third Generation iPod |
||
|
Fourth Generation iPod |
||
|
Photo iPod |
||
|
Mobile iPod |
||
|
First Generation iPod Mini |
||
|
Second Generation iPod Mini |
||
|
First Generation iPod Shuffle |
||
|
Second Generation iPod Shuffle |
||
|
Third Generation iPod Shuffle |
||
|
First Generation iPod Nano |
||
|
Second Generation iPod Nano |
||
|
Third Generation iPod Nano |
||
|
Fourth Generation iPod Nano |
||
|
First Generation iPod Video (aka 5g) |
||
|
Second Generation iPod Video (aka 5.5g) |
||
|
First Generation iPod Classic |
||
|
Second Generation iPod Classic |
||
|
First Generation iPod Touch |
||
|
First Generation iPhone |
||
|
Third Generation iPod Shuffle |
||
|
Second Generation iPod Touch |
||
|
Second Generation iPhone (aka iPhone 3G) |
||
|
Third Generation iPhone (aka iPhone 3GS) |
||
|
Third Generation iPod Classic |
||
|
Fifth Generation iPod Nano (with camera) |
||
|
Third Generation iPod Touch |
||
|
Fourth Generation iPhone |
||
|
Fourth Generation iPod Touch |
||
Since: 0.4.0
iPod model information
|
Invalid model |
||
|
Unknown model |
||
|
Color iPod |
||
|
Color iPod (U2) |
||
|
Regular iPod |
||
|
Regular iPod (U2) |
||
|
iPod Mini |
||
|
iPod Mini (Blue) |
||
|
iPod Mini (Pink) |
||
|
iPod Mini (Green) |
||
|
iPod Mini (Gold) |
||
|
iPod Shuffle |
||
|
iPod Nano (White) |
||
|
iPod Nano (Black) |
||
|
iPod Video (White) |
||
|
iPod Video (Black) |
||
|
Mobile iPod |
||
|
iPod Video (U2) |
||
|
iPod Nano (Silver) |
||
|
iPod Nano (Blue) |
||
|
iPod Nano (Green) |
||
|
iPod Nano (Pink) |
||
|
iPod Nano (Red) |
||
|
iPod Nano (Yellow) |
||
|
iPod Nano (Purple) |
||
|
iPod Nano (Orange) |
||
|
iPhone |
||
|
iPod Shuffle (Silver) |
||
|
iPod Shuffle (Pink) |
||
|
iPod Shuffle (Blue) |
||
|
iPod Shuffle (Green) |
||
|
iPod Shuffle (Orange) |
||
|
iPod Shuffle (Purple) |
||
|
iPod Shuffle (Red) |
||
|
iPod Classic (Silver) |
||
|
iPod Classic (Black) |
||
|
iPod Touch (Silver) |
||
|
iPod Shuffle (Black) |
||
|
iPhone (White) |
||
|
iPhone (Black) |
||
Since: 0.4.0
typedef struct {
gint format_id;
gint width;
gint height;
ItdbThumbFormat format;
gint32 padding;
gboolean crop;
gint rotation;
guchar back_color[4];
gint display_width;
gboolean interlaced;
gint color_adjustment;
gdouble gamma;
gint associated_format;
gint row_bytes_alignment;
} Itdb_ArtworkFormat;
Structure representing the characteristics of the thumbnails to write to a given .ithmb file. The format of the structure is based on the way artwork formats are written to SysInfoExtended.
Unique ID for the format (generally a 4 digit int) |
||
Width of the thumbnail |
||
Height of the thumbnail |
||
Pixel format of the thumbnail (RGB, YUV, ...) |
||
Number of bytes of padding to add after the thumbnail (not found in SysInfoExtended -- added for compatibility with hardcoded artwork formats) |
||
Indicates if the thumbnail is to be cropped |
||
Degrees to rotate the thumbnail |
||
Background color for the thumbnail |
||
Width at which the thumbnail will be displayed (not currently used) |
||
If TRUE, the thumbnails are interlaced (not currently used) |
||
Color adjustment for the thumbnails (not currently used) |
||
Gamma value for the thumbails (not currently used) |
||
Unknown (not currently used) |
||
Specifies the number of bytes a pixel row must be aligned to |