/usr/include/echonest/Util.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 | /****************************************************************************************
* 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_UTIL_H
#define ECHONEST_UTIL_H
#include "echonest_export.h"
#include <QDebug>
#include <QVector>
#include <QUrl>
/**
* Some shared declarations
*/
namespace Echonest
{
namespace Analysis
{
enum AnalysisStatus {
Unknown = 0,
Pending = 1,
Complete = 2,
Error = 4
};
}
namespace CatalogTypes
{
enum Type {
Artist = 0,
Song = 1
};
enum Action {
Delete,
Update,
Play,
Skip
};
enum TicketStatus {
Unknown = 0,
Pending = 1,
Complete = 2,
Error = 4
};
}
typedef struct
{
qreal confidence;
qreal duration;
qreal start;
} AudioChunk;
typedef AudioChunk Bar;
typedef AudioChunk Beat;
typedef AudioChunk Section;
typedef AudioChunk Tatum;
typedef struct
{
qreal confidence;
qreal duration;
qreal loudness_max;
qreal loudness_max_time;
qreal loudness_start;
QVector< qreal > pitches;
qreal start;
QVector< qreal > timbre;
} Segment;
typedef QVector< Bar > BarList;
typedef QVector< Beat > BeatList;
typedef QVector< Section > SectionList;
typedef QVector< Tatum > TatumList;
typedef QVector< Segment > SegmentList;
typedef struct {
QUrl url;
QString attribution;
QString type;
} License;
typedef struct {
QString catalog;
QString foreign_id;
} ForeignId;
typedef struct {
qreal latitude;
qreal longitude;
QString location;
} ArtistLocation;
typedef QVector< ForeignId > ForeignIds;
QByteArray escapeSpacesAndPluses( const QString& in );
Analysis::AnalysisStatus statusToEnum( const QString& status );
QString statusToString( Analysis::AnalysisStatus status );
QByteArray catalogTypeToLiteral( CatalogTypes::Type );
CatalogTypes::Type literalToCatalogType( const QByteArray& type );
QByteArray catalogStatusToLiteral( CatalogTypes::TicketStatus );
CatalogTypes::TicketStatus literalToCatalogStatus( const QByteArray& type );
QByteArray catalogUpdateActionToLiteral( CatalogTypes::Action );
CatalogTypes::Action literalToCatalogUpdateAction( const QByteArray& type );
ECHONEST_EXPORT QDebug operator<<(QDebug d, const ForeignId& id);
ECHONEST_EXPORT QDebug operator<<(QDebug d, const ArtistLocation& id);
}
#endif
|