summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjcsjcs <jcsjcs@f01d2545-417e-4e96-918e-98f8d0dbbcb6>2007-09-04 16:10:05 +0000
committerjcsjcs <jcsjcs@f01d2545-417e-4e96-918e-98f8d0dbbcb6>2007-09-04 16:10:05 +0000
commit18a26a488382f5b633f0bec9742f381ecd6cc9f8 (patch)
treef0254dd89ff01418e0e589ae346587486f81d355
parent8e90c5ceec17b3faef89b9df279a299f4f33132e (diff)
downloadlibgpod-18a26a488382f5b633f0bec9742f381ecd6cc9f8.tar.gz
libgpod-18a26a488382f5b633f0bec9742f381ecd6cc9f8.tar.xz
libgpod-18a26a488382f5b633f0bec9742f381ecd6cc9f8.zip
* itdb_itunesdb.c (itdb_get_control_dir):
added support for iPhones * itdb.h: added ITDB_IPOD_MODEL_IPHONE_1 enum * itdb_device.c: added iPhone description TODO: define artwork definition in itdb_device.c -- currently artwork is not supported. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1690 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r--ChangeLog12
-rw-r--r--docs/reference/tmpl/device.sgml1
-rw-r--r--src/itdb.h3
-rw-r--r--src/itdb_device.c5
-rw-r--r--src/itdb_itunesdb.c3
5 files changed, 21 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a7dc490..d2b908c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2007-09-4 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+ * itdb_itunesdb.c (itdb_get_control_dir):
+ added support for iPhones
+
+ * itdb.h: added ITDB_IPOD_MODEL_IPHONE_1 enum
+
+ * itdb_device.c: added iPhone description
+
+ TODO: define artwork definition in itdb_device.c -- currently
+ artwork is not supported.
+
2007-08-18 Jorg Schuler <jcsjcs at users.sourceforge.net>
* src/db-artwork-writer.c (write_mhod_type_3): don't assume that
diff --git a/docs/reference/tmpl/device.sgml b/docs/reference/tmpl/device.sgml
index 0a0cf82..db6bac7 100644
--- a/docs/reference/tmpl/device.sgml
+++ b/docs/reference/tmpl/device.sgml
@@ -214,6 +214,7 @@ These functions are for reading and setting information about the iPod.
@ITDB_IPOD_MODEL_NANO_BLUE:
@ITDB_IPOD_MODEL_NANO_GREEN:
@ITDB_IPOD_MODEL_NANO_PINK:
+@ITDB_IPOD_MODEL_IPHONE_1:
<!-- ##### STRUCT Itdb_ArtworkFormat ##### -->
<para>
diff --git a/src/itdb.h b/src/itdb.h
index 7451b15..fa3274c 100644
--- a/src/itdb.h
+++ b/src/itdb.h
@@ -107,7 +107,8 @@ typedef enum {
ITDB_IPOD_MODEL_NANO_SILVER,
ITDB_IPOD_MODEL_NANO_BLUE,
ITDB_IPOD_MODEL_NANO_GREEN,
- ITDB_IPOD_MODEL_NANO_PINK
+ ITDB_IPOD_MODEL_NANO_PINK,
+ ITDB_IPOD_MODEL_IPHONE_1
} Itdb_IpodModel;
struct _Itdb_IpodInfo {
diff --git a/src/itdb_device.c b/src/itdb_device.c
index 9af6030..cc78dcf 100644
--- a/src/itdb_device.c
+++ b/src/itdb_device.c
@@ -159,7 +159,8 @@ static const Itdb_IpodInfo ipod_info_table [] = {
* one entry, e.g.:
ModelNumStr: Mmobile1
*/
- {"mobile1", -1, ITDB_IPOD_MODEL_MOBILE_1, ITDB_IPOD_GENERATION_MOBILE},
+ {"mobile1", -1, ITDB_IPOD_MODEL_MOBILE_1, ITDB_IPOD_GENERATION_MOBILE, 6},
+ {"iPhone1", -1, ITDB_IPOD_MODEL_IPHONE_1, ITDB_IPOD_GENERATION_MOBILE, 14},
{NULL, 0, 0, 0, 0}
};
@@ -189,6 +190,7 @@ static const gchar *ipod_model_name_table [] = {
N_("Nano (Blue)"),
N_("Nano (Green)"),
N_("Nano (Pink)"),
+ N_("iPhone (1)"),
NULL
};
@@ -264,6 +266,7 @@ static const Itdb_ArtworkFormat *ipod_artwork_info_table[] = {
ipod_nano_artwork_info, /* Nano (Blue) */
ipod_nano_artwork_info, /* Nano (Green) */
ipod_nano_artwork_info, /* Nano (Pink) */
+ NULL, /* iPhone (1) -- FIXME! */
NULL
};
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index e6160e1..1ed0c1c 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -6012,9 +6012,10 @@ gchar *itdb_get_control_dir (const gchar *mountpoint)
{
gchar *p_ipod[] = {"iPod_Control", NULL};
gchar *p_mobile[] = {"iTunes", "iTunes_Control", NULL};
+ gchar *p_iphone[] = {"iTunes_Control", NULL};
/* Use an array with all possibilities, so further extension will
be easy */
- gchar **paths[] = {p_ipod, p_mobile, NULL};
+ gchar **paths[] = {p_ipod, p_mobile, p_iphone, NULL};
gchar ***ptr;
gchar *result = NULL;