libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
KEY_VALUE.hh
Go to the documentation of this file.
1/*
2 * Copyright 2021 Assured Information Security, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17
21
22#include <introvirt/util/json/json.hh>
23
24#include <cstdint>
25#include <memory>
26#include <ostream>
27#include <string>
28
29namespace introvirt {
30namespace windows {
31namespace nt {
32
33class KEY_VALUE {
34 public:
35 virtual guest_ptr<const uint8_t[]> Data() const = 0;
37 virtual REG_TYPE Type() const = 0;
38
39 virtual void write(std::ostream& os, const std::string& linePrefix = "") const = 0;
40 virtual Json::Value json() const = 0;
41
42 static std::unique_ptr<KEY_VALUE>
43 make_unique(REG_TYPE regType, const guest_ptr<void>& pKeyValue, uint32_t dataSize);
44
45 static const REG_TYPE RegType(uint32_t type);
46
47 virtual ~KEY_VALUE() = default;
48};
49
50} /* namespace nt */
51} /* namespace windows */
52} /* namespace introvirt */
Definition guest_ptr.hh:88
Definition KEY_VALUE.hh:33
virtual REG_TYPE Type() const =0
virtual guest_ptr< uint8_t[]> Data()=0
static std::unique_ptr< KEY_VALUE > make_unique(REG_TYPE regType, const guest_ptr< void > &pKeyValue, uint32_t dataSize)
static const REG_TYPE RegType(uint32_t type)
virtual void write(std::ostream &os, const std::string &linePrefix="") const =0
virtual guest_ptr< const uint8_t[]> Data() const =0
virtual Json::Value json() const =0
Type-safe guest virtual address pointer and guest_ptr template.
REG_TYPE
Definition REG_TYPE.hh:25
Core IntroVirt classes.
Definition Cr0.hh:20