Audacity 3.2.0
PluginIPCUtils.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file PluginIPCUtils.h
6
7 @author Vitaly Sverchinsky
8
9 @brief Provides a set of internal commonly used functions/structures
10
11 Part of lib-module-manager library.
12
13**********************************************************************/
14
15#pragma once
16
17#include <vector>
18#include <wx/string.h>
19#include "XMLTagHandler.h"
20
21class IPCChannel;
23class XMLWriter;
24
25namespace detail
26{
29 bool ParseRequestString(const wxString& req, wxString& providerId, wxString& pluginPath);
30
33 wxString MakeRequestString(const wxString& providerId, const wxString& pluginPath);
34
37 void PutMessage(IPCChannel& channel, const wxString& value);
38
42 {
43 std::vector<char> mBuffer;
44 public:
46 void ConsumeBytes(const void* bytes, size_t length);
47
49 bool CanPop() const noexcept;
52 wxString Pop();
53 };
54
60 {
61 std::vector<PluginDescriptor> mDescriptors;
62 wxString mErrorMessage;
63 bool mHasError{false};
64 public:
65
68 bool IsValid() const noexcept;
69
70 bool HasError() const noexcept;
71 const wxString& GetErrorMessage() const noexcept;
72
74 void SetError(const wxString& msg);
75
76 const std::vector<PluginDescriptor>& GetDescriptors() const noexcept;
77
78 bool HandleXMLTag(const std::string_view& tag, const AttributesList& attrs) override;
79 void HandleXMLEndTag(const std::string_view&) override;
80 XMLTagHandler* HandleXMLChild(const std::string_view& tag) override;
81
82 void WriteXML(XMLWriter& writer) const;
83 };
84
85}
const TranslatableString desc
Definition: ExportPCM.cpp:58
std::vector< Attribute > AttributesList
Definition: XMLTagHandler.h:40
Interface for sending data from client to server or vice versa, complemented by IPCChannelStatusCallb...
Definition: IPCChannel.h:22
This class is an interface which should be implemented by classes which wish to be able to load and s...
Definition: XMLTagHandler.h:42
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
Definition: XMLWriter.h:26
void ConsumeBytes(const void *bytes, size_t length)
fills internal buffer
bool CanPop() const noexcept
std::vector< char > mBuffer
std::vector< PluginDescriptor > mDescriptors
void Add(const FilePath &path)
void SetError()
bool ParseRequestString(const wxString &req, wxString &providerId, wxString &pluginPath)
void PutMessage(IPCChannel &channel, const wxString &value)
wxString MakeRequestString(const wxString &providerId, const wxString &pluginPath)
STL namespace.