1 #ifndef _MP3BL_CLASS_ID3PARSE_ 2 #define _MP3BL_CLASS_ID3PARSE_ 3 4 #include <stdio.h> 5 #include <stdlib.h> 6 7 struct id3header 8 { 9 char songname[31]; 10 char artist[31]; 11 char type[31]; 12 char year[5]; 13 char etc[31]; 14 unsigned char genre; 15 //A track is the 30th byte in the etc field if the 29th byte is 0. This 16 //conforms to the ID3V1.1 standard. 17 int track; 18 //char genre_txt[41]; 19 }; 20 21 class id3Parse 22 { 23 public: 24 25 id3Parse(const char *filename); 26 ~id3Parse(); 27 28 struct id3header *parseID3(); 29 int writeID3(struct id3header *); 30 31 private: 32 int search_header(FILE *); 33 int appendNewID3Header(FILE *); 34 const char *getGenre(const unsigned char); 35 36 char *flnam; 37 id3header *song; 38 }; 39 40 #endif 41