/**
 * @file
 * $Id$
 * $Revision$
 * $Author$
 * $Date$
 *
 * This file is part of The iWear Framework.
 *
 * The iWear Framework 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 as in version 2 of the License.

 * 
 * The iWear Framework 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
 * The iWear Framework; if not, write to the Free Software Foundation, Inc., 59
 * Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#include<string>

#ifndef LIBID3TAG_ID3TAG_H
#include<id3tag.h>
#endif

using namespace std;

namespace iwear {
namespace utilities {

class Tag {
public:

    /** Creates a new instance of Tag.
     * The constructor reads the information of the file which is
     * passed to it.
     * @param file_name The path to the music file which as an id3 tag.
     */
    Tag(const char* file_name);

    /** Destroys the Tag object.
     */
    ~Tag();

    /** Gets the path to the file which was scaned.
     * @return The files path.
     */
    inline const string& get_filename(){
	return this->filename;
    }

    /** Gets the title of the ID3Tag. 
     * @return The title.
     */
    inline const string& get_title(){
	return this->title;
    }

    /** Gets the artist of the ID3Tag. 
     * @return The artist.
     */
    inline const string& get_artist(){
	return this->artist;
    }

    /** Gets the album of the ID3Tag. 
     * @return The album.
     */
    inline const string& get_album(){
	return this->album;
    }

    /** Gets the year of the ID3Tag. 
     * @return The year.
     */
    inline const string& get_year(){
	return this->year;
    }

    /** Gets the comments of the ID3Tag. 
     * @return The comment.
     */
    inline const string& get_comments(){
	return this->comments;
    }

protected:

private:

    /** The path to the file which was scaned. */
    string filename;

    /** The id3 title. */
    string title;

    /** The id3 artist. */
    string artist;

    /** The id3 album. */
    string album;

    /** The id3 year. */
    string year;

    /** The id3 comments. */
    string comments;

    /** Gets an id3 frame field.  
     * @param tag_pointer The pointer to the id3 tag.
     * @param id3_frame_field The identifiere of the ID3 tag.
     * @return The field content. 
     */
    string get_id3_frame_field(id3_tag* tag_pointer, const char* id3_frame_field);
};

} // utilities
} // iwear

