pmp.h File Reference

#include <pmplib/os_types.h>

Go to the source code of this file.

Data Structures

struct  pmp_device_description_t
 PMP device decription. More...
struct  pmp_device_information_t
 PMP device environment. More...
struct  tag_pmp_t
 The root interface for portable media device. More...
struct  tag_pmp_music_record_t
 Structure for a music record. More...
struct  pmp_playlist_t
 Structure for a playlist. More...
struct  tag_pmp_music_t
 Interface for organizing music files. More...

Defines

#define PMPAPI
#define PMPFOURCC(a, b, c, d)   ((uint32_t)(a) << 24 | (uint32_t)(b) << 16 | (uint32_t)(c) << 8 | (uint32_t)(d))
 Macro to define FourCC representations of codecs.
#define PMPCODEC_NONE   PMPFOURCC(' ',' ',' ',' ')
 Unknown codec.
#define PMPCODEC_MPEGLAYER3   PMPFOURCC('M','P','A','3')
 MPEG Audio Layer III.
#define PMPCODEC_WMA   PMPFOURCC('W','M','A',' ')
 Windows Media Audio.
#define PMPCODEC_VORBIS   PMPFOURCC('O','g','g','V')
 Ogg Vorbis.
#define PMPCODEC_WAV   PMPFOURCC('W','A','V','E')
 Microsoft Riff WAVE.
#define PMP_DECLSIZE   (128)
 Maximum size, in chars, of a device description.
#define PMP_DECLUNAVAIL   ("***")
 Unavailable field of a device description.

Typedefs

typedef tag_pmp_t pmp_t
 Synonym of struct tag_pmp_t.
typedef tag_pmp_music_t pmp_music_t
 Synonym of struct tag_pmp_music_t.
typedef tag_pmp_music_record_t pmp_music_record_t
 Synonym of struct tag_pmp_music_record_t.
typedef void(*) pmplib_enumerate_devid_callback_t (void *instance, const char *devid)
 Prototype of a callback function receiving device IDs from pmplib_create().
typedef result_t(*) pmplib_create_t (pmp_t **ptr_pmp, const ucs2char_t *path_to_device, const char *id)
 Query a driver and construct a pmp_t instance.
typedef result_t(*) pmplib_enumerate_devid_t (pmplib_enumerate_devid_callback_t callback, void *instance)
 Enumerate device identifiers supported by the driver module.
typedef tag_pmplib_t pmplib_t
 The structure for the PMPlib Helper API.

Enumerations

enum  {
  PMP_SUCCESS = 0, PMPERR_ERROR = 0x80000000, PMPERR_DEVICENOTFOUND,
  PMPERR_INSUFFICIENTMEMORY, PMPERR_NOTIMPLIMENTED, PMPERR_ENTRYNOTFOUND,
  PMPERR_INCONSISTENCY, PMPERR_OPENFORREAD, PMPERR_OPENFORWRITE,
  PMPERR_READ, PMPERR_WRITE
}
 Status codes. More...
enum  {
  PMPOF_MUSIC_DB_READ = 0x0001, PMPOF_MUSIC_DB_WRITE = 0x0002, PMPOF_MUSIC_PL_READ = 0x0004,
  PMPOF_MUSIC_PL_WRITE = 0x0008
}
 Open flags for portable media device. More...
enum  {
  PMPF_NONE = 0x0000, PMPMF_SUPPORT = 0x0001, PMPMF_RECURSIVE = 0x0002,
  PMPPF_SUPPORT = 0x0010, PMPPF_RECURSIVE = 0x0020
}
 Flags for device functionality. More...

Functions

PMPAPI void pmplib_record_init (pmp_music_record_t *record)
 Initialize pmp_music_record_t structure.
PMPAPI void pmplib_record_finish (pmp_music_record_t *record)
 Uninitialize pmp_music_record_t structure.
PMPAPI result_t pmplib_record_clone (pmp_music_record_t *dst, const pmp_music_record_t *src)
 Clone a pmp_music_record_t record.
PMPAPI void pmplib_records_finish (pmp_music_record_t *records, int num_records)
 Uninitialize an array of pmp_music_record_t records.
PMPAPI result_t pmplib_records_clone (pmp_music_record_t *dst, const pmp_music_record_t *src, int num_records)
 Clone a pmp_music_record_t array.
PMPAPI void pmplib_playlist_init (pmp_playlist_t *playlist)
 Initialize pmp_playlist_t structure.
PMPAPI void pmplib_playlist_finish (pmp_playlist_t *playlist)
 Uninitialize pmp_playlist_t structure.
PMPAPI void pmplib_playlist_clone (pmp_playlist_t *dst, const pmp_playlist_t *src)
 Clone a playlist.
PMPAPI void pmplib_playlists_finish (pmp_playlist_t *playlists, int num_playlists)
 Uninitialize an array of pmp_playlist_t playlists.
PMPAPI void pmplib_playlists_clone (pmp_playlist_t *dst, const pmp_playlist_t *src, int num_playlists)
 Clone a pmp_playlist_t array.
PMPAPI uint32_t pmplib_interlocked_increment (uint32_t *count)
 Increment a variable value and check the resultant value.
PMPAPI uint32_t pmplib_interlocked_decrement (uint32_t *count)
 Decrement a variable value and check the resultant value.
PMPAPI result_t pmplib_init (pmplib_t **ptr_pmplib)
 Initialize the PMPlib helper library.
PMPAPI result_t pmplib_finish (pmplib_t *pmplib)
 Uninitialize the PMPlib helper library.
PMPAPI result_t pmplib_create (pmplib_t *pmplib, pmp_t **ptr_pmp, const ucs2char_t *path_to_device, const char *id)
 Query a driver and create a pmp_t instance.
PMPAPI result_t pmplib_enumerate_devid (pmplib_t *pmplib, pmplib_enumerate_devid_callback_t callback, void *instance)
 Enumerate device identifiers of the installed drivers.


Define Documentation

#define PMPAPI

Definition at line 32 of file pmp.h.