Audacity 3.2.0
Namespaces | Classes | Typedefs | Functions | Variables
cloud Namespace Reference

Namespaces

namespace  anonymous_namespace{CloudExportersRegistry.cpp}
 
namespace  anonymous_namespace{ShareAudioToolbar.cpp}
 
namespace  audiocom
 

Classes

class  CloudExporterPlugin
 Helper interface, that allows to setup the desired export format on the ExportPlugin. More...
 
class  ShareAudioToolbar
 

Typedefs

using CloudExporterPluginFactory = std::function< std::unique_ptr< CloudExporterPlugin >(const AudacityProject &)>
 
using MimeType = std::string
 
using MimeTypesList = std::vector< std::string >
 Ordered list of mime types. More...
 

Functions

bool RegisterCloudExporter (MimeType mimeType, CloudExporterPluginFactory factory)
 Registers a factory for a specific mime type. More...
 
std::unique_ptr< cloud::CloudExporterPluginCreatePreferredExporter (const MimeTypesList &mimeTypes, const AudacityProject &project)
 

Variables

static RegisteredToolbarFactory factory
 

Detailed Description


Audacity: A Digital Audio Editor

CloudExporterPlugin.cpp

Dmitry Vedenko


Audacity: A Digital Audio Editor

CloudExporterPlugin.h

Dmitry Vedenko


Audacity: A Digital Audio Editor

CloudExportersRegistry.cpp

Dmitry Vedenko


Audacity: A Digital Audio Editor

MimeTypesList.h

Dmitry Vedenko

Typedef Documentation

◆ CloudExporterPluginFactory

using cloud::CloudExporterPluginFactory = typedef std::function<std::unique_ptr<CloudExporterPlugin>(const AudacityProject&)>

Definition at line 24 of file CloudExportersRegistry.h.

◆ MimeType

using cloud::MimeType = typedef std::string

Definition at line 18 of file MimeTypesList.h.

◆ MimeTypesList

using cloud::MimeTypesList = typedef std::vector<std::string>

Ordered list of mime types.

Definition at line 20 of file MimeTypesList.h.

Function Documentation

◆ CreatePreferredExporter()

CLOUD_UPLOAD_API std::unique_ptr< CloudExporterPlugin > cloud::CreatePreferredExporter ( const MimeTypesList mimeTypes,
const AudacityProject project 
)

Returns a best matching exporter provided a list of mime types. The list is ordered by priority.

Definition at line 38 of file CloudExportersRegistry.cpp.

40{
41 for (const auto& mimeType : mimeTypes)
42 {
43 auto it = Exporters.find(mimeType);
44
45 if (Exporters.end() != it)
46 return it->second(project);
47 }
48
49 return {};
50}
std::unordered_map< MimeType, CloudExporterPluginFactory > Exporters

References cloud::anonymous_namespace{CloudExportersRegistry.cpp}::Exporters.

Referenced by cloud::audiocom::ShareAudioDialog::ExportProject().

Here is the caller graph for this function:

◆ RegisterCloudExporter()

CLOUD_UPLOAD_API bool cloud::RegisterCloudExporter ( MimeType  mimeType,
CloudExporterPluginFactory  factory 
)

Registers a factory for a specific mime type.

Definition at line 26 of file CloudExportersRegistry.cpp.

28{
29 if (Exporters.end() == Exporters.find(mimeType))
30 {
31 Exporters.emplace(std::move(mimeType), std::move(factory));
32 return true;
33 }
34
35 return false;
36}
static RegisteredToolbarFactory factory

References cloud::anonymous_namespace{CloudExportersRegistry.cpp}::Exporters, and factory.

Variable Documentation

◆ factory

RegisteredToolbarFactory cloud::factory
static
Initial value:
{
[](AudacityProject& project)
{ return ToolBar::Holder { safenew ShareAudioToolbar { project } }; }
}
#define safenew
Definition: MemoryX.h:10
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
wxWindowPtr< ToolBar > Holder
Definition: ToolBar.h:78

Definition at line 215 of file ShareAudioToolbar.cpp.

Referenced by ComputedPopupMenuTable< Derived, Base >::Append(), Registry::InlineGroupItem< VisitorType >::AppendOne(), AudioIoCallback::AudioIoCallback(), Sequence::Blockify(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Build(), CommandBuilder::BuildCommand(), ComputedPopupMenuTable< Derived, Base >::Computed(), PopupMenuTable::Computed(), AudioGraph::EffectStage::Create(), ToolManager::CreateWindows(), Sequence::Delete(), Sequence::DoAppend(), EffectBase::DoEffect(), BuiltinCommandsModule::DoRegistration(), BuiltinEffectsModule::DoRegistration(), Exporter::Exporter(), GStreamerImportPlugin::GetSupportedExtensions(), GStreamerAutoplugSelectCallback(), Sequence::HandleXMLTag(), PluginManager::Initialize(), Sequence::InsertSilence(), VST3::Hosting::anonymous_namespace{module_linux.cpp}::LinuxModule::load(), VST3::Hosting::anonymous_namespace{module_win32.cpp}::Win32Module::load(), anonymous_namespace{EffectStage.cpp}::MakeInstances(), SampleBlockFactory::New(), EffectUIHost::OnMenu(), PrefsDialog::PrefsDialog(), PerTrackEffect::ProcessPass(), PerTrackEffect::ProcessTrack(), ProjectFramePlacement(), EffectManager::PromptUser(), RegisterCloudExporter(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::RegisteredFactory::RegisteredFactory(), AudioIOExt::RegisteredFactory::RegisteredFactory(), Sequence::SetSamples(), EffectUIServices::ShowHostInterface(), NyquistEffect::ShowHostInterface(), WaveClip::WaveClip(), VST3::Hosting::anonymous_namespace{module_linux.cpp}::LinuxModule::~LinuxModule(), and VST3::Hosting::anonymous_namespace{module_win32.cpp}::Win32Module::~Win32Module().