libnmbs 1.0.0
Loading...
Searching...
No Matches
nmbs.h
Go to the documentation of this file.
1
26
27#pragma once
28
29#include <string>
30#include <filesystem>
31
32#include "binding.h"
34#include "binding_information.h"
35#include "expected.h"
36
41namespace nmbs
42{
48 [[nodiscard]] std::string_view version() noexcept;
49
54 void cleanup();
55
64 [[nodiscard]] Expected<std::string> write_labels(
65 const std::filesystem::path& path,
66 const std::vector<ConfidentialityLabel>& confidentiality_labels,
67 std::optional<binding::ProfileSupport> binding_support = std::nullopt);
68
76 [[nodiscard]] Expected<std::optional<binding::BindingInformation>> read_binding(
77 const std::filesystem::path& path,
78 std::optional<binding::ProfileSupport> binding_support = std::nullopt);
79
86 [[nodiscard]] Expected<std::optional<std::string>> read_binding_xml(
87 const std::filesystem::path& path,
88 std::optional<binding::ProfileSupport> binding_support = std::nullopt);
89
97 const std::filesystem::path& path,
98 std::optional<binding::ProfileSupport> binding_support = std::nullopt);
99}
Core binding profile support flags and analysis functions.
Object representation of the ADatP-4778 BindingInformation element.
Object representation of a Confidentiality Label as per ADatP-4774.
Standard error handling types for the nmbs library.
Functionality for the numerous binding profiles of ADatP-4778.
Definition binding.h:38
Lightweight utilities for NATO confidentiality metadata.
Definition binding.h:38
std::expected< T, Error > Expected
Alias for std::expected standardized with nmbs::Error.
Definition expected.h:156
void cleanup()
Releases globally allocated memory and resets library state.
Expected< std::optional< binding::BindingInformation > > read_binding(const std::filesystem::path &path, std::optional< binding::ProfileSupport > binding_support=std::nullopt)
Reads and deserializes the ADatP-4778 binding from the specified file.
Expected< std::optional< std::string > > read_binding_xml(const std::filesystem::path &path, std::optional< binding::ProfileSupport > binding_support=std::nullopt)
Reads the raw XML of the ADatP-4778 binding from the specified file.
Expected< void > remove_binding(const std::filesystem::path &path, std::optional< binding::ProfileSupport > binding_support=std::nullopt)
Removes the ADatP-4778 binding from the specified file.
Expected< std::string > write_labels(const std::filesystem::path &path, const std::vector< ConfidentialityLabel > &confidentiality_labels, std::optional< binding::ProfileSupport > binding_support=std::nullopt)
Writes ADatP-4778 binding information using the optimal binding profile.
std::string_view version() noexcept
Retrieves the semantic version of the library.
Struct representation of the ADatP-4774 "Confidentiality Label".
Definition confidentiality_label.h:46