LunaSysMgr
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SoundPlayer Class Reference

#include <SoundPlayer.h>

Inheritance diagram for SoundPlayer:
[legend]
Collaboration diagram for SoundPlayer:
[legend]

Public Member Functions

 SoundPlayer ()
 
 ~SoundPlayer ()
 
void play (const std::string &filePath, const std::string &streamClass, bool repeat, int duration)
 
void stop ()
 
bool dead () const
 
 SoundPlayer ()
 
 ~SoundPlayer ()
 
void play (const std::string &filePath, const std::string &streamClass, bool repeat, int duration)
 
void stop ()
 
bool dead () const
 

Static Public Attributes

static int m_numInstances = 0
 

Protected Member Functions

virtual LSPalmService * connectToBus ()
 
virtual void connected ()
 
void currentTimeChanged ()
 
void eosChanged ()
 
void sourceChanged ()
 
void errorChanged ()
 
void extendedErrorChanged ()
 

Detailed Description

Simple media playback class to demonstrate a possible way to connect up to the luna bus and use a MediaPlayer object.

Constructor & Destructor Documentation

SoundPlayer::SoundPlayer ( )

Construct a player to play the media content at the given URI.

Constructor: register proxy listener

SoundPlayer::~SoundPlayer ( )

Destructor: Stop anything we have going & disconnect proxy listener

SoundPlayer::SoundPlayer ( )

Construct a player to play the media content at the given URI.

SoundPlayer::~SoundPlayer ( )

Member Function Documentation

void SoundPlayer::connected ( )
protectedvirtual

This simply loads the media source URI and plays it.

LSPalmService * SoundPlayer::connectToBus ( )
protectedvirtual

LunaConnector callback methods

Connect to mediaserver using lunaservice.

void SoundPlayer::currentTimeChanged ( )
protected

MediaPlayerChangeListener callbacks methods

Playback is moving

bool SoundPlayer::dead ( ) const
inline
bool SoundPlayer::dead ( ) const
inline
void SoundPlayer::eosChanged ( )
protected

The end of the stream has been reached (i.e. we played the entire stream).

void SoundPlayer::errorChanged ( )
protected

Errors occur asynchronously. If an error occurs, this will be called.

void SoundPlayer::extendedErrorChanged ( )
protected

Errors occur asynchronously. If an error occurs, this will be called.

void SoundPlayer::play ( const std::string &  filePath,
const std::string &  streamClass,
bool  repeat,
int  duration 
)
void SoundPlayer::play ( const std::string &  filePath,
const std::string &  streamClass,
bool  repeat,
int  duration 
)

Client request entry point

void SoundPlayer::sourceChanged ( )
protected

The object we are playing was changed.

void SoundPlayer::stop ( )
void SoundPlayer::stop ( )

Client side cancel point. Also used internally.

Member Data Documentation

static int SoundPlayer::m_numInstances = 0
static

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