/usr/include/echonest/ArtistTypes.h is in libechonest-dev 2.1.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | /****************************************************************************************
* Copyright (c) 2010-2012 Leo Franchi <lfranchi@kde.org> *
* *
* This program is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License as published by the Free Software *
* Foundation; either version 2 of the License, or (at your option) any later *
* version. *
* *
* This program is distributed in the hope that it will be useful, but WITHOUT ANY *
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
* PARTICULAR PURPOSE. See the GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along with *
* this program. If not, see <http://www.gnu.org/licenses/>. *
****************************************************************************************/
#ifndef ECHONEST_ARTISTTYPES_H
#define ECHONEST_ARTISTTYPES_H
#include "echonest_export.h"
#include "Util.h"
#include <QDebug>
#include <QSharedData>
class QDateTime;
class QUrl;
class AudioFileData;
class BiographyData;
class BlogData;
class ArtistImageData;
class ReviewData;
class TermData;
class VideoData;
namespace Echonest{
/**
* A link to an audio file related to an artist on the web.
*/
class ECHONEST_EXPORT AudioFile
{
public:
AudioFile();
AudioFile( const AudioFile& other );
AudioFile& operator=( const AudioFile& artist );
~AudioFile();
/**
* The title of the audio file.
*/
QString title() const;
void setTitle( const QString& title );
/**
* The artist name that this audio file is related to.
*/
QString artist() const;
void setArtist( const QString& );
/**
* The URL pointing to the audio file.
*/
QUrl url() const;
void setUrl( const QUrl& url );
/**
* The length of the referenced audio file.
*/
qreal length() const;
void setLength( qreal length );
/**
* The link to the website where the audio file is from.
*/
QUrl link() const;
void setLink( const QUrl& url );
/**
* The date that this audio was posted.
*/
QDateTime date() const;
void setDate( const QDateTime& );
/**
* The released album name of this audio file.
*/
QString release() const;
void setRelease( const QString& release );
/**
* The unique identifier for this artist audio file.
*/
QByteArray id() const;
void setId( const QByteArray& id );
private:
QSharedDataPointer<AudioFileData> d;
};
/**
* A biography of an artist, including the full text content
* of the biography itself.
*/
class ECHONEST_EXPORT Biography {
public:
Biography();
Biography( const Biography& other );
Biography& operator=( const Biography& biblio );
~Biography();
/**
* The URL to the biography.
*/
QUrl url() const;
void setUrl( const QUrl& url );
/**
* The text contents of the biography. May be very long.
*/
QString text() const;
void setText( const QString& text );
/**
* The site that this biography is from.
*/
QString site() const;
void setSite( const QString& site );
/**
* The license that this biography is licensed under.
*/
License license() const;
void setLicense( const License& license );
private:
QSharedDataPointer<BiographyData> d;
};
/**
* A blog post about a certain artist or track.
*/
class ECHONEST_EXPORT Blog {
public:
Blog();
Blog( const Blog& other );
Blog& operator=( const Blog& other );
~Blog();
/**
* The name of the blog or news article.
*/
QString name() const;
void setName( const QString& name );
/**
* The URL to the blog post or news article.
*/
QUrl url() const;
void setUrl( const QUrl& url );
/**
* The date when the blog post or news article was posted.
*/
QDateTime datePosted() const;
void setDatePosted( const QDateTime& date );
/**
* The date when this blog post or news article was found by The Echo Nest.
*/
QDateTime dateFound() const;
void setDateFound( const QDateTime& date );
/**
* A short summary of the blog or article.
*/
QString summary() const;
void setSummary( const QString& text );
/**
* The unique identifier for this entry.
*/
QByteArray id() const;
void setId( const QByteArray& id );
private:
QSharedDataPointer<BlogData> d;
};
/**
* A news article about an artist.
*/
typedef Blog NewsArticle;
/**
* An image related to an artist.
*/
class ECHONEST_EXPORT ArtistImage {
public:
ArtistImage();
ArtistImage( const ArtistImage& other );
ArtistImage& operator=( const ArtistImage& img );
~ArtistImage();
/**
* The image url.
*/
QUrl url() const;
void setUrl( const QUrl& url );
/**
* The license that governs this image.
*/
License license() const;
void setLicense( const License& license );
private:
QSharedDataPointer<ArtistImageData> d;
};
/**
* A review of an artist, album, or track.
*/
class ECHONEST_EXPORT Review {
public:
Review();
Review( const Review& other );
Review& operator=( const Review& other );
~Review();
/**
* The name of the review site.
*/
QString name() const;
void setName( const QString& name );
/**
* The URL to the review.
*/
QUrl url() const;
void setUrl( const QUrl& url );
/**
* The date when the review was posted.
*/
QDateTime dateReviewed() const;
void setDateReviewed( const QDateTime& date );
/**
* The date when this review was found and indexed by The Echo Nest
*/
QDateTime dateFound() const;
void setDateFound( const QDateTime& date );
/**
* A summary of the review.
*/
QString summary() const;
void setSummary( const QString& text );
/**
* The url to an image associated with the review, if it exists.
*/
QUrl imageUrl() const;
void setImageUrl( const QUrl& imageUrl );
/**
* The album being reviewed if it is an album review, including specific release info, if it exists.
*/
QString release() const;
void setRelease( const QString& release );
/**
* The unique identifier for this entry.
*/
QByteArray id() const;
void setId( const QByteArray& id );
private:
QSharedDataPointer<ReviewData> d;
};
/**
* A term used to describe an artist or track.
*/
class ECHONEST_EXPORT Term {
public:
Term();
Term( const Term& other );
Term& operator=( const Term& img );
~Term();
/**
* The term name.
*/
QString name() const;
void setName( const QString& name );
/**
* The frequency that this term is mentioned in relation to the artist/track.
*/
qreal frequency() const;
void setFrequency( qreal freq );
/**
* The weight that The Echo Nest assigns to this term.
*/
qreal weight() const;
void setWeight( qreal weight );
private:
QSharedDataPointer<TermData> d;
};
/**
* A link to a video related to an artist.
*/
class ECHONEST_EXPORT Video {
public:
Video();
Video( const Video& other );
Video& operator=( const Video& other );
~Video();
/**
* The title of the video
*/
QString title() const;
void setTitle( const QString& title );
/**
* The URL to the title.
*/
QUrl url() const;
void setUrl( const QUrl& url );
/**
* The site that the video is from.
*/
QString site() const;
void setSite( const QString& site );
/**
* The date when this video was found
*/
QDateTime dateFound() const;
void setDateFound( const QDateTime& date );
/**
* The url to an image associated with this video, if it exists.
*/
QUrl imageUrl() const;
void setImageUrl( const QUrl& imageUrl );
/**
* The unique identifier for this video.
*/
QByteArray id() const;
void setId( const QByteArray& id );
private:
QSharedDataPointer<VideoData> d;
};
ECHONEST_EXPORT QDebug operator<<(QDebug d, const Echonest::AudioFile& artist);
ECHONEST_EXPORT QDebug operator<<(QDebug d, const Echonest::Biography& biblio);
ECHONEST_EXPORT QDebug operator<<(QDebug d, const Echonest::Blog& blog);
ECHONEST_EXPORT QDebug operator<<(QDebug d, const Echonest::ArtistImage& img);
ECHONEST_EXPORT QDebug operator<<(QDebug d, const Echonest::Review& review);
ECHONEST_EXPORT QDebug operator<<(QDebug d, const Echonest::Term& term);
ECHONEST_EXPORT QDebug operator<<(QDebug d, const Echonest::Video& video);
typedef QVector< AudioFile > AudioList;
typedef QVector< Biography > BiographyList;
typedef QVector< Blog > BlogList;
typedef QVector< ArtistImage > ArtistImageList;
typedef QVector< NewsArticle > NewsList;
typedef QVector< Review > ReviewList;
typedef QVector< Term > TermList;
typedef QVector< Video > VideoList;
} // namespace
#endif
|