Introduce ArchiveFormat class for metadata of formats
ClosedPublic

Authored by elvisangelaccio on Mar 31 2016, 1:13 PM.

Details

Summary

Different plugins can have different metadata/properties for the same mimetype.
To handle that, we create an ArchiveFormat instance out of the preferred plugin for a given mimetype.

For now only the properties about encryption are set in the json. The rationale is the following: if a json doesn't have a given key, a default value is assumed. For instance, the libarchive plugin doesn't have any Encryption or HeaderEncryption key ==> the ArchiveFormat will have the Unencrypted property set.

There is currently some code duplication with the Archive class. Eventually the Archive class will use these new functions in mimetypes.cpp, to load the plugins.

Test Plan

All tests pass.

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
elvisangelaccio retitled this revision from to Introduce ArchiveFormat class for metadata of formats.
elvisangelaccio updated this object.
elvisangelaccio edited the test plan for this revision. (Show Details)
elvisangelaccio added a reviewer: rthomsen.
elvisangelaccio set the repository for this revision to R36 Ark.
elvisangelaccio added a project: Ark.
elvisangelaccio added a subscriber: kde-utils-devel.

Rebased on top of current master

rthomsen accepted this revision.Apr 6 2016, 6:06 PM
rthomsen edited edge metadata.

Yes, let's get this merged :)

This revision is now accepted and ready to land.Apr 6 2016, 6:06 PM
This revision was automatically updated to reflect the committed changes.