LMMS
Loading...
Searching...
No Matches
message.h
Go to the documentation of this file.
1/*
2 * travesty, pure C VST3-compatible interface
3 * Copyright (C) 2021-2022 Filipe Coelho <falktx@falktx.com>
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any purpose with
6 * or without fee is hereby granted, provided that the above copyright notice and this
7 * permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10 * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17#pragma once
18
19#include "base.h"
20
21#include "align_push.h"
22
26
28#ifndef __cplusplus
29 struct v3_funknown;
30#endif
31 v3_result (V3_API* set_int)(void* self, const char* id, int64_t value);
32 v3_result (V3_API* get_int)(void* self, const char* id, int64_t* value);
33 v3_result (V3_API* set_float)(void* self, const char* id, double value);
34 v3_result (V3_API* get_float)(void* self, const char* id, double* value);
35 v3_result (V3_API* set_string)(void* self, const char* id, const int16_t* string);
36 v3_result (V3_API* get_string)(void* self, const char* id, int16_t* string, uint32_t size);
37 v3_result (V3_API* set_binary)(void* self, const char* id, const void* data, uint32_t size);
38 v3_result (V3_API* get_binary)(void* self, const char* id, const void** data, uint32_t* size);
39};
40
41static constexpr const v3_tuid v3_attribute_list_iid =
42 V3_ID(0x1E5F0AEB, 0xCC7F4533, 0xA2544011, 0x38AD5EE4);
43
47
48struct v3_message {
49#ifndef __cplusplus
50 struct v3_funknown;
51#endif
52 const char* (V3_API* get_message_id)(void* self);
53 void (V3_API* set_message_id)(void* self, const char* id);
55};
56
57static constexpr const v3_tuid v3_message_iid =
58 V3_ID(0x936F033B, 0xC6C047DB, 0xBB0882F8, 0x13C1E613);
59
63
65#ifndef __cplusplus
66 struct v3_funknown;
67#endif
68 v3_result (V3_API* connect)(void* self, struct v3_connection_point** other);
69 v3_result (V3_API* disconnect)(void* self, struct v3_connection_point** other);
70 v3_result (V3_API* notify)(void* self, struct v3_message** message);
71};
72
73static constexpr const v3_tuid v3_connection_point_iid =
74 V3_ID(0x70A4156F, 0x6E6E4026, 0x989148BF, 0xAA60D8D1);
75
76#ifdef __cplusplus
77
81
82struct v3_attribute_list_cpp : v3_funknown {
83 v3_attribute_list attrlist;
84};
85
86struct v3_message_cpp : v3_funknown {
87 v3_message msg;
88};
89
90struct v3_connection_point_cpp : v3_funknown {
91 v3_connection_point point;
92};
93
94#endif
95
96#include "align_pop.h"
#define V3_ID(a, b, c, d)
Definition base.h:111
#define V3_API
Definition base.h:59
int32_t v3_result
Definition base.h:35
uint8_t v3_tuid[16]
Definition base.h:46
static constexpr const v3_tuid v3_message_iid
Definition message.h:57
static constexpr const v3_tuid v3_attribute_list_iid
Definition message.h:41
static constexpr const v3_tuid v3_connection_point_iid
Definition message.h:73
unsigned int uint32_t
Definition mid.cpp:100
short int16_t
Definition mid.cpp:96
const char * msg
Definition missing_descriptor.c:20
Definition message.h:27
const char int64_t value
Definition message.h:31
const char * id
Definition message.h:31
v3_result(V3_API *set_float)(void *self
const char const int16_t * string
Definition message.h:35
const char int16_t uint32_t size
Definition message.h:36
v3_result(V3_API *get_int)(void *self
v3_result(V3_API *get_float)(void *self
const char const void * data
Definition message.h:37
Definition message.h:64
struct v3_message ** message
Definition message.h:70
v3_result(V3_API *disconnect)(void *self
struct v3_connection_point ** other
Definition message.h:68
Definition base.h:142
Definition message.h:48
const char * id
Definition message.h:53
v3_attribute_list **V3_API * get_attributes(void *self)
const char *V3_API * get_message_id(void *self)
#define void
Definition unzip.h:396