Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
port.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2023 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __IO_PORT_H__
11#define __IO_PORT_H__
12
13#include "utils/types.h"
14
15#include <glib.h>
16
17#include <yyjson.h>
18
19TYPEDEF_STRUCT (PortIdentifier);
20TYPEDEF_STRUCT (Port);
21TYPEDEF_STRUCT (StereoPorts);
22TYPEDEF_STRUCT (ExtPort);
23TYPEDEF_STRUCT (PortConnection);
24TYPEDEF_STRUCT (PortConnectionsManager);
25
26bool
27port_identifier_serialize_to_json (
28 yyjson_mut_doc * doc,
29 yyjson_mut_val * pi_obj,
30 const PortIdentifier * pi,
31 GError ** error);
32
33bool
34port_serialize_to_json (
35 yyjson_mut_doc * doc,
36 yyjson_mut_val * port_obj,
37 const Port * port,
38 GError ** error);
39
40bool
41stereo_ports_serialize_to_json (
42 yyjson_mut_doc * doc,
43 yyjson_mut_val * sp_obj,
44 const StereoPorts * sp,
45 GError ** error);
46
47bool
48ext_port_serialize_to_json (
49 yyjson_mut_doc * doc,
50 yyjson_mut_val * ep_obj,
51 const ExtPort * ep,
52 GError ** error);
53
54bool
55port_connection_serialize_to_json (
56 yyjson_mut_doc * doc,
57 yyjson_mut_val * conn_obj,
58 const PortConnection * conn,
59 GError ** error);
60
61bool
62port_connections_manager_serialize_to_json (
63 yyjson_mut_doc * doc,
64 yyjson_mut_val * mgr_obj,
65 const PortConnectionsManager * mgr,
66 GError ** error);
67
68bool
69port_identifier_deserialize_from_json (
70 yyjson_doc * doc,
71 yyjson_val * pi_obj,
72 PortIdentifier * pi,
73 GError ** error);
74
75bool
76port_deserialize_from_json (
77 yyjson_doc * doc,
78 yyjson_val * port_obj,
79 Port * port,
80 GError ** error);
81
82bool
83stereo_ports_deserialize_from_json (
84 yyjson_doc * doc,
85 yyjson_val * sp_obj,
86 StereoPorts * sp,
87 GError ** error);
88
89bool
90ext_port_deserialize_from_json (
91 yyjson_doc * doc,
92 yyjson_val * ep_obj,
93 ExtPort * ep,
94 GError ** error);
95
96bool
97port_connection_deserialize_from_json (
98 yyjson_doc * doc,
99 yyjson_val * conn_obj,
100 PortConnection * conn,
101 GError ** error);
102
103bool
104port_connections_manager_deserialize_from_json (
105 yyjson_doc * doc,
106 yyjson_val * mgr_obj,
108 GError ** error);
109
110#endif // __IO_PORT_H__
External port.
Definition ext_port.h:69
A connection between two ports.
Port connections manager.
Struct used to identify Ports in the project.
Must ONLY be created via port_new()
Definition port.h:139
L & R port, for convenience.
Definition port.h:505
Custom types.