From cf3e1dfcd8bb97a37dabf4039c14a0e5951d8200 Mon Sep 17 00:00:00 2001 From: ok-nick Date: Fri, 27 Mar 2026 15:04:37 -0400 Subject: [PATCH 1/2] feat: `ContextBuilder::c2pa_context_builder` to get underlying FFI context builder --- include/c2pa.hpp | 4 ++++ src/c2pa_context.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/include/c2pa.hpp b/include/c2pa.hpp index a03a3c1..777368d 100644 --- a/include/c2pa.hpp +++ b/include/c2pa.hpp @@ -317,6 +317,10 @@ namespace c2pa /// @note This consumes the builder. After calling this, is_valid() returns false. [[nodiscard]] Context create_context(); + /// @brief Get the underlying C2paContextBuilder pointer. + /// @return Pointer to the C2paContextBuilder object, or nullptr if moved from. + C2paContextBuilder* c2pa_context_builder() const noexcept; + private: C2paContextBuilder* context_builder; }; diff --git a/src/c2pa_context.cpp b/src/c2pa_context.cpp index 5d81791..f60e0c8 100644 --- a/src/c2pa_context.cpp +++ b/src/c2pa_context.cpp @@ -154,6 +154,10 @@ namespace c2pa return *this; } + C2paContextBuilder* Context::ContextBuilder::c2pa_context_builder() const noexcept { + return context_builder; + } + Context Context::ContextBuilder::create_context() { if (!is_valid()) { throw C2paException("ContextBuilder is invalid (moved from)"); From 3e254c4327ad81351bb4d5e2ab53c3a13d24d9e7 Mon Sep 17 00:00:00 2001 From: ok-nick Date: Fri, 27 Mar 2026 16:07:06 -0400 Subject: [PATCH 2/2] chore: update version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1eb57de..0e9d57a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ cmake_minimum_required(VERSION 3.27) # This is the current version of this C++ project -project(c2pa-c VERSION 0.19.1) +project(c2pa-c VERSION 0.19.2) # Set the version of the c2pa_rs library used set(C2PA_VERSION "0.78.6")