/* $Id$ */ /* * Cantus Tag Editor * Copyright © 2002-2004 by Samuel Abels * Copyright © 2007 by Tim Huetz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see **/ #include #include #include #include #include #if defined( __cplusplus ) extern "C" { #endif #ifndef DLL_H #define DLL_H typedef struct DLL_s { void *prev; void *data; void *next; } DLL; #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #ifndef Tag_def #define Tag_def typedef struct Tag_s { char title[1024]; char artist[1024]; char album[1024]; char year[5]; char comment[1024]; char track[20]; char genre[512]; unsigned int size; short int has_footer; } Tag; typedef struct id3v2Tag_s { /* Header. */ int tag_size; short int unsync; short int has_extheader; short int is_experimental; /* Extheader. */ int extheader_size; int padding_size; short int crc_data_present; char crc_data[4]; /* Frames. */ DLL *frames; } id3v2Tag; typedef struct id3v2Frame_s { unsigned char id[4]; int datasize; short int tagalter; short int filealter; short int readonly; short int compression; short int encryption; short int grouping; char *data; } id3v2Frame; #endif extern int get_id3v2_tag(Tag *tag, const char *filename); extern int set_id3v2_tag(Tag *tag, const char *filename, short int unicode); extern int del_id3v2_tag(char *filename); #if defined( __cplusplus ) } #endif