Sayonara Player
typedefs.h
1/* typedefs.h */
2
3/* Copyright (C) 2011-2020 Michael Lugmair (Lucio Carreras)
4 *
5 * This file is part of sayonara player
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef TYPEDEFS_H
22#define TYPEDEFS_H
23
24#include <cstdint>
25#include "Utils/SetFwd.h"
26#include "Utils/MetaData/MetaDataFwd.h"
27#include <QMetaType>
28
29class QByteArray;
30class QString;
31class QStringList;
32template<typename A, typename B>
33struct QPair;
34template<typename A, typename B>
35class QMap;
36template<typename T>
37class QList;
38
44using IntList = QList<int>;
45using IdList = QList<int>;
46using IdxList = QList<int>;
47using BoolList = QList<bool>;
48using Id = int32_t;
49using ArtistId = Id;
50using AlbumId = Id;
51using TrackID = Id;
54using IdSet = Util::Set<Id>;
55using LibraryId = int8_t;
56using DbId = uint8_t;
57using Byte = uint8_t;
58using Disc = uint8_t;
59using TrackNum = uint16_t;
60using Year = uint16_t;
61using Seconds = int32_t;
62using MilliSeconds = int64_t;
63using MicroSeconds = int64_t;
64using NanoSeconds = int64_t;
65using Bitrate = uint32_t;
66using Filesize = uint64_t;
67
68template<typename K, typename V>
70
71enum class Rating : uint8_t
72{
73 Zero = 0,
74 One = 1,
75 Two = 2,
76 Three = 3,
77 Four = 4,
78 Five = 5,
79 Last = 6
80};
81
82enum class PlayState : unsigned char
83{
84 Playing = 0,
85 Paused,
86 Stopped,
87 FirstStartup
88};
89
90Q_DECLARE_METATYPE(Rating)
91
92#endif
Definition: EngineUtils.h:33
Definition: org_mpris_media_player2_adaptor.h:21
A set structure. Inherited from std::set with some useful methods. For integer and String this set is...
Definition: Set.h:37
Definition: typedefs.h:33