From: <ny...@us...> - 2006-03-18 03:34:19
|
Revision: 4 Author: nyaochi Date: 2006-03-17 19:34:03 -0800 (Fri, 17 Mar 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=4&view=rev Log Message: ----------- - iRiver H10 UMS 5/6GB 2.52 support. - Showing all filenames when obtaining the media information. - Added the field for storing the timestamp when an music file is added. Modified Paths: -------------- trunk/frontend/easypmp/common/database.c trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc trunk/frontend/easypmp/win32gui/preference.h trunk/frontend/easypmp/win32gui/progress_with_caption.h trunk/include/pmp.h trunk/lib/pmp_portalplayer1/hdr_template.h trunk/lib/pmp_portalplayer1/model_iriver_h10.c trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c Modified: trunk/frontend/easypmp/common/database.c =================================================================== --- trunk/frontend/easypmp/common/database.c 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/frontend/easypmp/common/database.c 2006-03-18 03:34:03 UTC (rev 4) @@ -29,6 +29,7 @@ #include <os.h> #include <stdio.h> #include <stdlib.h> +#include <time.h> #include <ucs2char.h> #include <filepath.h> #include <pmp.h> @@ -41,6 +42,11 @@ #define COMP_STR(x, y) ucs2cmp(x, y) #endif +static uint32_t get_current_time() +{ + return (uint32_t)time(NULL); +} + static int comp_filename(const pmp_record_t *x, const pmp_record_t *y) { return COMP_STR(x->filename, y->filename); @@ -99,6 +105,7 @@ pmp_record_t* records = NULL; pmp_record_t* old_records = NULL; uint32_t num_old_records = 0, num_obtained = 0; + uint32_t ts_import = get_current_time(); if (progress(instance, EASYPMPDBP_START, 0, 0, NULL) != 0) { return EASYPMPE_CANCEL; @@ -236,6 +243,7 @@ } else { } record->timestamp = timestamp; + record->ts_import = ts_import; } } if (progress(instance, EASYPMPDBP_GMI | EASYPMPSP_END, num_obtained, 0, NULL) != 0) { Modified: trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc =================================================================== --- trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc 2006-03-18 03:34:03 UTC (rev 4) @@ -42,6 +42,17 @@ #pragma code_page(1252) #endif //_WIN32 +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON "res\\easypmp_win32gui.ico" +IDI_PROCESSING ICON "res\\processing.ico" +IDI_QUEUING ICON "res\\icon1.ico" + #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // @@ -70,17 +81,6 @@ ///////////////////////////////////////////////////////////////////////////// // -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDR_MAINFRAME ICON "res\\easypmp_win32gui.ico" -IDI_PROCESSING ICON "res\\processing.ico" -IDI_QUEUING ICON "res\\icon1.ico" - -///////////////////////////////////////////////////////////////////////////// -// // Dialog // @@ -211,8 +211,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,8,0,2 - PRODUCTVERSION 0,8,0,2 + FILEVERSION 0,9,0,2 + PRODUCTVERSION 0,9,0,2 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -228,12 +228,12 @@ BLOCK "040904b0" BEGIN VALUE "FileDescription", "EasyPMP [Win32 GUI] application" - VALUE "FileVersion", "0, 8, 0, 2" + VALUE "FileVersion", "0, 9, 0, 2" VALUE "InternalName", "easypmp_win32gui" VALUE "LegalCopyright", "Copyright 2005-2006 Nyaochi" VALUE "OriginalFilename", "easypmp_win32gui.exe" VALUE "ProductName", "EasyPMP [Win32 GUI]" - VALUE "ProductVersion", "0, 8, 0, 2" + VALUE "ProductVersion", "0, 9, 0, 2" END END BLOCK "VarFileInfo" Modified: trunk/frontend/easypmp/win32gui/preference.h =================================================================== --- trunk/frontend/easypmp/win32gui/preference.h 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/frontend/easypmp/win32gui/preference.h 2006-03-18 03:34:03 UTC (rev 4) @@ -188,13 +188,22 @@ { USES_CONVERSION; - strPlayerLocation = W2CT(pmp->env.path_to_root); - strPlayerIdentifier = A2CT(pmp->env.id); - strPlayerDescription = A2CT(pmp->env.name); - strPlayerDescription += _T(""); - if (*pmp->env.version) { - strPlayerDescription += _T(" "); - strPlayerDescription += A2CT(pmp->env.version); + if (pmp) { + strPlayerLocation = W2CT(pmp->env.path_to_root); + strPlayerIdentifier = A2CT(pmp->env.id); + strPlayerDescription = A2CT(pmp->env.name); + strPlayerDescription += _T(""); + if (*pmp->env.version) { + strPlayerDescription += _T(" "); + strPlayerDescription += A2CT(pmp->env.version); + } + if (*pmp->env.mode) { + strPlayerDescription += _T(" "); + strPlayerDescription += A2CT(pmp->env.mode); + } + } else { + strPlayerIdentifier = _T(""); + strPlayerDescription = _T(""); } } @@ -214,8 +223,10 @@ setPlayerInformation(pmp); pmp->release(pmp); return TRUE; + } else { + setPlayerInformation(NULL); + return FALSE; } - return FALSE; } int findPlayerLocation(pmphelp_t* pmphelp) Modified: trunk/frontend/easypmp/win32gui/progress_with_caption.h =================================================================== --- trunk/frontend/easypmp/win32gui/progress_with_caption.h 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/frontend/easypmp/win32gui/progress_with_caption.h 2006-03-18 03:34:03 UTC (rev 4) @@ -59,5 +59,6 @@ void SetText(LPCTSTR szText) { m_strText = szText; + InvalidateRect(NULL); } }; Modified: trunk/include/pmp.h =================================================================== --- trunk/include/pmp.h 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/include/pmp.h 2006-03-18 03:34:03 UTC (rev 4) @@ -98,6 +98,7 @@ uint32_t rating; uint32_t play_count; uint32_t recent_play; + uint32_t ts_import; }; typedef struct tag_pmp_record_t pmp_record_t; Modified: trunk/lib/pmp_portalplayer1/hdr_template.h =================================================================== --- trunk/lib/pmp_portalplayer1/hdr_template.h 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/lib/pmp_portalplayer1/hdr_template.h 2006-03-18 03:34:03 UTC (rev 4) @@ -59,7 +59,7 @@ int apply_template(hdr_t* hdr, const hdr_template_t* tmpl); int compare_version(const char *x, const char *y); -int hdr_init_h10_5gb_ums_0205_0251(hdr_t* hdr); +int hdr_init_h10_5gb_ums_0205_0252(hdr_t* hdr); int hdr_init_h10_5gb_mtp_0203_0210(hdr_t* hdr); int hdr_init_h10_5gb_mtp_0251(hdr_t* hdr); int hdr_init_h10_20gb_mtp_0100_0102(hdr_t* hdr); Modified: trunk/lib/pmp_portalplayer1/model_iriver_h10.c =================================================================== --- trunk/lib/pmp_portalplayer1/model_iriver_h10.c 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/lib/pmp_portalplayer1/model_iriver_h10.c 2006-03-18 03:34:03 UTC (rev 4) @@ -272,17 +272,17 @@ {8, 12, 268, 524, 528, 608, 688, 768, 808, 812, 816, 820, 824, 828, 832, 836, 840, 844, 848, 852, 932, 936}; -/********** H10 5GB/6GB UMS firmware 2.05-2.51 **********/ -static hdr_template_t hdrtmpl_h10_5gb_ums_0205_0251 = { +/********** H10 5GB/6GB UMS firmware 2.05-2.52 **********/ +static hdr_template_t hdrtmpl_h10_5gb_ums_0205_0252 = { 0, 0, "System\\DATA\\H10DB.dat", 1, "System\\DATA\\H10DB.hdr", 0x00000428, 0, 0, 22, hdrtmpl_fd_h10_ums, hdrtmpl_max_dat_field_size_h10_ums, 0, 0, {206148, 22, 4000, 1032, 0, iriver_h10_dat_repr, iriver_h10_dat_set, iriver_h10_dat_get}, }; -int hdr_init_h10_5gb_ums_0205_0251(hdr_t* hdr) +int hdr_init_h10_5gb_ums_0205_0252(hdr_t* hdr) { - return apply_template(hdr, &hdrtmpl_h10_5gb_ums_0205_0251); + return apply_template(hdr, &hdrtmpl_h10_5gb_ums_0205_0252); } Modified: trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c =================================================================== --- trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c 2006-03-18 03:34:03 UTC (rev 4) @@ -61,12 +61,12 @@ static const pp1model_descriptor_t g_model_descriptions[] = { { - "iriver_h10_5/6gb_ums_2.04-2.51", "H10 5GB/6GB UMS", + "iriver_h10_5/6gb_ums_2.04-2.52", "H10 5GB/6GB UMS", 5, "UM", - "2.04", "2.51", + "2.04", "2.52", "System\\H10.mi4", "System\\DATA\\H10DB.hdr", "Media\\Music\\", "Media\\Playlist\\", ".plp", - hdr_init_h10_5gb_ums_0205_0251, iriver_h10_parse_model + hdr_init_h10_5gb_ums_0205_0252, iriver_h10_parse_model }, { "iriver_h10pure_5/6gb_ums_2.04-2.51", "H10Pure 5GB/6GB UMS", @@ -74,7 +74,7 @@ "2.04", "2.51", "System\\H10_5GP.mi4", "System\\DATA\\H10DB.hdr", "Media\\Music\\", "Media\\Playlist\\", ".plp", - hdr_init_h10_5gb_ums_0205_0251, iriver_h10_parse_model + hdr_init_h10_5gb_ums_0205_0252, iriver_h10_parse_model }, { "iriver_h10_5/6gb_mtp_2.03-2.10", "H10 5GB/6GB MTP", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |