|
/*
** MP3ID3.h
**
** Author: Yubo Dong (yubodong@gmail.com
**
** Copyright (C) 2006 Yubo Dong
**
** This is a wrapper class for libid3tag-0.15.1b.
*/
#pragma once
#include "id3tag.h"
#include "MP3Info.h"
class CMP3ID3
{
private:
struct id3_file* m_pID3File;
struct id3_tag* m_pID3Tag;
ustring m_strMP3File;
public:
CMP3ID3(void);
CMP3ID3(string strgile, bool bReadOnly=true);
~CMP3ID3(void);
public:
bool prepareMP3(string strFile, bool bReadOnly=true);
ustring getTitle(); //Return title
ustring getArtist(); //Return artist
ustring getAlbum(); //Return album
ustring getYear(); //Return recording time
ustring getTrack(); //Return original CD track
ustring getGenre(); //Return genre
ustring getComment(); //Return comment
bool setTitle(ustring,bool bUpdateImmediately = false); //Set title
bool setArtist(ustring,bool bUpdateImmediately = false); //Set artist
bool setAlbum(ustring,bool bUpdateImmediately = false); //Set album
bool setYear(ustring,bool bUpdateImmediately = false); //Set recording time
bool setTrack(ustring,bool bUpdateImmediately = false); //Set original CD track
bool setGenre(ustring,bool bUpdateImmediately = false); //Set genre
bool setComment(ustring,bool bUpdateImmediately = false);//Set comment
bool update();
CMP3Info getMP3Info(); //Return all ID3 tag information in a class CMP3Info
CMP3Info getMP3Info(string strFile, bool bReadOnly=true);
static long getTagLength(string strFile); //get length of id3 tag
private:
ustring getFrame(const char *frameID);
bool setFrame(const char *frameID, ustring strText,bool bUpdateImmediately = false);
};
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.