Stores properties describing a connected media source.
#include <qplayer/types.h>
class MediaSource {
public:
enum Type {
HDD,
USB,
IPOD,
DLNA,
BLUETOOTH,
MTP,
UNKNOWN
};
enum Status {
NOT_READY,
READY,
FIRST_PASS,
SECOND_PASS,
THIRD_PASS
};
enum Capability {
PLAY = (0x00000001),
PAUSE = (0x00000002),
NEXT = (0x00000004),
PREVIOUS = (0x00000008),
SEEK = (0x00000010),
SET_PLAYBACK_RATE = (0x00000020),
SHUFFLE = (0x00000040),
REPEAT_ALL = (0x00000080),
REPEAT_ONE = (0x00000100),
REPEAT_NONE = (0x00000200),
STOP = (0x00000400),
JUMP = (0x00000800),
GET_POSITION = (0x00001000),
METADATA = (0x00010000),
SEARCH = (0x00020000),
BROWSE = (0x00040000),
EXTENDED_METADATA = (0x00080000)
};
int id;
QString uid;
QString name;
QString viewName;
Type type;
Status status;
uint64_t capabilities;
};
Stores properties describing a connected media source. This class defines enumerations that specify the possible values for a media source's hardware type and connection status as well as the flags that represent various media operations. When examining the fields that store these settings in a MediaSource object, your code can compare the field values to specific enumeration constants, making it more readable.