From: <ny...@us...> - 2007-01-12 18:07:32
|
Revision: 263 http://svn.sourceforge.net/pmplib/?rev=263&view=rev Author: nyaochi Date: 2007-01-12 10:07:26 -0800 (Fri, 12 Jan 2007) Log Message: ----------- Add pmp_device_description_t::manufacturer field. Modified Paths: -------------- trunk/pmplib/frontend/easypmp/cui/device.c trunk/pmplib/include/pmp.h trunk/pmplib/lib/pmp_iriverplus2/pmp_iriverplus2.c trunk/pmplib/lib/pmp_iriverplus3/pmp_iriverplus3.c trunk/pmplib/lib/pmp_irivnavi/pmp_irivnavi.c trunk/pmplib/lib/pmp_portalplayer1/pmp_portalplayer1.c Modified: trunk/pmplib/frontend/easypmp/cui/device.c =================================================================== --- trunk/pmplib/frontend/easypmp/cui/device.c 2007-01-12 17:43:13 UTC (rev 262) +++ trunk/pmplib/frontend/easypmp/cui/device.c 2007-01-12 18:07:26 UTC (rev 263) @@ -60,6 +60,7 @@ void device_show_information(pmp_t* pmp, FILE *fp) { fprintf(fp, "Device identifier: %s\n", pmp->decl.id); + fprintf(fp, " Manufacturer: %s\n", pmp->decl.manufacturer); fprintf(fp, " Product name: %s\n", pmp->decl.name); fprintf(fp, " Firmware mode: %s\n", pmp->decl.mode); fprintf(fp, " Firmware version: %s\n", pmp->decl.version); Modified: trunk/pmplib/include/pmp.h =================================================================== --- trunk/pmplib/include/pmp.h 2007-01-12 17:43:13 UTC (rev 262) +++ trunk/pmplib/include/pmp.h 2007-01-12 18:07:26 UTC (rev 263) @@ -126,14 +126,31 @@ ucs2char_t path[MAX_PATH]; } pmp_pathenv_t; +enum { + PMP_DECLSIZE = 128, +}; + +/** + * PMP device decription. + * This structure stores information about a PMP device. + */ typedef struct { - char id[128]; /**< Device identifier. */ - char name[128]; /**< Device name. */ - char mode[128]; /**< Firmware mode. */ - char language[128]; /**< Firmware language. */ - char version[128]; /**< Firmware version. */ - char min_version[128]; /**< Minimum firmware version. */ - char max_version[128]; /**< Maximum firmware version. */ + /** Device identifier (e.g., "iriver_e10_ums_1.00-1.04"). */ + char id[PMP_DECLSIZE]; + /** Manufacturer (e.g., "iriver"). */ + char manufacturer[PMP_DECLSIZE]; + /** Model name (e.g., "E10"). */ + char name[PMP_DECLSIZE]; + /** Firmware mode (e.g., "UM"). */ + char mode[PMP_DECLSIZE]; + /** Firmware default language (e.g., "JP"). */ + char language[PMP_DECLSIZE]; + /** Firmware version (e.g., "1.4"). */ + char version[PMP_DECLSIZE]; + /** Minimum firmware version (e.g., "1.0"). */ + char min_version[PMP_DECLSIZE]; + /** Maximum firmware version (e.g., "1.4"). */ + char max_version[PMP_DECLSIZE]; } pmp_device_description_t; typedef struct { Modified: trunk/pmplib/lib/pmp_iriverplus2/pmp_iriverplus2.c =================================================================== --- trunk/pmplib/lib/pmp_iriverplus2/pmp_iriverplus2.c 2007-01-12 17:43:13 UTC (rev 262) +++ trunk/pmplib/lib/pmp_iriverplus2/pmp_iriverplus2.c 2007-01-12 18:07:26 UTC (rev 263) @@ -46,6 +46,7 @@ typedef struct { const char *id; + const char *manufacturer; const char *name; const char *mode; const char *min_version; @@ -60,21 +61,21 @@ static const ip2model_descriptor_t g_model_descriptions[] = { { - "iriver_h10jr_ums_1.00-1.61", "H10Jr UMS", "UM", + "iriver_h10jr_ums_1.00-1.61", "iriver", "H10Jr UMS", "UM", "1.00", "1.61", "System\\H10_Jr.SYS", "System\\H10_Jr.DAT", "System\\H10_Jr.IDX", "Music\\", "Playlists\\", ".plp", }, { - "iriver_u10_ums_1.00-1.65", "U10 UMS", "UM", + "iriver_u10_ums_1.00-1.65", "iriver", "U10 UMS", "UM", "1.00", "1.65", "System\\U10.SYS", "System\\U10.dat", "System\\U10.idx", "Music\\", "Playlists\\", ".plp", }, { - NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -346,6 +347,7 @@ // Initialize the (exportable) env. strcpy(pmp->decl.id, md->id); + strcpy(pmp->decl.manufacturer, md->manufacturer); strcpy(pmp->decl.name, md->name); strcpy(pmp->decl.mode, md->mode); strcpy(pmp->decl.language, pmpi->env.language); Modified: trunk/pmplib/lib/pmp_iriverplus3/pmp_iriverplus3.c =================================================================== --- trunk/pmplib/lib/pmp_iriverplus3/pmp_iriverplus3.c 2007-01-12 17:43:13 UTC (rev 262) +++ trunk/pmplib/lib/pmp_iriverplus3/pmp_iriverplus3.c 2007-01-12 18:07:26 UTC (rev 263) @@ -47,6 +47,7 @@ typedef struct { const char *id; + const char *manufacturer; const char *name; const char *mode; const char *min_version; @@ -62,14 +63,14 @@ static const ip3model_descriptor_t g_model_descriptions[] = { { - "iriver_e10_ums_1.00-1.04", "E10 UMS", "UM", + "iriver_e10_ums_1.00-1.04", "iriver", "E10 UMS", "UM", "1.00", "1.04", "System\\E10.SYS", "System\\db.dat", "System\\db.dic", "System\\db.idx", "", "Playlists\\", ".plp", }, { - NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -357,6 +358,7 @@ // Initialize the (exportable) env. strcpy(pmp->decl.id, md->id); + strcpy(pmp->decl.manufacturer, md->manufacturer); strcpy(pmp->decl.name, md->name); strcpy(pmp->decl.mode, md->mode); strcpy(pmp->decl.language, pmpi->env.language); Modified: trunk/pmplib/lib/pmp_irivnavi/pmp_irivnavi.c =================================================================== --- trunk/pmplib/lib/pmp_irivnavi/pmp_irivnavi.c 2007-01-12 17:43:13 UTC (rev 262) +++ trunk/pmplib/lib/pmp_irivnavi/pmp_irivnavi.c 2007-01-12 18:07:26 UTC (rev 263) @@ -198,11 +198,13 @@ switch (model) { case MODEL_IRIVER_H100: strcpy(pmp->decl.id, MODELID_H100); - strcpy(pmp->decl.name, "iRiver H100 series"); + strcpy(pmp->decl.manufacturer, "iriver"); + strcpy(pmp->decl.name, "H100 series"); break; case MODEL_IRIVER_H300: strcpy(pmp->decl.id, MODELID_H300); - strcpy(pmp->decl.name, "iRiver H300 series"); + strcpy(pmp->decl.manufacturer, "iriver"); + strcpy(pmp->decl.name, "H300 series"); break; } strcpy(pmp->decl.mode, "UM"); Modified: trunk/pmplib/lib/pmp_portalplayer1/pmp_portalplayer1.c =================================================================== --- trunk/pmplib/lib/pmp_portalplayer1/pmp_portalplayer1.c 2007-01-12 17:43:13 UTC (rev 262) +++ trunk/pmplib/lib/pmp_portalplayer1/pmp_portalplayer1.c 2007-01-12 18:07:26 UTC (rev 263) @@ -47,6 +47,7 @@ typedef struct { const char *id; + const char *manufacturer; const char *name; uint32_t capacity; const char *mode; @@ -63,7 +64,7 @@ static const pp1model_descriptor_t g_model_descriptions[] = { { - "iriver_h10_5/6gb_ums_2.04-2.53", "H10 5GB/6GB UMS", + "iriver_h10_5/6gb_ums_2.04-2.53", "iriver", "H10 5GB/6GB UMS", 5, "UM", "2.04", "2.53", "System\\H10.mi4", "System\\DATA\\H10DB.hdr", "Media\\Music\\", "Media\\Playlist\\", @@ -71,7 +72,7 @@ hdr_init_h10_5gb_ums_0205_0253, iriver_h10_parse_model }, { - "iriver_h10pure_5/6gb_ums_2.04-2.51", "H10Pure 5GB/6GB UMS", + "iriver_h10pure_5/6gb_ums_2.04-2.51", "iriver", "H10Pure 5GB/6GB UMS", 5, "UM", "2.04", "2.51", "System\\H10_5GP.mi4", "System\\DATA\\H10DB.hdr", "Media\\Music\\", "Media\\Playlist\\", @@ -79,7 +80,7 @@ hdr_init_h10_5gb_ums_0205_0253, iriver_h10_parse_model }, { - "iriver_h10_5/6gb_mtp_2.03-2.10", "H10 5GB/6GB MTP", + "iriver_h10_5/6gb_mtp_2.03-2.10", "iriver", "H10 5GB/6GB MTP", 5, "MT", "2.03", "2.10", "System\\H10.mi4", "System\\DATA\\H10DB.hdr", "Music\\", "Playlists\\", @@ -87,7 +88,7 @@ hdr_init_h10_5gb_mtp_0203_0210, iriver_h10_parse_model }, { - "iriver_h10pure_5/6gb_mtp_2.03-2.10", "H10Pure 5GB/6GB MTP", + "iriver_h10pure_5/6gb_mtp_2.03-2.10", "iriver", "H10Pure 5GB/6GB MTP", 5, "MT", "2.03", "2.10", "System\\H10EMP.mi4", "System\\DATA\\H10DB.hdr", "Music\\", "Playlists\\", @@ -95,7 +96,7 @@ hdr_init_h10_5gb_mtp_0203_0210, iriver_h10_parse_model }, { - "iriver_h10_5/6gb_mtp_2.51", "H10 5GB/6GB MTP", + "iriver_h10_5/6gb_mtp_2.51", "iriver", "H10 5GB/6GB MTP", 5, "MT", "2.51", "2.51", "System\\H10.mi4", "System\\DATA\\H10DB.hdr", "Music\\", "Playlists\\", @@ -103,7 +104,7 @@ hdr_init_h10_5gb_mtp_0251, iriver_h10_parse_model }, { - "iriver_h10pure_5/6gb_mtp_2.51", "H10Pure 5GB/6GB MTP", + "iriver_h10pure_5/6gb_mtp_2.51", "iriver", "H10Pure 5GB/6GB MTP", 5, "MT", "2.51", "2.51", "System\\H10EMP.mi4", "System\\DATA\\H10DB.hdr", "Music\\", "Playlists\\", @@ -111,7 +112,7 @@ hdr_init_h10_5gb_mtp_0251, iriver_h10_parse_model }, { - "iriver_h10_20gb_mtp_1.00-1.02", "H10 20GB MTP", + "iriver_h10_20gb_mtp_1.00-1.02", "iriver", "H10 20GB MTP", 20, "MT", "1.00", "1.02", "System\\H10_20GC.mi4", "System\\DATA\\H10DB.hdr", "Music\\", "Playlists\\", @@ -119,7 +120,7 @@ hdr_init_h10_20gb_mtp_0100_0102, iriver_h10_parse_model }, { - "iriver_h10_20gb_mtp_2.51", "H10 20GB MTP", + "iriver_h10_20gb_mtp_2.51", "iriver", "H10 20GB MTP", 20, "MT", "2.51", "2.51", "System\\H10_20GC.mi4", "System\\DATA\\H10DB.hdr", "Music\\", "Playlists\\", @@ -127,7 +128,7 @@ hdr_init_h10_20gb_mtp_0251, iriver_h10_parse_model }, { - "medion_mdjuke220", "MEDION MDJUKE220", + "medion_mdjuke220", "MEDION", "MDJUKE220", 20, "UM", "1.4.2", "1.4.2", "SYSTEM\\JUKEBOX.mi4", "SYSTEM\\DATA\\PP5000.HDR", "MyJukeBox\\MUSIC\\", "MyJukeBox\\Playlist\\", @@ -135,7 +136,7 @@ hdr_init_medion_mdjuke220, medion_mdjuke220_parse_model }, { - "medion_mdjuke440", "MEDION MDJUKE440", + "medion_mdjuke440", "MEDION", "MDJUKE440", 20, "UM", "1.5.5", "1.5.5", "SYSTEM\\JUKEBOX.mi4", "SYSTEM\\DATA\\PP5000.HDR", "MyJukeBox\\MUSIC\\", "MyJukeBox\\Playlist\\", @@ -143,7 +144,7 @@ hdr_init_medion_mdjuke440, medion_mdjuke220_parse_model }, { - "samsung_yh820", "Samsung YH-820", + "samsung_yh820", "Samsung", "YH-820", 5, "UM", "3.00", "3.00", "SYSTEM\\FW_YH820.mi4", "System\\DATA\\PP5000.HDR", "System\\MUSIC\\", "System\\PLAYLIST\\", @@ -151,7 +152,7 @@ hdr_init_samsung_yh820, samsung_parse_model }, { - "samsung_yh920", "Samsung YH-920", + "samsung_yh920", "Samsung", "YH-920", 20, "UM", "5.15", "5.15", "SYSTEM\\FW_YH920.mi4", "System\\DATA\\PP5000.HDR", "System\\MUSIC\\", "System\\PLAYLIST\\", @@ -159,7 +160,7 @@ hdr_init_samsung_yh920, samsung_parse_model }, { - "samsung_yh925", "Samsung YH-925", + "samsung_yh925", "Samsung", "YH-925", 5, "UM", "1.61", "1.61", "SYSTEM\\FW_YH925.mi4", "System\\DATA\\PP5000.HDR", "System\\MUSIC\\", "System\\PLAYLIST\\", @@ -167,7 +168,7 @@ hdr_init_samsung_yh925, samsung_parse_model }, { - "philips_hdd6320", "Philips HDD6320", + "philips_hdd6320", "Philips", "HDD6320", 20, "UM", "5.40", "5.40", "SYSTEM\\FWImage.ebn", "System\\DATA\\PP5000.HDR", "Music\\", "Playlists\\", @@ -175,7 +176,7 @@ hdr_init_philips_hdd6320, philips_hdd6320_parse_model }, { - "msi_megaplayer540", "MSI MEGA PLAYER 540", + "msi_megaplayer540", "MSI", "MEGA PLAYER 540", 8, "UM", "01.00.16", "01.00.16", "SYSTEM\\PP5020.mi4", "System\\DATA\\PP5000.HDR", "MUSIC\\", "Playlists\\", @@ -184,7 +185,7 @@ }, #if 0 { - "sirius_s50", "Sirius S50", + "sirius_s50", "Sirius", "S50", 1, "UM", "0.00", "0.00", "SYSTEM\\config\\sysinfo.cfg", "SYSTEM\\DB\\SONG\\Xena.HDR", "SYSTEM\\MEDIA\\MP3\\", "SYSTEM\\MEDIA\\PLAYLIST\\", @@ -193,7 +194,7 @@ }, #endif { - NULL, NULL, + NULL, NULL, NULL, 0, NULL, 0, 0, NULL, NULL, NULL, NULL, @@ -411,6 +412,7 @@ // Initialize the device description. strcpy(pmp->decl.id, md->id); + strcpy(pmp->decl.manufacturer, md->manufacturer); strcpy(pmp->decl.name, md->name); strcpy(pmp->decl.mode, md->mode); strcpy(pmp->decl.language, pmpi->env.model.language); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |