-
-
Notifications
You must be signed in to change notification settings - Fork 99
/
Copy pathmessage.h
96 lines (77 loc) · 2.83 KB
/
message.h
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
* travesty, pure C VST3-compatible interface
* Copyright (C) 2021-2022 Filipe Coelho <falktx@falktx.com>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without fee is hereby granted, provided that the above copyright notice and this
* permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
* TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#pragma once
#include "base.h"
#include "align_push.h"
/**
* attribute list
*/
struct v3_attribute_list {
#ifndef __cplusplus
struct v3_funknown;
#endif
v3_result (V3_API* set_int)(void* self, const char* id, int64_t value);
v3_result (V3_API* get_int)(void* self, const char* id, int64_t* value);
v3_result (V3_API* set_float)(void* self, const char* id, double value);
v3_result (V3_API* get_float)(void* self, const char* id, double* value);
v3_result (V3_API* set_string)(void* self, const char* id, const int16_t* string);
v3_result (V3_API* get_string)(void* self, const char* id, int16_t* string, uint32_t size);
v3_result (V3_API* set_binary)(void* self, const char* id, const void* data, uint32_t size);
v3_result (V3_API* get_binary)(void* self, const char* id, const void** data, uint32_t* size);
};
static constexpr const v3_tuid v3_attribute_list_iid =
V3_ID(0x1E5F0AEB, 0xCC7F4533, 0xA2544011, 0x38AD5EE4);
/**
* message
*/
struct v3_message {
#ifndef __cplusplus
struct v3_funknown;
#endif
const char* (V3_API* get_message_id)(void* self);
void (V3_API* set_message_id)(void* self, const char* id);
v3_attribute_list** (V3_API* get_attributes)(void* self);
};
static constexpr const v3_tuid v3_message_iid =
V3_ID(0x936F033B, 0xC6C047DB, 0xBB0882F8, 0x13C1E613);
/**
* connection point
*/
struct v3_connection_point {
#ifndef __cplusplus
struct v3_funknown;
#endif
v3_result (V3_API* connect)(void* self, struct v3_connection_point** other);
v3_result (V3_API* disconnect)(void* self, struct v3_connection_point** other);
v3_result (V3_API* notify)(void* self, struct v3_message** message);
};
static constexpr const v3_tuid v3_connection_point_iid =
V3_ID(0x70A4156F, 0x6E6E4026, 0x989148BF, 0xAA60D8D1);
#ifdef __cplusplus
/**
* C++ variants
*/
struct v3_attribute_list_cpp : v3_funknown {
v3_attribute_list attrlist;
};
struct v3_message_cpp : v3_funknown {
v3_message msg;
};
struct v3_connection_point_cpp : v3_funknown {
v3_connection_point point;
};
#endif
#include "align_pop.h"