diff --git a/include/exiv2/datasets.hpp b/include/exiv2/datasets.hpp index 3fcaedea11..df6f4769bf 100644 --- a/include/exiv2/datasets.hpp +++ b/include/exiv2/datasets.hpp @@ -238,6 +238,21 @@ namespace Exiv2 { */ static const char* recordDesc(uint16_t recordId); + /*! + @brief Return the Id number of a record + @param recordName Name of a record type + @return the Id number of a Record + @throw Error if the record is not known; + */ + static uint16_t recordId(const std::string& recordName); + + //! Return read-only list of built-in Envelope Record datasets + static const DataSet* envelopeRecordList(); + + //! Return read-only list of built-in Application2 Record datasets + static const DataSet* application2RecordList(); + + //! Print a list of all dataSets to output stream static void dataSetList(std::ostream& os); private: diff --git a/src/datasets.cpp b/src/datasets.cpp index 8654e00e3a..07ee9a3c60 100644 --- a/src/datasets.cpp +++ b/src/datasets.cpp @@ -421,6 +421,16 @@ namespace Exiv2 { 0xffffffff, Exiv2::string, IptcDataSets::invalidRecord, N_("Unknown dataset"), }; + const DataSet* IptcDataSets::envelopeRecordList() + { + return envelopeRecord; + } + + const DataSet* IptcDataSets::application2RecordList() + { + return application2Record; + } + // Dataset lookup lists.This is an array with pointers to one list per IIM4 Record. // The record id is used as the index into the array. constexpr const DataSet* IptcDataSets::records_[] = {