diff --git a/src/common/plugins.h b/src/common/plugins.h index 55778726..86d4c5be 100644 --- a/src/common/plugins.h +++ b/src/common/plugins.h @@ -34,7 +34,7 @@ enum class LibArchitecture { dll_32, dll_64 }; * `plugin_tyep_to_string()` and `plugin_type_from_string()` can be used to * convert these values to and from strings. The string form is used as a * command line argument for the individual Wine host applications, and the enum - * form is passed directly in `GroupRequest`. + * form is passed directly in `HostRequest`. * * The `unkonwn` tag is not used directly, but in the event that we do call * `plugin_type_from_string()` with some invalid value we can use it to diff --git a/src/common/serialization/common.h b/src/common/serialization/common.h index bd8f4d54..5b77082c 100644 --- a/src/common/serialization/common.h +++ b/src/common/serialization/common.h @@ -51,11 +51,11 @@ template overload(Ts...) -> overload; /** - * An object containing the startup options for hosting a plugin in a plugin - * group process. These are the exact same options that would have been passed - * to `yabridge-host.exe` were the plugin to be hosted individually. + * An object containing the startup options for hosting a plugin. These options + * are passed to `yabridge-host.exe` as command line arguments, and they are + * used directly by group host processes. */ -struct GroupRequest { +struct HostRequest { PluginType plugin_type; std::string plugin_path; std::string endpoint_base_dir; @@ -69,8 +69,8 @@ struct GroupRequest { }; template <> -struct std::hash { - std::size_t operator()(GroupRequest const& params) const noexcept { +struct std::hash { + std::size_t operator()(HostRequest const& params) const noexcept { std::hash hasher{}; return hasher(params.plugin_path) ^ @@ -79,12 +79,12 @@ struct std::hash { }; /** - * The response sent back after the group host process receives a `GroupRequest` + * The response sent back after the group host process receives a `HostRequest` * object. This only holds the group process's PID because we need to know if * the group process crashes while it is initializing the plugin to prevent us * from waiting indefinitely for the socket to be connected to. */ -struct GroupResponse { +struct HostResponse { pid_t pid; template diff --git a/src/plugin/host-process.cpp b/src/plugin/host-process.cpp index 1d949d3e..b0f83c37 100644 --- a/src/plugin/host-process.cpp +++ b/src/plugin/host-process.cpp @@ -183,10 +183,10 @@ GroupHost::GroupHost(boost::asio::io_context& io_context, write_object( group_socket, // TODO: The plugin type should of course not be hardcoded - GroupRequest{.plugin_type = PluginType::vst2, - .plugin_path = plugin_path.string(), - .endpoint_base_dir = endpoint_base_dir.string()}); - const auto response = read_object(group_socket); + HostRequest{.plugin_type = PluginType::vst2, + .plugin_path = plugin_path.string(), + .endpoint_base_dir = endpoint_base_dir.string()}); + const auto response = read_object(group_socket); assert(response.pid > 0); }; diff --git a/src/wine-host/bridges/group.cpp b/src/wine-host/bridges/group.cpp index fd7f6d2f..3fee24da 100644 --- a/src/wine-host/bridges/group.cpp +++ b/src/wine-host/bridges/group.cpp @@ -184,8 +184,8 @@ void GroupBridge::accept_requests() { // TODO: Do something with the plugin type // TODO: Maybe try to merge instantiation with `individual_host`? // Might only make things messier - const auto request = read_object(socket); - write_object(socket, GroupResponse{boost::this_process::get_id()}); + const auto request = read_object(socket); + write_object(socket, HostResponse{boost::this_process::get_id()}); // The plugin has to be initiated on the IO context's thread because // this has to be done on the same thread that's handling messages, diff --git a/src/wine-host/bridges/vst2.h b/src/wine-host/bridges/vst2.h index 0cb68926..dd5774f3 100644 --- a/src/wine-host/bridges/vst2.h +++ b/src/wine-host/bridges/vst2.h @@ -68,7 +68,7 @@ class Vst2Bridge { * or if communication could not be set up. * * TODO: Make these two arguments `boost::filesystem::path`, also use those - * in `GroupRequest`. + * in `HostRequest`. */ Vst2Bridge(MainContext& main_context, std::string plugin_dll_path,