ocarina/include/libsaria/track.h
2011-12-30 19:46:54 -05:00

65 lines
1.1 KiB
C++

#ifndef LIBSARIA_TRACK_H
#define LIBSARIA_TRACK_H
#include <sys/types.h>
/* Set up song id type */
typedef ino_t sid_t;
#include <libsaria/files.h>
#include <string>
using namespace std;
namespace libsaria
{
class Track
{
private:
string filepath;
string title;
string artist;
string album;
string comment;
string genre;
string lenstr;
unsigned int year;
unsigned int track;
int length;
int bitrate;
int sample;
int channels;
sid_t songid;
string *artist_lc;
string *album_lc;
void make_lenstr();
void do_bookkeeping();
public:
Track();
Track(string, sid_t);
Track(InFile &);
~Track();
void save(OutFile &);
void do_cleanup();
string get_filepath();
string get_title();
string get_artist();
string get_album();
string get_comment();
string get_genre();
string get_lenstr();
unsigned int get_year();
unsigned int get_track();
int get_length();
int get_bitrate();
int get_channels();
sid_t get_songid();
bool operator<(Track &);
};
} /* Namespace: libsaria */
#endif /* LIBSARIA_TRACK_H */