PlayerStateCommand

Stores the current player state.

Synopsis:

#include <qplayer/qplayer.h>

namespace QPlayer {

    class PlayerStateCommand : public BaseCommand
    {
        Q_OBJECT

    public:

        explicit PlayerStateCommand();
    
        inline PlayerState result()
        {
            return m_result;
        }
    
        inline void setResult( PlayerState result )
        {
            m_result = result;
        }
    
    signals:

        void complete( PlayerStateCommand *command );
    
        void error( PlayerStateCommand *command );
    
    };

}

Library:

libqplayer

Description:

Stores the current player state. The state information for a player includes its shuffle mode, repeat mode, playback rate, and playback status (e.g., PLAYING, IDLE). No parameters are needed when creating a PlayerState object because this operation isn't specific to a media source or media node.

When the library has finished updating a player's state information, the object emits a complete signal to notify clients that the updated player state can now be read. Clients can then call the result() method to retrieve the state information.

If the getPlayerState() command fails, the object emits an error signal. You can then call errorMessage() to retrieve a QString describing the error.