libsaria: Add accessor functions for Track and Tag classes

I need to get at these variables to add them to a list in the UI
This commit is contained in:
Bryan Schumaker 2011-09-19 19:47:31 -04:00
parent 7bf6f48488
commit 0326b9c7e4
4 changed files with 80 additions and 0 deletions

View File

@ -28,6 +28,13 @@ class TrackTag
TrackTag(const TrackTag &);
TrackTag(string);
~TrackTag();
unsigned int get_track();
string get_title();
string get_lenstr();
string get_artist();
string get_album();
unsigned int get_year();
};
#endif /* LIBSARIA_TAGS_H */

View File

@ -13,6 +13,14 @@ class Track
public:
Track(ino_t, TrackTag *);
~Track();
ino_t get_inode();
unsigned int get_track();
string get_title();
string get_lenstr();
string get_artist();
string get_album();
unsigned int get_year();
};
#endif /* LIBSARIA_TRACK_H */

View File

@ -79,3 +79,33 @@ void TrackTag::make_lenstr()
stream << seconds;
lenstr = stream.str();
}
unsigned int TrackTag::get_track()
{
return track;
}
string TrackTag::get_title()
{
return title;
}
string TrackTag::get_lenstr()
{
return lenstr;
}
string TrackTag::get_artist()
{
return artist;
}
string TrackTag::get_album()
{
return album;
}
unsigned int TrackTag::get_year()
{
return year;
}

View File

@ -11,3 +11,38 @@ Track::Track(ino_t ino, TrackTag *tag)
Track::~Track()
{
}
ino_t Track::get_inode()
{
return inode;
}
unsigned int Track::get_track()
{
return tags->get_track();
}
string Track::get_title()
{
return tags->get_title();
}
string Track::get_lenstr()
{
return tags->get_lenstr();
}
string Track::get_artist()
{
return tags->get_artist();
}
string Track::get_album()
{
return tags->get_album();
}
unsigned int Track::get_year()
{
return tags->get_year();
}