[Differential] [Request, 279 lines] D1274: Introduce ArchiveFormat class for metadata of formats

elvisangelaccio (Elvis Angelaccio) noreply at phabricator.kde.org
Thu Mar 31 13:13:44 UTC 2016


elvisangelaccio created this revision.
elvisangelaccio added a reviewer: rthomsen.
elvisangelaccio added a subscriber: kde-utils-devel.
elvisangelaccio set the repository for this revision to rARK Ark.
elvisangelaccio added a project: Ark.

REVISION 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.

REPOSITORY
  rARK Ark

REVISION DETAIL
  https://phabricator.kde.org/D1274

AFFECTED FILES
  kerfuffle/CMakeLists.txt
  kerfuffle/archiveformat.cpp
  kerfuffle/archiveformat.h
  kerfuffle/createdialog.cpp
  kerfuffle/createdialog.h
  kerfuffle/mimetypes.cpp
  kerfuffle/mimetypes.h
  plugins/cli7zplugin/kerfuffle_cli7z.json
  plugins/clirarplugin/kerfuffle_clirar.json
  plugins/clizipplugin/kerfuffle_clizip.json

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: elvisangelaccio, rthomsen
Cc: kde-utils-devel, tctara


More information about the Kde-utils-devel mailing list