c2pa-rs icon indicating copy to clipboard operation
c2pa-rs copied to clipboard

(MINOR) Initial V2 API work

Open gpeacock opened this issue 10 months ago • 2 comments

This adds a new Builder and Reader model based entirely on streams. The Builder is based on the Manifest API and the Reader on ManifestStore. The builder is used to create new manifests to be signed. The reader is always read only. Ingredients are added directly to the builder. Resources such as thumbnails and icons can be accessed via Uris in resource references. Resources in a reader are always accessed via jumbf uris. The state of the builder can be captured into a zip stream and reconstructed at any time. A new CallBackSigner interface has been added which ensures the client code does not need access to private keys.

The new APIs are intended to replace the older ones. The older APIs will eventually be deprecated. The Builder and Reader APIs will be supported in language bindings for C/C++, Python and others.

gpeacock avatar Mar 29 '24 01:03 gpeacock

Looks OK to merge behind the flags. The only things I would double check is which functions are being exposed. There are some thing I don't think we want to support.

mauricefisher64 avatar Mar 29 '24 19:03 mauricefisher64

Codecov Report

Attention: Patch coverage is 68.72749% with 521 lines in your changes are missing coverage. Please review.

Project coverage is 79.62%. Comparing base (b5ce33f) to head (5930e51).

Files Patch % Lines
make_test_images/src/make_test_images.rs 42.54% 158 Missing :warning:
make_test_images/src/compare_manifests.rs 0.00% 148 Missing :warning:
sdk/src/builder.rs 87.57% 79 Missing :warning:
sdk/src/callback_signer.rs 69.69% 20 Missing :warning:
sdk/src/reader.rs 75.90% 20 Missing :warning:
make_test_images/src/main.rs 0.00% 17 Missing :warning:
sdk/src/asset_handlers/c2pa_io.rs 64.28% 15 Missing :warning:
sdk/src/manifest_store.rs 57.57% 14 Missing :warning:
sdk/src/assertion.rs 0.00% 13 Missing :warning:
sdk/src/utils/test.rs 66.66% 9 Missing :warning:
... and 9 more

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #437      +/-   ##
==========================================
- Coverage   80.31%   79.62%   -0.70%     
==========================================
  Files          82       87       +5     
  Lines       25867    27276    +1409     
==========================================
+ Hits        20776    21719     +943     
- Misses       5091     5557     +466     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Apr 10 '24 20:04 codecov-commenter

Forcing merge after all reviews passed due to MINOR VERSION check being stuck.

gpeacock avatar Apr 23 '24 05:04 gpeacock