-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
1 addition
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1d6bac6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @piponazo. Can you advise on how a client should migrate from the
envelopeRecordList()
andapplication2RecordList()
methods, as I was using them in my library. Cheers.1d6bac6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a direct replacement, but I do see an alternative strategy. In my library, I was statically allocating and populating a set of application2 and envelope datasets at first access. When I encountered an iptc record in parsing some metadata, I would look for a match in one of the record sets using record id and dataset number. Then I would get the IPTC dataset data from the matching exiv DataSet struct.
Instead, it looks like I should be using the various public static methods in the IptcDataSets class to look up dataset information by record id and dataset number. I'll try that and see how it goes. Cheers.
1d6bac6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another note.
Exiv2::DataSet
appears to be a public API, yet I can't find any use of it in the public API now that theenvelopeRecordList()
andapplication2RecordList()
methods are gone. IsExiv2::DataSet
still intended to be public, and if it is does it make sense to add a static method that returns a known instance ofExiv2::DataSet
given a record id and dataset number?1d6bac6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So after further attempts, I can find no way to fully restore the capability lost by the removal of these two methods. For example, given a dataset number and record id, I can find name, title, description of an IPTC dataset through the current API, I can't find a way to access the
mandatory
property. This is present on theExiv2::DataSet
struct, but I can find no method that provides access to the instances of that struct contained indatasets.cpp
.I'm wondering, even if we don't restore the
envelopeRecordList()
andapplication2RecordList()
methods, how about adding a method liketo the
IptcDataSets
class which returns an instance ofDataSet
for a known data set number and record id, and returns NULL for an unknown data set number or record id?I'm happy to help with a PR if this sounds like a good idea to you. Cheers, and thanks for your work on this essential community project.
1d6bac6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mallman , thanks for your report and feedback. It is very appreciated.
Honestly, when I removed that part of the code I did not consider that clients might be using those internal data structures. I wrongly assumed that this part of the code was not used. Of course any functionality exposed in a library which is used by many different clients will eventually be used. Classic rookie mistake from my side. I am sorry about that, I hope you did not loose too much time with this.
I will just create new PR reverting that commit.
It is good to see people using already the
main
branch and letting us know about mistakes like this one π1d6bac6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @piponazo.
π