c2pa-c
C++ API for c2pa-c library
Loading...
Searching...
No Matches
c2pa.hpp File Reference

C++ wrapper for the C2PA C library. More...

#include <filesystem>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <optional>
#include <c2pa.h>
Include dependency graph for c2pa.hpp:

Go to the source code of this file.

Classes

class  c2pa::C2paException
 
class  c2pa::CppIStream
 Istream Class wrapper for C2paStream. More...
 
class  c2pa::CppOStream
 Ostream Class wrapper for C2paStream. More...
 
class  c2pa::CppIOStream
 IOStream Class wrapper for C2paStream. More...
 
class  c2pa::Reader
 Reader class for reading a manifest. More...
 
class  c2pa::Signer
 Signer class for creating a signer. More...
 
class  c2pa::Builder
 Builder class for creating a manifest. More...
 

Namespaces

namespace  c2pa
 

Macros

#define C2PA_CPP_API
 

Typedefs

using path = std::filesystem::path
 
typedef C2paSignerInfo c2pa::SignerInfo
 
using c2pa::SignerFunc = std::vector< unsigned char >(const std::vector< unsigned char > &)
 Signer Callback function type.
 

Functions

string c2pa::version ()
 Returns the version of the C2pa library.
 
void c2pa::load_settings (const string &data, const string &format)
 
optional< string > c2pa::read_file (const filesystem::path &source_path, const optional< path > data_dir=nullopt)
 
std::string c2pa::read_ingredient_file (const path &source_path, const path &data_dir)
 
void c2pa::sign_file (const path &source_path, const path &dest_path, const char *manifest, SignerInfo *signer_info, const std::optional< path > data_dir=std::nullopt)
 

Detailed Description

C++ wrapper for the C2PA C library.

This is used for creating and verifying C2PA manifests. This is an early version, and has not been fully tested. Thread safety is not guaranteed due to the use of errno and etc.

Macro Definition Documentation

◆ C2PA_CPP_API

#define C2PA_CPP_API

Typedef Documentation

◆ path

using path = std::filesystem::path