Artist.h   Artist.h 
skipping to change at line 96 skipping to change at line 96
Reverse, Reverse,
Sort, Sort,
IdSpace IdSpace
}; };
typedef QPair< Echonest::Artist::SearchParam, QVariant > SearchPara mEntry; typedef QPair< Echonest::Artist::SearchParam, QVariant > SearchPara mEntry;
typedef QVector< SearchParamEntry > SearchParams; typedef QVector< SearchParamEntry > SearchParams;
Artist(); Artist();
Artist( const QByteArray& id, const QString& name ); Artist( const QByteArray& id, const QString& name );
explicit Artist( const QString& name ); explicit Artist( const QString& name );
explicit Artist( const QByteArray& id );
Artist( const Artist& other ); Artist( const Artist& other );
Artist& operator=( const Artist& artist ); Artist& operator=( const Artist& artist );
virtual ~Artist(); virtual ~Artist();
void init(); void init();
QByteArray id() const; QByteArray id() const;
void setId( const QByteArray& id ); void setId( const QByteArray& id );
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 Playlist.h   Playlist.h 
skipping to change at line 25 skipping to change at line 25
************************************************************************** **************/ ************************************************************************** **************/
#ifndef ECHONEST_PLAYLIST_H #ifndef ECHONEST_PLAYLIST_H
#define ECHONEST_PLAYLIST_H #define ECHONEST_PLAYLIST_H
#include "echonest_export.h" #include "echonest_export.h"
#include "Song.h" #include "Song.h"
#include <QSharedData> #include <QSharedData>
#include <QDebug> #include <QDebug>
#include "Artist.h"
#include <QtCore/QString>
#include "Catalog.h"
class QNetworkReply; class QNetworkReply;
class DynamicPlaylistData; class DynamicPlaylistData;
namespace Echonest{ namespace Echonest{
typedef struct {
qreal served_time;
QByteArray artist_id;
QByteArray id;
QString artist_name;
QString title;
int rating;
} SessionItem;
typedef struct {
TermList terms;
SongList seed_songs;
// description .. what data is in here?
Artists banned_artists;
QVector< QString > rules;
QByteArray session_id;
Artists seeds;
QVector< SessionItem > skipped_songs;
QVector< SessionItem > banned_songs;
QString playlist_type;
Catalogs seed_catalogs;
QVector< SessionItem > rated_songs;
QVector< SessionItem > history;
} SessionInfo;
/** /**
* This encapsulates an Echo Nest dynamic playlist. It contains a playl ist ID and * This encapsulates an Echo Nest dynamic playlist. It contains a playl ist ID and
* the current song, and can fetch the next song. * the current song, and can fetch the next song.
* *
* See http://developer.echonest.com/docs/v4/playlist.html#dynamic * See http://developer.echonest.com/docs/v4/playlist.html#dynamic
* for more information * for more information
*/ */
class ECHONEST_EXPORT DynamicPlaylist class ECHONEST_EXPORT DynamicPlaylist
{ {
public: public:
/** /**
* The types of playlist that can be generated. Artist plays songs for the given artist, * The types of playlist that can be generated. Artist plays songs for the given artist,
* ArtistRadio takes into account similar artists, adn ArtistDescr iption plays songs matching * ArtistRadio takes into account similar artists, adn ArtistDescr iption plays songs matching
* the given description. * the given description.
*/ */
enum ArtistTypeEnum { enum ArtistTypeEnum {
ArtistType, ArtistType,
ArtistRadioType, ArtistRadioType,
ArtistDescriptionType ArtistDescriptionType,
CatalogType,
CatalogRadioType,
SongRadioType
}; };
/** /**
* Different ways to sort a generated playlist * Different ways to sort a generated playlist
*/ */
enum SortingType { enum SortingType {
SortTempoAscending, SortTempoAscending,
SortTempoDescending, SortTempoDescending,
SortDurationAscending, SortDurationAscending,
SortDurationDescending, SortDurationDescending,
skipping to change at line 106 skipping to change at line 137
* functions. * functions.
*/ */
enum PlaylistParam { enum PlaylistParam {
Type, /// The type of playlist to generate. Value is the Dynami cPlaylist::ArtistTypeEnum enum Type, /// The type of playlist to generate. Value is the Dynami cPlaylist::ArtistTypeEnum enum
Format, /// Either xml (default) or xspf. If the result is xspf , the raw xspf playlist is returned, else the xml is parsed and exposed pro grammatically. If using XSPF, you must specify a catalog, the tracks bucket , and limit = true Format, /// Either xml (default) or xspf. If the result is xspf , the raw xspf playlist is returned, else the xml is parsed and exposed pro grammatically. If using XSPF, you must specify a catalog, the tracks bucket , and limit = true
Pick, /// How the artists are picked for each artist in Artis tType playlists. Value is Playlist::ArtistPick enum value. Pick, /// How the artists are picked for each artist in Artis tType playlists. Value is Playlist::ArtistPick enum value.
Variety, /// 0 < variety < 1 The maximum variety of arti sts to be represented in the playlist. A higher number will allow for more variety in the artists. Variety, /// 0 < variety < 1 The maximum variety of arti sts to be represented in the playlist. A higher number will allow for more variety in the artists.
ArtistId, /// ID(s) of seed artist(s) for the playlist ArtistId, /// ID(s) of seed artist(s) for the playlist
Artist, /// Artist names of seeds for playlist Artist, /// Artist names of seeds for playlist
ArtistSeedCatalog, /// ID of seed artist catalog for the playli st ArtistSeedCatalog, /// ID of seed artist catalog for the playli st
SourceCatalog, /// ID of catalog (artist or song) for catalog t ype playlists
SongId, /// IDs of seed songs for the playlist SongId, /// IDs of seed songs for the playlist
Description, /// Textual description for sort of songs that can be included in the playlist Description, /// Textual description for sort of songs that can be included in the playlist
Results, /// 0-100, how many sonsg to include in the playlist, default 15 Results, /// 0-100, how many sonsg to include in the playlist, default 15
MaxTempo, /// 0.0 < tempo < 500.0 (BPM) The maximum tempo for any included songs MaxTempo, /// 0.0 < tempo < 500.0 (BPM) The maximum tempo for any included songs
MinTempo, /// 0.0 < tempo < 500.0 (BPM) the minimum tempo for any included songs MinTempo, /// 0.0 < tempo < 500.0 (BPM) the minimum tempo for any included songs
MaxDuration, /// 0.0 < duration < 3600.0 (seconds) the ma ximum duration of any song on the playlist MaxDuration, /// 0.0 < duration < 3600.0 (seconds) the ma ximum duration of any song on the playlist
MinDuration, /// 0.0 < duration < 3600.0 (seconds) the mi nimum duration of any song on the playlist MinDuration, /// 0.0 < duration < 3600.0 (seconds) the mi nimum duration of any song on the playlist
MaxLoudness, /// -100.0 < loudness < 100.0 (dB) the maximum lo udness of any song on the playlist MaxLoudness, /// -100.0 < loudness < 100.0 (dB) the maximum lo udness of any song on the playlist
MinLoudness, /// -100.0 < loudness < 100.0 (dB) the minimum lo udness of any song on the playlist MinLoudness, /// -100.0 < loudness < 100.0 (dB) the minimum lo udness of any song on the playlist
MinDanceability, /// 0 < danceability < 1 a measure of the min imum danceability of the song MinDanceability, /// 0 < danceability < 1 a measure of the min imum danceability of the song
skipping to change at line 142 skipping to change at line 174
Sort, /// SortingType enum, the type of sorting to use, Sort, /// SortingType enum, the type of sorting to use,
Limit, /// true, false if true songs will be limited to thos e that appear in the catalog specified by the id: bucket Limit, /// true, false if true songs will be limited to thos e that appear in the catalog specified by the id: bucket
Audio, /// true, false, if true songs will be limited to those that have associated audio Audio, /// true, false, if true songs will be limited to those that have associated audio
DMCA, /// true, false Only valid for dynamic playlists. Sets if playlist will follow DMCA rules (see web api doc for details) DMCA, /// true, false Only valid for dynamic playlists. Sets if playlist will follow DMCA rules (see web api doc for details)
ChainXSPF /// true, false If true, returns an xspf for this dynamic playlist with 2 items. The second item will be a link to the API ca ll for the next track in the chain. Please note that this sidesteps libecho nest's handling of the tracks. ChainXSPF /// true, false If true, returns an xspf for this dynamic playlist with 2 items. The second item will be a link to the API ca ll for the next track in the chain. Please note that this sidesteps libecho nest's handling of the tracks.
}; };
typedef QPair< PlaylistParam, QVariant > PlaylistParamData; typedef QPair< PlaylistParam, QVariant > PlaylistParamData;
typedef QVector< PlaylistParamData > PlaylistParams; typedef QVector< PlaylistParamData > PlaylistParams;
/**
* The various controls for a dynamic playlist.
*
* Please see The Echo Nest API documentation for more information
*/
enum DynamicControlItem {
Steer = 0,
SteerDescription,
Rating,
Ban
};
typedef QPair< DynamicControlItem, QString > DynamicControl;
typedef QVector< DynamicControl > DynamicControls;
DynamicPlaylist(); DynamicPlaylist();
virtual ~DynamicPlaylist(); virtual ~DynamicPlaylist();
DynamicPlaylist( const DynamicPlaylist& other ); DynamicPlaylist( const DynamicPlaylist& other );
DynamicPlaylist& operator=( const DynamicPlaylist& playlist ); DynamicPlaylist& operator=( const DynamicPlaylist& playlist );
/** /**
* Start a dynamic playlist with the given parameters. * Start a dynamic playlist with the given parameters.
* Once the QNetworkReply has finished, pass it to parseStart() * Once the QNetworkReply has finished, pass it to parseStart()
* and the inital song will be populated and returned. The session Id(), currentSong(), * and the inital song will be populated and returned. The session Id(), currentSong(),
* and fetchNextSong() methods will then be useful. * and fetchNextSong() methods will then be useful.
*/ */
QNetworkReply* start( const PlaylistParams& params ); QNetworkReply* start( const PlaylistParams& params ) const;
Song parseStart( QNetworkReply* ) throw( ParseError ); Song parseStart( QNetworkReply* ) throw( ParseError );
/** /**
* The session id of this dynamic playlist. If the playlist has end ed, or has not been started, * The session id of this dynamic playlist. If the playlist has end ed, or has not been started,
* the result is empty. * the result is empty.
* *
*/ */
QByteArray sessionId() const; QByteArray sessionId() const;
void setSessionId( const QByteArray& id ); void setSessionId( const QByteArray& id );
skipping to change at line 181 skipping to change at line 227
/** /**
* Queries The Echo Nest for the next playable song in this * Queries The Echo Nest for the next playable song in this
* dynamic playlist. * dynamic playlist.
* *
* Once the query has emitted the finished() signal, pass it to par seNextSong(), which will * Once the query has emitted the finished() signal, pass it to par seNextSong(), which will
* return the new song to play. It will also set the current song to the newly parsed song. * return the new song to play. It will also set the current song to the newly parsed song.
* *
* If the playlist has no more songs, the returned song object will be have no name nor id. * If the playlist has no more songs, the returned song object will be have no name nor id.
* *
* @param rating The rating for the song that was just played. Rang es from 1 (lowest) to 5 (highest) * @param rating The rating for the song that was just played. Rang es from 1 (lowest) to 5 (highest)
* @param controls The controls to apply when fetching the next tra ck.
* *
*/ */
QNetworkReply* fetchNextSong( int rating = -1); QNetworkReply* fetchNextSong( int rating = -1 ) const;
QNetworkReply* fetchNextSong( const DynamicControls& controls ) con
st;
Song parseNextSong( QNetworkReply* reply ); Song parseNextSong( QNetworkReply* reply );
/** /**
* Returns a description of this dynamic playlist session
*/
QNetworkReply* fetchSessionInfo() const;
SessionInfo parseSessionInfo( QNetworkReply* reply ) throw( ParseEr
ror );;
/**
* Generate a static playlist, according to the desired criteria. U se parseXSPFPlaylist if * Generate a static playlist, according to the desired criteria. U se parseXSPFPlaylist if
* you pass format=xspf to \c staticPlaylist(). * you pass format=xspf to \c staticPlaylist().
*/ */
static QNetworkReply* staticPlaylist( const PlaylistParams& params ); static QNetworkReply* staticPlaylist( const PlaylistParams& params );
static SongList parseStaticPlaylist( QNetworkReply* reply ) throw( ParseError ); static SongList parseStaticPlaylist( QNetworkReply* reply ) throw( ParseError );
/** /**
* Parse an xspf playlist. Returns the full xspf content with no mo difications. * Parse an xspf playlist. Returns the full xspf content with no mo difications.
*/ */
static QByteArray parseXSPFPlaylist( QNetworkReply* reply ) throw( ParseError ); static QByteArray parseXSPFPlaylist( QNetworkReply* reply ) throw( ParseError );
private: private:
static QByteArray playlistParamToString( PlaylistParam param ); static QByteArray playlistParamToString( PlaylistParam param );
static QNetworkReply* generateInternal( const PlaylistParams& param s, const QByteArray& type ); static QNetworkReply* generateInternal( const PlaylistParams& param s, const QByteArray& type );
static QByteArray playlistSortToString(SortingType sorting); static QByteArray playlistSortToString(SortingType sorting);
static QByteArray playlistArtistPickToString(ArtistPick pick); static QByteArray playlistArtistPickToString(ArtistPick pick);
static QByteArray dynamicControlToString(DynamicControlItem control );
QSharedDataPointer<DynamicPlaylistData> d; QSharedDataPointer<DynamicPlaylistData> d;
}; };
ECHONEST_EXPORT QDebug operator<<(QDebug d, const Echonest::DynamicPlay list& playlist); ECHONEST_EXPORT QDebug operator<<(QDebug d, const Echonest::DynamicPlay list& playlist);
}; // namespace }; // namespace
Q_DECLARE_METATYPE( Echonest::DynamicPlaylist ) Q_DECLARE_METATYPE( Echonest::DynamicPlaylist )
 End of changes. 10 change blocks. 
3 lines changed or deleted 60 lines changed or added


 Song.h   Song.h 
skipping to change at line 57 skipping to change at line 57
{ {
public: public:
enum SearchParam { enum SearchParam {
Title, Title,
Artist, Artist,
Combined, Combined,
Description, Description,
ArtistId, ArtistId,
Start,
Results, Results,
MaxTempo, MaxTempo,
MinTempo, MinTempo,
MaxDanceability, MaxDanceability,
MinDanceability, MinDanceability,
MaxComplexity, MaxComplexity,
MinComplexity, MinComplexity,
MaxDuration, MaxDuration,
MinDuration, MinDuration,
MaxLoudness, MaxLoudness,
skipping to change at line 85 skipping to change at line 86
MinEnergy, MinEnergy,
Mode, Mode,
Key, Key,
Sort, Sort,
}; };
typedef QPair< Echonest::Song::SearchParam, QVariant > SearchParamData; typedef QPair< Echonest::Song::SearchParam, QVariant > SearchParamData;
typedef QVector< SearchParamData > SearchParams; typedef QVector< SearchParamData > SearchParams;
Song(); Song();
Song( const QByteArray& id, const QString& title, const QByteArray& artis tId, const QString& artistName ); Song( const QByteArray& id, const QString& title, const QByteArray& artis tId, const QString& artistName );
Song( const QByteArray& id );
Song( const Song& other ); Song( const Song& other );
Song& operator=(const Song& song); Song& operator=(const Song& song);
virtual ~Song(); virtual ~Song();
/** /**
* The following pieces of data are present in all Song objects, and do n ot require * The following pieces of data are present in all Song objects, and do n ot require
* on-demand fetching. * on-demand fetching.
*/ */
QByteArray id() const; QByteArray id() const;
void setId( const QByteArray& id ); void setId( const QByteArray& id );
QString title() const; QString title() const;
void setTitle( const QString& title ); void setTitle( const QString& title );
QString artistName() const; QString artistName() const;
void setArtistName( const QString& artistName ); void setArtistName( const QString& artistName );
QByteArray artistId() const; QByteArray artistId() const;
void setArtistId( const QByteArray& artistId ); void setArtistId( const QByteArray& artistId );
QString release() const;
void setRelease( const QString& release );
/** /**
* The following require fetching from The Echo Nest, so call * The following require fetching from The Echo Nest, so call
* fetchInformation() with the type of data you want first. * fetchInformation() with the type of data you want first.
* *
* If you ask for this information before calling parseInformation() * If you ask for this information before calling parseInformation()
* with the respective data, the result is undefined. * with the respective data, the result is undefined.
*/ */
/** /**
* The full audio summary and analysis of this song. * The full audio summary and analysis of this song.
 End of changes. 3 change blocks. 
0 lines changed or deleted 5 lines changed or added


 Track.h   Track.h 
skipping to change at line 37 skipping to change at line 37
#include <QSharedData> #include <QSharedData>
#include <QUrl> #include <QUrl>
#include "Config.h" #include "Config.h"
class QNetworkReply; class QNetworkReply;
class TrackData; class TrackData;
namespace Echonest namespace Echonest
{ {
class Song;
/** /**
* Upload-based Echo Nest Track API. If you want to search The Echo Nest fo r songs, use the Song API. * Upload-based Echo Nest Track API. If you want to search The Echo Nest fo r songs, use the Song API.
* If you want to upload your own files and retrieve the acoustic informat ion about them, use this Track * If you want to upload your own files and retrieve the acoustic informat ion about them, use this Track
* class. You can also fetch acoustic information from a track if you hav e the Track ID or MD5 of the file. * class. You can also fetch acoustic information from a track if you hav e the Track ID or MD5 of the file.
* *
* A Track encapsulates the audio analysis from The Echo Nest. * A Track encapsulates the audio analysis from The Echo Nest.
* *
* This class is implicitly shared. * This class is implicitly shared.
* *
*/ */
skipping to change at line 141 skipping to change at line 142
QUrl releaseImage() const; QUrl releaseImage() const;
void setReleaseImage( const QUrl& imgUrl ); void setReleaseImage( const QUrl& imgUrl );
/** /**
* The preview url for this track, if it exists * The preview url for this track, if it exists
*/ */
QUrl previewUrl() const; QUrl previewUrl() const;
void setPreviewUrl( const QUrl& preview ); void setPreviewUrl( const QUrl& preview );
/** /**
* The Echo Nest song associated with this track, if it exists
*/
Song song() const;
void setSong( const Song& song );
/**
* The analysis status * The analysis status
*/ */
Analysis::AnalysisStatus status() const; Analysis::AnalysisStatus status() const;
void setStatus( Analysis::AnalysisStatus ); void setStatus( Analysis::AnalysisStatus );
/** /**
* The full audio summary of the track. This contains information about t he track's bars, * The full audio summary of the track. This contains information about t he track's bars,
* beats, sections, and detailed segment information as well as more met adata about the song's * beats, sections, and detailed segment information as well as more met adata about the song's
* acoustic properties. * acoustic properties.
* *
 End of changes. 2 change blocks. 
0 lines changed or deleted 7 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/