| 1 | /* |
| 2 | * BluezQt - Asynchronous BlueZ wrapper library |
| 3 | * |
| 4 | * SPDX-FileCopyrightText: 2015 David Rosca <nowrep@gmail.com> |
| 5 | * |
| 6 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 7 | */ |
| 8 | |
| 9 | #ifndef BLUEZQT_MEDIAPLAYERTRACK_H |
| 10 | #define BLUEZQT_MEDIAPLAYERTRACK_H |
| 11 | |
| 12 | #include <QSharedPointer> |
| 13 | #include <QString> |
| 14 | |
| 15 | #include "bluezqt_export.h" |
| 16 | |
| 17 | namespace BluezQt |
| 18 | { |
| 19 | /*! |
| 20 | * \inmodule BluezQt |
| 21 | * \class BluezQt::MediaPlayerTrack |
| 22 | * \inheaderfile BluezQt/MediaPlayerTrack |
| 23 | * \brief Media player track. |
| 24 | * |
| 25 | * This class represents a track in media player. |
| 26 | */ |
| 27 | class BLUEZQT_EXPORT MediaPlayerTrack |
| 28 | { |
| 29 | public: |
| 30 | /*! |
| 31 | * Creates a new invalid MediaPlayerTrack object. |
| 32 | */ |
| 33 | explicit MediaPlayerTrack(); |
| 34 | |
| 35 | virtual ~MediaPlayerTrack(); |
| 36 | |
| 37 | /*! |
| 38 | * Constructs a new MediaPlayerTrack object from \a other. |
| 39 | */ |
| 40 | MediaPlayerTrack(const MediaPlayerTrack &other); |
| 41 | |
| 42 | /*! |
| 43 | * Copies the MediaPlayerTrack object from \a other. |
| 44 | */ |
| 45 | MediaPlayerTrack &operator=(const MediaPlayerTrack &other); |
| 46 | |
| 47 | /*! |
| 48 | * Returns whether the track is valid. |
| 49 | */ |
| 50 | bool isValid() const; |
| 51 | |
| 52 | /*! |
| 53 | * Returns the track title. |
| 54 | */ |
| 55 | QString title() const; |
| 56 | |
| 57 | /*! |
| 58 | * Returns the track artist. |
| 59 | */ |
| 60 | QString artist() const; |
| 61 | |
| 62 | /*! |
| 63 | * Returns the track album. |
| 64 | */ |
| 65 | QString album() const; |
| 66 | |
| 67 | /*! |
| 68 | * Returns the track genre. |
| 69 | */ |
| 70 | QString genre() const; |
| 71 | |
| 72 | /*! |
| 73 | * Returns the total number of tracks. |
| 74 | */ |
| 75 | quint32 numberOfTracks() const; |
| 76 | |
| 77 | /*! |
| 78 | * Returns the track number. |
| 79 | */ |
| 80 | quint32 trackNumber() const; |
| 81 | |
| 82 | /*! |
| 83 | * Returns the track duration. |
| 84 | */ |
| 85 | quint32 duration() const; |
| 86 | |
| 87 | private: |
| 88 | BLUEZQT_NO_EXPORT explicit MediaPlayerTrack(const QVariantMap &properties); |
| 89 | |
| 90 | QSharedPointer<class MediaPlayerTrackPrivate> d; |
| 91 | |
| 92 | friend class MediaPlayerPrivate; |
| 93 | }; |
| 94 | |
| 95 | } // namespace BluezQt |
| 96 | |
| 97 | Q_DECLARE_METATYPE(BluezQt::MediaPlayerTrack) |
| 98 | |
| 99 | #endif // BLUEZQT_MEDIAPLAYERTRACK_H |
| 100 | |