|
Freya
0.0.1
A Gtk3 MPD Client
|
A wrapper for mpd_song. More...
#include <Song.hh>
Public Member Functions | |
| Song (const mpd_song &song) | |
| You are not supposed to instance this yourself. | |
| Song (const MPD::Song &other) | |
| Copy Ctor. | |
| ~Song () | |
| const char * | get_path () |
| The path of the song in the DB. | |
| const char * | get_tag (enum mpd_tag_type type, unsigned idx=0) |
| Get a certain tag from the song. | |
| Glib::ustring | song_format (const char *format, bool markup=true) |
| Formats the data of the song into a string. | |
| unsigned | get_duration () |
| Get duratin of song in seconds. | |
| time_t | get_last_modified () |
| Get seconds since last modifieGet seconds since last modifieff. | |
| void | set_pos (unsigned pos) |
| Set the position in the queue. | |
| unsigned | get_pos () |
| Get the position of the Song in the Queue. | |
| unsigned | get_id () |
| Get Database ID of the Song. | |
| MPD::Song::Song | ( | const mpd_song & | song | ) |
You are not supposed to instance this yourself.
| song |
| MPD::Song::Song | ( | const MPD::Song & | other | ) |
Copy Ctor.
| other |
| MPD::Song::~Song | ( | ) |
| unsigned MPD::Song::get_duration | ( | ) |
Get duratin of song in seconds.
| unsigned MPD::Song::get_id | ( | ) |
Get Database ID of the Song.
| time_t MPD::Song::get_last_modified | ( | ) |
Get seconds since last modifieGet seconds since last modifieff.
| const char* MPD::Song::get_path | ( | ) | [virtual] |
| unsigned MPD::Song::get_pos | ( | ) |
Get the position of the Song in the Queue.
| const char* MPD::Song::get_tag | ( | enum mpd_tag_type | type, |
| unsigned | idx = 0 |
||
| ) |
Get a certain tag from the song.
use song_format() if you just want a easy way to convert a MPD::Song to a nice string.
| type | The typ of the tag |
| idx | some tags might have more than values, use this to index it, starting with 0 |
| void MPD::Song::set_pos | ( | unsigned | pos | ) |
Set the position in the queue.
This is not a client command, and it is not used in Freya.
| pos | the new pos |
| Glib::ustring MPD::Song::song_format | ( | const char * | format, |
| bool | markup = true |
||
| ) |
Formats the data of the song into a string.
You can use the following formatting strings inside format
Each of these values should be placed inside ${fill_tagtype_in_here}, If the tagtype is not known, it gets not escaped, if the tag is empty, it is escaped with "unknown".
If markup ist set the string gets already markup'd for use in Gtk Widgets.
| format | The format prototype |
| markup | if markup should be done (see Glib::Markup::escape()) |
1.8.0