Need a way to get a list of all supported tags
|Assignee:||Andreas Huggel||% Done:|
In KPhotoAlbum, we have to invent an ugly way to parse strings because exiv2 didn't provide any way to get a list of all recognized tag names, see Info::standardKeys() at http://websvn.kde.org/trunk/extragear/graphics/kphotoalbum/Exif/Info.cpp?view=markup
The exiv2 library already provides a way to get a list of "normal" tags, but I wasn't able to find any equivalent for MakerNotes, nor for IPTC data. Having to parse strings is really ugly (and I apologize for not bringing this to your attention before).
In addition, Exiv2::ExifTags::makerTaglist() got renamed to Exiv2::ExifTags::taglist() while you were fixing #550. Changing API in an incompatible way should be avoided whenever possible.
#1 Updated by Andreas Huggel almost 9 years ago
Actually, it is not quite that bad:
For standard Exif tags, there are static functions
static const TagInfo* ExifTags::ifdTagList() et al.
For makernotes, there are similar functions at each makernote, e.g.,
static const TagInfo* CanonMakerNote::tagList() etc.
Maybe ExifTags should have one interface that allows access to all of these.
The corresponding functions for IPTC datasets are
static const DataSet* IptcDataSets::envelopeRecordList()
static const DataSet* IptcDataSets::application2RecordList()
And just for the sake of completeness, for XMP we have
static const XmpPropertyInfo* XmpProperties::propertyList()
As for the API change, my apologies for the rushed release. I always wanted to fix this issue only in 0.18 (which has significant API changes anyway), but somehow it came up again and made it into an earlier release. The change by itself is ok - it's really more a bugfix than a change as the interface was not named correctly.