1 /**************************************************************************************** 2 * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick@googlemail.com> * 3 * Copyright (c) 2010 Ralf Engels <ralf-engels@gmx.de> * 4 * * 5 * This program is free software; you can redistribute it and/or modify it under * 6 * the terms of the GNU General Public License as published by the Free Software * 7 * Foundation; either version 2 of the License, or (at your option) any later * 8 * version. * 9 * * 10 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 12 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 13 * * 14 * You should have received a copy of the GNU General Public License along with * 15 * this program. If not, see <http://www.gnu.org/licenses/>. * 16 ****************************************************************************************/ 17 18 #ifndef AMAROK_METAVALUES_H 19 #define AMAROK_METAVALUES_H 20 21 #include <QHash> 22 #include <QVariant> 23 24 /* This file exists because we need to share the implementation between 25 * amaroklib and amarokcollectionscanner (which doesn't link to amaroklib). 26 */ 27 namespace Meta 28 { 29 /** This type can be used when a number of fields need to 30 * be given to some functions. 31 */ 32 typedef QHash<qint64, QVariant> FieldHash; 33 34 // the following constants are used at a number of places, 35 // Most importantly the QueryMaker 36 // it's also used when reading and writing taglib tags 37 38 // if something is added here: also updsate MetaConstants.cpp 39 40 //track metadata 41 static const qint64 valUrl = 1LL << 0; 42 static const qint64 valTitle = 1LL << 1; 43 static const qint64 valArtist = 1LL << 2; 44 static const qint64 valAlbum = 1LL << 3; 45 static const qint64 valGenre = 1LL << 4; 46 static const qint64 valComposer = 1LL << 5; 47 static const qint64 valYear = 1LL << 6; 48 static const qint64 valComment = 1LL << 7; 49 static const qint64 valTrackNr = 1LL << 8; 50 static const qint64 valDiscNr = 1LL << 9; 51 static const qint64 valBpm = 1LL << 10; 52 //track data 53 static const qint64 valLength = 1LL << 11; 54 static const qint64 valBitrate = 1LL << 12; 55 static const qint64 valSamplerate = 1LL << 13; 56 static const qint64 valFilesize = 1LL << 14; 57 static const qint64 valFormat = 1LL << 15; // the file type a numeric value 58 static const qint64 valCreateDate = 1LL << 16; 59 //statistics 60 static const qint64 valScore = 1LL << 17; // value 0 to 100 61 static const qint64 valRating = 1LL << 18; // value 0 to 10 (inclusive) 62 static const qint64 valFirstPlayed = 1LL << 19; 63 static const qint64 valLastPlayed = 1LL << 20; 64 static const qint64 valPlaycount = 1LL << 21; 65 static const qint64 valUniqueId = 1LL << 22; 66 //replay gain 67 static const qint64 valTrackGain = 1LL << 23; 68 static const qint64 valTrackGainPeak= 1LL << 24; 69 static const qint64 valAlbumGain = 1LL << 25; 70 static const qint64 valAlbumGainPeak= 1LL << 26; 71 72 static const qint64 valAlbumArtist = 1LL << 27; 73 static const qint64 valLabel = 1LL << 28; 74 static const qint64 valModified = 1LL << 29; 75 76 // currently only used for reading and writing tags. Not supported for queryMaker 77 // TODO: support for queryMaker 78 static const qint64 valCompilation = 1LL << 40; 79 static const qint64 valHasCover = (1LL << 40) + 1; 80 static const qint64 valImage = (1LL << 40) + 2; 81 static const qint64 valLyrics = (1LL << 40) + 3; 82 83 // start for custom numbers 84 static const qint64 valCustom = 1LL << 60; 85 } 86 87 #endif 88