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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
// Copyright Jean Pierre Cimalando 2018.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#pragma once
#include <string>
#include <vector>
#include <stdint.h>
std::vector<uint8_t> MakeSTR(const std::string &string);
std::vector<uint8_t> MakeCSTR(const std::string &string);
enum CarbonArchitecture
{
ArchsBegin = 1,
Arch68k = ArchsBegin,
ArchPowerPC,
ArchInterpreted,
ArchWin32,
ArchPowerPCNativeEntryPoint,
ArchIA32NativeEntryPoint,
ArchPowerPC64NativeEntryPoint,
ArchX86_64NativeEntryPoint,
ArchsEnd
};
#pragma pack(push, 1)
struct CarbonThng
{
char Type[4];
char Subtype[4];
char Manufacturer[4];
uint32_t ComponentFlags;
uint32_t ComponentFlagsMask;
char CodeType[4];
uint16_t CodeId;
char NameType[4];
uint16_t NameId;
char InfoType[4];
uint16_t InfoId;
char IconType[4];
uint16_t IconId;
uint32_t ComponentVersion;
uint32_t RegistrationFlags;
uint16_t IconFamilyId;
struct PlatformInfo {
uint32_t ComponentFlags;
char CodeType[4];
uint16_t CodeId;
uint16_t PlatformType;
};
uint32_t PlatformInfoCount;
PlatformInfo PlatformInfos[];
};
#pragma pack(pop)
std::vector<uint8_t> MakeThng(
unsigned archs, uint16_t id_plugin, uint16_t id_info, uint32_t version,
const char type[4], const char subtype[4], const char manuf[4]);
|