-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathInterpreter.h
More file actions
30 lines (23 loc) · 897 Bytes
/
Interpreter.h
File metadata and controls
30 lines (23 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// SPDX-FileCopyrightText: (C) 2022 user4223 and (other) contributors to ticket-decoder <https://github.com/user4223/ticket-decoder>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include "lib/infrastructure/include/ContextFwd.h"
#include <string>
#include <vector>
#include <optional>
#include <memory>
#include <cstdint>
namespace interpreter::api
{
class SignatureVerifier;
class CertificateProvider;
class Interpreter
{
public:
virtual ~Interpreter() = default;
/* Decodes all known records/fields from given buffer into json structure.
*/
virtual std::optional<std::string> interpret(std::vector<std::uint8_t> const &input, std::string origin, int indent = -1) const = 0;
static std::unique_ptr<Interpreter> create(infrastructure::Context &context, SignatureVerifier const &signatureChecker, CertificateProvider &certificateProvider);
};
}