Audacity 3.2.0
Classes | Functions
detail Namespace Reference

Classes

class  InputMessageReader
 
class  PluginValidationResult
 

Functions

bool ParseRequestString (const wxString &req, wxString &providerId, wxString &pluginPath)
 
wxString MakeRequestString (const wxString &providerId, const wxString &pluginPath)
 
void PutMessage (IPCChannel &channel, const wxString &value)
 

Function Documentation

◆ MakeRequestString()

wxString detail::MakeRequestString ( const wxString &  providerId,
const wxString &  pluginPath 
)

Helper function that builds item string from given plugin provider id and plugin path strings return Item string that can be passed as argument to wxConnection::Request

Definition at line 45 of file PluginIPCUtils.cpp.

46{
47 return wxJoin(wxArrayStringEx {providerId, pluginPath}, ';');
48}
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.

Referenced by AsyncPluginValidator::Impl::Validate().

Here is the caller graph for this function:

◆ ParseRequestString()

bool detail::ParseRequestString ( const wxString &  req,
wxString &  providerId,
wxString &  pluginPath 
)

Helper function that extracts plugin provider id and plugin path from the item string return true if item string was successfully parsed

Definition at line 33 of file PluginIPCUtils.cpp.

34{
35 auto strings = wxSplit(req, ';');
36 if(strings.size() == 2)
37 {
38 providerId = strings[0];
39 pluginPath = strings[1];
40 return true;
41 }
42 return false;
43}

Referenced by AsyncPluginValidator::Impl::HandleResult(), and PluginHost::Serve().

Here is the caller graph for this function:

◆ PutMessage()

void detail::PutMessage ( IPCChannel channel,
const wxString &  value 
)

Writes the length of the string and string bytes into the channel. Message can be then extracted with InputMessageReader

Definition at line 50 of file PluginIPCUtils.cpp.

51{
52 auto utf8 = value.ToUTF8();
53 const HeaderBlock length = utf8.length();
54 channel.Send(&length, HeaderBlockSize);
55 if(length > 0)
56 channel.Send(utf8.data(), length);
57}
virtual void Send(const void *bytes, size_t length)=0
Write data to the channel.

References anonymous_namespace{PluginIPCUtils.cpp}::HeaderBlockSize, and IPCChannel::Send().

Referenced by AsyncPluginValidator::Impl::OnConnect(), PluginHost::Serve(), and AsyncPluginValidator::Impl::Validate().

Here is the call graph for this function:
Here is the caller graph for this function: