From: <ny...@us...> - 2007-01-16 16:38:31
|
Revision: 264 http://svn.sourceforge.net/pmplib/?rev=264&view=rev Author: nyaochi Date: 2007-01-16 08:38:24 -0800 (Tue, 16 Jan 2007) Log Message: ----------- Rename pmp_environment_t to pmp_device_environment_t Modified Paths: -------------- trunk/pmplib/include/pmp.h trunk/pmplib/lib/pmp/pmp.c 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/include/pmp.h =================================================================== --- trunk/pmplib/include/pmp.h 2007-01-12 18:07:26 UTC (rev 263) +++ trunk/pmplib/include/pmp.h 2007-01-16 16:38:24 UTC (rev 264) @@ -126,16 +126,21 @@ ucs2char_t path[MAX_PATH]; } pmp_pathenv_t; -enum { - PMP_DECLSIZE = 128, -}; +/** Maximum size, in chars, of a device description. */ +#define PMP_DECLSIZE (128) +/** Unavailable field of a device description. */ +#define PMP_DECLUNAVAIL ("***") /** * PMP device decription. - * This structure stores information about a PMP device. + * This structure stores information about a PMP device. An PMP device driver + * should fill these fields properly so that an application can obtain the + * information about the device. An empty value represents the uncertainity + * of the field value at this stage. The value ::PMP_DECLUNAVAIL (\c "***") + * implies the unavailability of the field value for the device. */ typedef struct { - /** Device identifier (e.g., "iriver_e10_ums_1.00-1.04"). */ + /** Device identifier (e.g., "iriver_e10_ums_1.0-1.4"). */ char id[PMP_DECLSIZE]; /** Manufacturer (e.g., "iriver"). */ char manufacturer[PMP_DECLSIZE]; @@ -153,13 +158,17 @@ char max_version[PMP_DECLSIZE]; } pmp_device_description_t; +/** + * PMP device environment. + * This structure stores + */ typedef struct { pmp_pathenv_t path_to_root; /**< Path to the root directory */ pmp_pathenv_t path_to_music; /**< Path to the music files */ pmp_pathenv_t path_to_playlist; /**< Path to the playlist files */ pmp_pathenv_t path_to_photo; /**< Path to the photo files */ ucs2char_t playlist_ext[MAX_PATH]; -} pmp_environment_t; +} pmp_device_environment_t; @@ -202,7 +211,7 @@ /** * Portable media device environment. */ - pmp_environment_t env; + pmp_device_environment_t env; /** * The pointer to pmp_music_t interface. @@ -294,7 +303,7 @@ PMPAPI result_t pmp_record_copy(pmp_music_record_t* dst, const pmp_music_record_t* src); PMPAPI uint32_t pmp_interlocked_increment(uint32_t* count); PMPAPI uint32_t pmp_interlocked_decrement(uint32_t* count); -PMPAPI void pmp_copy_environment(pmp_environment_t* dst, const pmp_environment_t* src); +PMPAPI void pmp_copy_environment(pmp_device_environment_t* dst, const pmp_device_environment_t* src); Modified: trunk/pmplib/lib/pmp/pmp.c =================================================================== --- trunk/pmplib/lib/pmp/pmp.c 2007-01-12 18:07:26 UTC (rev 263) +++ trunk/pmplib/lib/pmp/pmp.c 2007-01-16 16:38:24 UTC (rev 264) @@ -63,7 +63,7 @@ return 0; } -void pmp_copy_environment(pmp_environment_t* dst, const pmp_environment_t* src) +void pmp_copy_environment(pmp_device_environment_t* dst, const pmp_device_environment_t* src) { memcpy(dst, src, sizeof(*src)); } Modified: trunk/pmplib/lib/pmp_iriverplus2/pmp_iriverplus2.c =================================================================== --- trunk/pmplib/lib/pmp_iriverplus2/pmp_iriverplus2.c 2007-01-12 18:07:26 UTC (rev 263) +++ trunk/pmplib/lib/pmp_iriverplus2/pmp_iriverplus2.c 2007-01-16 16:38:24 UTC (rev 264) @@ -298,7 +298,7 @@ pmp_internal_t* pmpi = NULL; const ip2model_descriptor_t* md = NULL; ip2_environment_t env; - pmp_environment_t* pmpenv = NULL; + pmp_device_environment_t* pmpenv = NULL; *ptr_pmp = 0; Modified: trunk/pmplib/lib/pmp_iriverplus3/pmp_iriverplus3.c =================================================================== --- trunk/pmplib/lib/pmp_iriverplus3/pmp_iriverplus3.c 2007-01-12 18:07:26 UTC (rev 263) +++ trunk/pmplib/lib/pmp_iriverplus3/pmp_iriverplus3.c 2007-01-16 16:38:24 UTC (rev 264) @@ -309,7 +309,7 @@ pmp_internal_t* pmpi = NULL; const ip3model_descriptor_t* md = NULL; ip3_environment_t env; - pmp_environment_t* pmpenv = NULL; + pmp_device_environment_t* pmpenv = NULL; *ptr_pmp = 0; Modified: trunk/pmplib/lib/pmp_irivnavi/pmp_irivnavi.c =================================================================== --- trunk/pmplib/lib/pmp_irivnavi/pmp_irivnavi.c 2007-01-12 18:07:26 UTC (rev 263) +++ trunk/pmplib/lib/pmp_irivnavi/pmp_irivnavi.c 2007-01-16 16:38:24 UTC (rev 264) @@ -128,7 +128,7 @@ result_t ret = 0; pmp_t* pmp = NULL; pmp_internal_t* pmpi = NULL; - pmp_environment_t* pmpenv = NULL; + pmp_device_environment_t* pmpenv = NULL; *ptr_pmp = 0; @@ -208,10 +208,10 @@ break; } strcpy(pmp->decl.mode, "UM"); - strcpy(pmp->decl.language, "N/A"); - strcpy(pmp->decl.version, "Unknown"); - strcpy(pmp->decl.max_version, "N/A"); - strcpy(pmp->decl.min_version, "N/A"); + strcpy(pmp->decl.language, PMP_DECLUNAVAIL); + strcpy(pmp->decl.version, PMP_DECLUNAVAIL); + strcpy(pmp->decl.max_version, PMP_DECLUNAVAIL); + strcpy(pmp->decl.min_version, PMP_DECLUNAVAIL); // Set enviroments. pmpenv = &pmp->env; Modified: trunk/pmplib/lib/pmp_portalplayer1/pmp_portalplayer1.c =================================================================== --- trunk/pmplib/lib/pmp_portalplayer1/pmp_portalplayer1.c 2007-01-12 18:07:26 UTC (rev 263) +++ trunk/pmplib/lib/pmp_portalplayer1/pmp_portalplayer1.c 2007-01-16 16:38:24 UTC (rev 264) @@ -361,7 +361,7 @@ pmp_internal_t* pmpi = NULL; const pp1model_descriptor_t* md = NULL; pp1_environment_t env; - pmp_environment_t* pmpenv = NULL; + pmp_device_environment_t* pmpenv = NULL; // Initialize. *ptr_pmp = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |