#ifndef LIBRARIES_ID3TAG_H
#define LIBRARIES_ID3TAG_H


#include <exec/libraries.h>
#include <exec/types.h>


/*
	Diese  Struktur ist lesbar
    
	This structure is read only
*/
struct ID3TagBase
{
	struct Library base;
	STRPTR *genre;
/*
	Blues
	Classic Rock
	
   ****
	
	Euro-House
	Dance Hall
	0
*/

/* id3tag.library v2.4 */

	ULONG buffer;
/*
	Buffer für Schreiben und Entfernen (default 128k)
	Umgebungsvariable id3tag_lib/buffer
	
	buffer for write and remove (default 128k)
	environment variable id3tag_lib/buffer
*/
};


/* Type for ID3Tag_RemoveType() */
 
#define ID3Tag_Remove_T1 0
/*
	entspricht ID3Tag_Remove()
	agree with ID3Tag_Remove()
*/
#define ID3Tag_Remove_T2 1
/*
	V1 wird mir Leerzeichen überschrieben
	V2 wird mit NullBytes überschrieben
	
	V1 overwrite with Space
	V2 overwrite with NULL
*/
 

#define ID3TagMPEGA_VERSION_1 1
#define ID3TagMPEGA_VERSION_2 2
#define ID3TagMPEGA_VERSION_2_5 4

#define ID3TagMPEGA_MODE_STEREO 0
#define ID3TagMPEGA_MODE_JOINSTEREO 1
#define ID3TagMPEGA_MODE_DUALCHANNEL 2
#define ID3TagMPEGA_MODE_SINGLECHANNEL 3

	
#define ID3Tag_Dummy (TAG_USER)
  
#define ID3Tag_Title    (ID3Tag_Dummy+1)
/* STRPTR */
#define ID3Tag_Artist   (ID3Tag_Dummy+2)
/* STRPTR */
#define ID3Tag_Album    (ID3Tag_Dummy+3)
/* STRPTR */
#define ID3Tag_Year     (ID3Tag_Dummy+4)
/* STRPTR */
#define ID3Tag_Comment  (ID3Tag_Dummy+5)
/* STRPTR */
#define ID3Tag_Genre    (ID3Tag_Dummy+6)
/* STRPTR */
#define ID3Tag_Track    (ID3Tag_Dummy+7)
/* LONG */
#define ID3Tag_Comment2 (ID3Tag_Dummy+8)
/* STRPTR  (mehrzeilig) */
#define ID3Tag_Track2   (ID3Tag_Dummy+9)
/* LONG */
 


struct ID3Tag
{
/* ID3Tag */
	UWORD version;
	UWORD revision;
	UWORD revision2;
	
   void *tagdata;

/* Mpeg Audio Info */
	WORD norm;         /* ID3TagMPEGA_VERSION_xxx */
	WORD layer;        /* 1..3 */
	WORD mode;         /* ID3TagMPEGA_MODE_xxx */
	LONG bitrate;      /* in bps */
	WORD vbr;          /* 0 or 1 */
	LONG frequency;    /* in Hz */
	ULONG ms_duration; /* stream duration in second */
	WORD crc;          /* 0 or 1 */
	WORD copyright;    /* 0 or 1 */
	WORD original;     /* 0 or 1 */
	WORD private_bit;  /* 0 or 1 */
	WORD emphasis;     /* 0..3 */
	LONG filesize;     /* in Byte */
								
/* id3tag.library Version 2.1 */
  
	LONG id3tagv2size;  /* Size of ID3Tag Version 2 */
	LONG header;    /* >= id3tagv2size first MPEGAFrame found*/
};

/*
	ErrorID's
*/

 
#define ID3TagErr_NoMpegaFile    1
#define ID3TagErr_NoMemory       2
#define ID3TagErr_ObjectNotFound 3
#define ID3TagErr_ObjectInUse    4
#define ID3TagErr_ReadWrite      5
#define ID3TagErr_WriteProtected 6
#define ID3TagErr_ReadProtected  7
#define ID3TagErr_UnknownTagArg  8
#define ID3TagErr_UnknownRemType 9

#define ID3TagErr_DiskFull           10
#define ID3TagErr_DiskNotValidated   11
#define ID3TagErr_DiskWriteProtected 12
#define ID3TagErr_DeleteProtected    13



 
#endif /* LIBRARIES_ID3TAG_H */

