/usr/include/KF5/KFileMetaData/kfilemetadata/properties.h is in libkf5filemetadata-dev 5.18.0-0ubuntu1.
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 | /*
* This file is part of KFileMetaData
* Copyright (C) 2014 Vishesh Handa <me@vhanda.in>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef KFILEMETADATA_PROPERTIES
#define KFILEMETADATA_PROPERTIES
#include <QMap>
#include <QVariant>
namespace KFileMetaData {
namespace Property {
enum Property {
FirstProperty = 0,
Empty = 0,
/**
* The Bit Rate of the Audio in the File. Represented as an integer
* in kbit/sec
*/
BitRate,
/**
* The number of channels of the Audio in the File. Represented as an
* integer.
*/
Channels,
/**
* The duration of the media in the file. Represented as an integer
* in seconds.
*/
Duration,
/**
* The Genre of an Audio file. This s represented as a string
* of genres and not integers. The IDv1 standard provides a list of
* commonly excepted genres.
*/
Genre,
/**
* The same rate or frequency of the Audio in the file. This is represented
* as an integer in Hz. So a file with "44.1KHz" will have a frequency
* of 44100
*/
SampleRate,
/**
* Represnts the track number in a set. Typically maps to the "TRCK" tag
* in IDv3
*/
TrackNumber,
/**
* Indicates the year a track was released. Represented as an integer.
* Typically mapped to the "TYE (Year)" tag in IDv1
*/
ReleaseYear,
/**
* Represents the Comment or Description stored in the file. This can map
* to the 'dc:description' tag from DublinCore or the "COMM" field from IDv3
*/
Comment,
/**
* Represents the artist of a media file. This generally corresponds
* to the IDv1 ARTIST tag. Many extractors often split this string
* into a number of artists.
*/
Artist,
/**
* Represnts the album of a media file. This generally corresponds
* to the IDv1 ALBUM tag.
*/
Album,
/**
* Represnts the album artist of a media file. This generally corresponds
* to the IDv3 TPE2 ("Band/Orchestra/Accompaniment") tag.
*/
AlbumArtist,
/**
* Represnts the Composer of a media file. This generally corresponds
* to the IDv2 COMPOSER tag.
*/
Composer,
/**
* Represnts the Lyricist of a media file. This generally corresponds
* to the IDv2 "Lyricist/text writer" tag.
*/
Lyricist,
/**
* The Author field indicated the primary creator of a document.
* This often corresponds directly to dc:creator
*/
Author,
/**
* Refers to the Title of the content of the file. This can represented
* by the IDv1 tag TT2 (Title/songname/content description) or the TITLE
* in a PDF file or the 'dc:title' tag in DublinCore.
*/
Title,
/**
* Refers to the subject of the file. This directly corresponds to the
* 'dc:subject' tag from DublinCore.
*/
Subject,
/**
* Refers to the Application used to create this file. In the ODF standard
* this maps to the 'meta:generator' tag. In PDFs its mapped to the
* "Producer" tag.
*/
Generator,
/**
* The number of pages in a document
*/
PageCount,
/**
* The number of words in a document. This is often only provided for
* documents where the word count is available in the metadata.
*/
WordCount,
/**
* The number of lines in a document. This is often only provided for
* documents where the line count is available in the metadata.
*/
LineCount,
/**
* The language the document is written in. This directly maps to the
* 'dc:language' tag from DublinCore. We do NOT employ any language
* detection schemes on the text.
*/
Langauge,
/**
* The copyright of the file. Represented as a string.
*/
Copyright,
/**
* The publisher of the content. Represnted as a string.
*/
Publisher,
/**
* The date the content of the file was created. This is extracted
* from the File MetaData and not from the file system.
* In ODF, it corresponds to "meta:creation-date", in PDF to the
* "CreationDate" tag, and otherwise the "dcterms:created" tag.
*/
CreationDate,
/**
* The keywords used to represent the document. This is mostly a string list
* of all the keywords.
*/
Keywords,
/**
* Represents the width of the Media in pixels. This is generally
* only applicable for Images and Videos.
*/
Width,
/**
* Represents the height of the Media in pixels. This is generally
* only applicable for Images and Videos.
*/
Height,
/**
* The Aspect Ratio of the visual image or video.
* It is the width of a pixel divided by the height of the pixel.
*/
AspectRatio,
/**
* Number of frames per second
*/
FrameRate,
// Images
ImageMake,
ImageModel,
ImageDateTime,
ImageOrientation,
PhotoFlash,
PhotoPixelXDimension,
PhotoPixelYDimension,
PhotoDateTimeOriginal,
PhotoFocalLength,
PhotoFocalLengthIn35mmFilm,
PhotoExposureTime,
PhotoFNumber,
PhotoApertureValue,
PhotoExposureBiasValue,
PhotoWhiteBalance,
PhotoMeteringMode,
PhotoISOSpeedRatings,
PhotoSaturation,
PhotoSharpness,
PhotoGpsLatitude,
PhotoGpsLongitude,
PhotoGpsAltitude,
TranslationUnitsTotal,
TranslationUnitsWithTranslation,
TranslationUnitsWithDraftTranslation,
TranslationLastAuthor,
TranslationLastUpDate,
TranslationTemplateDate,
PropertyCount,
LastProperty = PropertyCount-1
};
} // namespace Property
typedef QMap<Property::Property, QVariant> PropertyMap;
inline QVariantMap toVariantMap(const PropertyMap& propMap) {
QVariantMap varMap;
PropertyMap::const_iterator it = propMap.constBegin();
for (; it != propMap.constEnd(); ++it) {
int p = static_cast<int>(it.key());
varMap.insertMulti(QString::number(p), it.value());
}
return varMap;
}
inline PropertyMap toPropertyMap(const QVariantMap& varMap) {
PropertyMap propMap;
QVariantMap::const_iterator it = varMap.constBegin();
for (; it != varMap.constEnd(); ++it) {
int p = it.key().toInt();
propMap.insertMulti(static_cast<Property::Property>(p), it.value());
}
return propMap;
}
} // namespace KFileMetaData
#endif
|