LeechCraft  0.6.70-10870-g558588d6ec
Modular cross-platform feature rich live environment.
audiostructs.h
Go to the documentation of this file.
1 /**********************************************************************
2  * LeechCraft - modular cross-platform feature rich internet client.
3  * Copyright (C) 2006-2014 Georg Rudoy
4  *
5  * Boost Software License - Version 1.0 - August 17th, 2003
6  *
7  * Permission is hereby granted, free of charge, to any person or organization
8  * obtaining a copy of the software and accompanying documentation covered by
9  * this license (the "Software") to use, reproduce, display, distribute,
10  * execute, and transmit the Software, and to prepare derivative works of the
11  * Software, and to permit third-parties to whom the Software is furnished to
12  * do so, all subject to the following:
13  *
14  * The copyright notices in the Software and this entire statement, including
15  * the above license grant, this restriction and the following disclaimer,
16  * must be included in all copies of the Software, in whole or in part, and
17  * all derivative works of the Software, unless such copies or derivative
18  * works are solely in the form of machine-executable object code generated by
19  * a source language processor.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
24  * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
25  * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
26  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27  * DEALINGS IN THE SOFTWARE.
28  **********************************************************************/
29 
30 #pragma once
31 
32 #include <QStringList>
33 #include <QVariantMap>
34 #include <QUrl>
35 
36 namespace Media
37 {
40  struct AudioInfo
41  {
44  QString Artist_;
45 
48  QString Album_;
49 
52  QString Title_;
53 
56  QStringList Genres_;
57 
60  qint32 Length_ = 0;
61 
64  qint32 Year_ = 0;
65 
68  qint32 TrackNumber_ = 0;
69 
76  QVariantMap Other_;
77 
80  inline bool operator== (const AudioInfo& other) const
81  {
82  return Artist_ == other.Artist_ &&
83  Album_ == other.Album_ &&
84  Title_ == other.Title_ &&
85  Genres_ == other.Genres_ &&
86  Length_ == other.Length_ &&
87  Year_ == other.Year_ &&
88  TrackNumber_ == other.TrackNumber_ &&
89  Other_ == other.Other_;
90  }
91 
94  inline bool operator!= (const AudioInfo& other) const
95  {
96  return !(*this == other);
97  }
98  };
99 
102  struct TagInfo
103  {
106  QString Name_;
107  };
108 
112 
115  struct ArtistInfo
116  {
119  QString Name_;
120 
123  QString ShortDesc_;
124 
127  QString FullDesc_;
128 
131  QUrl Image_;
132 
136 
145  QUrl Page_;
146 
150  };
151 
166  {
170 
176 
179  QStringList SimilarTo_;
180  };
181 
185 }
186 
QString Name_
Name of the tag.
Definition: audiostructs.h:106
qint32 Length_
The length of this track in seconds.
Definition: audiostructs.h:60
QList< TagInfo > TagInfos_t
A list of tags.
Definition: audiostructs.h:111
bool operator!=(const AudioInfo &other) const
Returns whether this audio info isn&#39;t equal to another one.
Definition: audiostructs.h:94
Describes a single audio track.
Definition: audiostructs.h:40
QUrl Page_
An URL to a page describing this artist.
Definition: audiostructs.h:145
QString FullDesc_
Full artist description, not including the short description.
Definition: audiostructs.h:127
qint32 Year_
The year of the Album_ this track is on.
Definition: audiostructs.h:64
QString ShortDesc_
Short artist description.
Definition: audiostructs.h:123
Information about a tag like a genre.
Definition: audiostructs.h:102
QVariantMap Other_
Other fields of this audio info.
Definition: audiostructs.h:76
int Similarity_
Similarity in percents.
Definition: audiostructs.h:175
QUrl Image_
An URL of a thumbnail artist image.
Definition: audiostructs.h:131
bool operator==(const AudioInfo &other) const
Returns whether this audio info is equal to another one.
Definition: audiostructs.h:80
qint32 TrackNumber_
The number of this track on the Album_.
Definition: audiostructs.h:68
QStringList SimilarTo_
Names of the artists similar to this one.
Definition: audiostructs.h:179
A structure describing an artist.
Definition: audiostructs.h:115
QString Title_
The title of this track.
Definition: audiostructs.h:52
Q_DECLARE_METATYPE(QVariantList *)
QList< SimilarityInfo > SimilarityInfos_t
A list of SimilarityInfo structures.
Definition: audiostructs.h:184
QString Artist_
The artist performing this track.
Definition: audiostructs.h:44
TagInfos_t Tags_
Genres this artist plays in.
Definition: audiostructs.h:149
Describes similarty information of an artist.
Definition: audiostructs.h:165
QUrl LargeImage_
A bigger artist image.
Definition: audiostructs.h:135
QString Name_
The artist name.
Definition: audiostructs.h:119
QString Album_
The album this track is on.
Definition: audiostructs.h:48
ArtistInfo Artist_
Information about artist this similary info is about.
Definition: audiostructs.h:169
QStringList Genres_
The genres of this track.
Definition: audiostructs.h:56