libmp3splt
src/tags_utils.h
00001 /**********************************************************
00002  *
00003  * libmp3splt -- library based on mp3splt,
00004  *               for mp3/ogg splitting without decoding
00005  *
00006  * Copyright (c) 2002-2005 M. Trotta - <mtrotta@users.sourceforge.net>
00007  * Copyright (c) 2005-2011 Alexandru Munteanu - io_fx@yahoo.fr
00008  *
00009  * http://mp3splt.sourceforge.net
00010  *
00011  *********************************************************/
00012 
00013 /**********************************************************
00014  *
00015  * This program is free software; you can redistribute it and/or
00016  * modify it under the terms of the GNU General Public License
00017  * as published by the Free Software Foundation; either version 2
00018  * of the License, or (at your option) any later version.
00019  *
00020  * This program is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023  * GNU General Public License for more details.
00024  *
00025  * You should have received a copy of the GNU General Public License
00026  * along with this program; if not, write to the Free Software
00027  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00028  * 02111-1307,
00029  * USA.
00030  *
00031  *********************************************************/
00032 
00033 #ifndef MP3SPLT_TAGS_UTILS_H
00034 
00035 void splt_tu_free_original_tags(splt_state *state);
00036 void splt_tu_auto_increment_tracknumber(splt_state *state);
00037 int splt_tu_append_original_tags(splt_state *state);
00038 void splt_tu_reset_tags(splt_tags *tags);
00039 splt_tags *splt_tu_new_tags(splt_state *state, int *error);
00040 void splt_tu_free_one_tags(splt_tags **tags);
00041 void splt_tu_free_one_tags_content(splt_tags *tags);
00042 int splt_tu_has_one_tag_set(splt_tags *tags);
00043 void splt_tu_copy_tags(splt_tags *from, splt_tags *to, int *error);
00044 int splt_tu_new_tags_if_necessary(splt_state *state, int index);
00045 int splt_tu_tags_exists(splt_state *state, int index);
00046 int splt_tu_set_tags_field(splt_state *state, int index,
00047     int tags_field, const void *data);
00048 int splt_tu_set_like_x_tags_field(splt_state *state,
00049     int tags_field, const void *data);
00050 int splt_tu_set_original_tags_field(splt_state *state,
00051     int tags_field, const void *data);
00052 splt_tags *splt_tu_get_tags(splt_state *state, int *tags_number);
00053 
00054 int splt_tu_set_tags_in_tags(splt_state *state, int current_tags);
00055 splt_tags *splt_tu_get_tags_at(splt_state *state, int tags_index);
00056 splt_tags splt_tu_get_last_tags(splt_state *state);
00057 void *splt_tu_get_tags_field(splt_state *state, int index, int tags_field);
00058 void splt_tu_free_tags(splt_state *state);
00059 splt_tags *splt_tu_get_tags_like_x(splt_state *state);
00060 splt_tags *splt_tu_get_current_tags(splt_state *state);
00061 void splt_tu_get_original_tags(splt_state *state, int *err);
00062 
00063 char *splt_tu_get_artist_or_performer_ptr(splt_tags *tags);
00064 
00065 int splt_tu_copy_first_common_tags_on_all_tracks(splt_state *state, int tracks);
00066 
00067 int splt_tu_set_field_on_tags(splt_tags *tags, int tags_field, const void *data);
00068 
00069 int splt_tu_append_tags(splt_state *state, 
00070     const char *title, const char *artist,
00071     const char *album, const char *performer,
00072     const char *year, const char *comment,
00073     int track, const char *genre);
00074 
00075 void splt_tu_append_tags_to_state(splt_state *state, splt_tags *tags, 
00076     int append_null_tags, int *error);
00077 
00078 void splt_tu_set_new_tags_where_current_tags_are_null(splt_state *state,
00079     splt_tags *current_tags, splt_tags *new_tags, 
00080     int index, int *error);
00081 
00082 int splt_tu_append_only_non_null_previous_tags(splt_state *state, 
00083     const char *title, const char *artist,
00084     const char *album, const char *performer,
00085     const char *year, const char *comment,
00086     int track, const char *genre);
00087 
00088 #define MP3SPLT_TAGS_UTILS_H
00089 
00090 #endif
00091 
00092