libvisual  0.5.0
Public Member Functions | Friends | List of all members
LV::SongInfo Class Reference

Song information class. More...

#include <libvisual/lv_songinfo.h>

Public Member Functions

 SongInfo (SongInfoType type)
 
void set_type (SongInfoType type)
 Sets the song information type. More...
 
SongInfoType get_type () const
 
void set_simple_name (std::string const &name)
 Sets a simple song name. More...
 
std::string get_simple_name () const
 Returns the simple song name. More...
 
void set_length (int length)
 Sets the length of a song. More...
 
int get_length () const
 Returns the length of the song. More...
 
void set_elapsed (int elapsed)
 Sets the elapsed time of a song. More...
 
int get_elapsed () const
 
void set_artist (std::string const &artist)
 Sets the artist name. More...
 
std::string get_artist () const
 
void set_album (std::string const &album)
 Sets the album name. More...
 
std::string get_album () const
 
void set_song (std::string const &name)
 Sets the song name. More...
 
std::string get_song () const
 
void set_cover (VideoPtr const &cover)
 Sets the cover art. More...
 
VideoPtr get_cover () const
 
void mark ()
 Resets the age timer. More...
 
long get_age ()
 Returns the age of the song. More...
 

Friends

bool operator== (SongInfo const &lhs, SongInfo const &rhs)
 

Detailed Description

Song information class.

Contains information about a song such as artist, album, song, elapsed time and cover art.

Definition at line 68 of file lv_songinfo.h.

Member Function Documentation

long LV::SongInfo::get_age ( )

Returns the age of the song.

Returns
age in seconds

Definition at line 138 of file lv_songinfo.cpp.

int LV::SongInfo::get_length ( ) const

Returns the length of the song.

Returns
length in seconds

Definition at line 57 of file lv_songinfo.cpp.

std::string LV::SongInfo::get_simple_name ( ) const

Returns the simple song name.

Returns
name

Definition at line 77 of file lv_songinfo.cpp.

void LV::SongInfo::mark ( )

Resets the age timer.

Use this to timestamp a song to the current time.

Definition at line 133 of file lv_songinfo.cpp.

void LV::SongInfo::set_album ( std::string const &  album)

Sets the album name.

Note
Advanced interface only
Parameters
albumalbum name to set

Definition at line 92 of file lv_songinfo.cpp.

void LV::SongInfo::set_artist ( std::string const &  artist)

Sets the artist name.

Note
Advanced interface only
Parameters
artistartist name to set

Definition at line 82 of file lv_songinfo.cpp.

void LV::SongInfo::set_cover ( VideoPtr const &  cover)

Sets the cover art.

Note
Advanced interface only
Parameters
coverVisVideo object containing the cover art.
Returns
0 on succes -1 on failure.

Definition at line 112 of file lv_songinfo.cpp.

void LV::SongInfo::set_elapsed ( int  elapsed)

Sets the elapsed time of a song.

Note
Advanced interface only
Parameters
elapsedThe elapsed time in seconds.

Definition at line 62 of file lv_songinfo.cpp.

void LV::SongInfo::set_length ( int  length)

Sets the length of a song.

Note
Advanced interface only
Parameters
lengthlength in seconds

Definition at line 52 of file lv_songinfo.cpp.

void LV::SongInfo::set_simple_name ( std::string const &  name)

Sets a simple song name.

Used when the simple interface is being used to set a song name.

Parameters
nameThe simple song name.

Definition at line 72 of file lv_songinfo.cpp.

void LV::SongInfo::set_song ( std::string const &  name)

Sets the song name.

Note
Advanced interface only
Parameters
namesong name to set

Definition at line 102 of file lv_songinfo.cpp.

void LV::SongInfo::set_type ( SongInfoType  type)

Sets the song information type.

Note
The type determines the set of information supplied by the SongInfo object.
Parameters
typeInterface type that is set against the VisSongInfo.
Returns
0 on succes -1 on failure.

Definition at line 42 of file lv_songinfo.cpp.


The documentation for this class was generated from the following files: