LastFmScrobbler Class Reference

#include <lastfmscrobbler.h>

Inherited by LastFmScrobblerTester.

List of all members.

Public Member Functions

 LastFmScrobbler (const std::string &user, const std::string &pass, bool synchronous)
virtual ~LastFmScrobbler ()
void setCommitOnlyMode (bool enabled)
void startedPlaying (const SubmissionInfo &info)
void finishedPlaying ()
void pausePlaying (bool paused)

Protected Member Functions

 LastFmScrobbler (bool synchronous)

Protected Attributes

time_t m_LastConnectionAttempt
 Last time a connection attempt was made.
time_t m_TrackPlayTime
 The time that the current track has been played, is set on pause.
time_t m_TrackResumeTime
 The time that the current track was resumed after a pause.
utils::Thread m_AuthenticateThread
 Thread handle of authentication thread (protected for testing).
utils::Thread m_SendInfoThread
 Thread handle of sendinfo thread (protected for testing).
utils::Thread m_FinishPlayingThread
 Thread handle of finishPlaying thread (protected for testing).

Detailed Description

The LastFmScrobbler class provides convenient functions to scrobble track to Last.Fm implementing the Last.Fm submission policies.

Constructor & Destructor Documentation

LastFmScrobbler::LastFmScrobbler ( const std::string &  user,
const std::string &  pass,
bool  synchronous 


user user name
pass password for user
synchronous if false all public methods will be executed in a thread and return immediately (prevents long blocking methods in case of network problems)

LastFmScrobbler::~LastFmScrobbler (  )  [virtual]


Member Function Documentation

void LastFmScrobbler::setCommitOnlyMode ( bool  enabled  ) 

When commit only mode is set, now playinginfo is not updated on, tracks will only be commited once they finished playing

enabled set commitOnlyMode to true or false (default = false)

void LastFmScrobbler::startedPlaying ( const SubmissionInfo info  ) 

Indicate that a new track has started playing, the previous track will be submitted (if available) and the new track will be set as Now Playing

info SubmissionInfo object containing information about the new song

void LastFmScrobbler::finishedPlaying (  ) 

Indicate that the current track has stopped playing. The current track will be submitted to

void LastFmScrobbler::pausePlaying ( bool  paused  ) 

Indicate that playback of the current track has been (un)paused

paused true if track is being paused, false if being unpaused

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

Generated on Wed Mar 11 13:18:13 2009 for lastfmlib by  doxygen 1.5.5