Audacity 3.2.0
LinkUrlHandler.cpp
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*!********************************************************************
3
4 Audacity: A Digital Audio Editor
5
6 LinkUrlHandler.cpp
7
8 Dmitry Vedenko
9
10**********************************************************************/
11
12#include "URLSchemesRegistry.h"
13
16#include "ExportUtils.h"
17#include "OAuthService.h"
18
19namespace
20{
22 [](URLschemeHandlerMessage message)
23 {
24 using namespace audacity::cloud::audiocom;
25
26 if (GetOAuthService().HandleLinkURI(
27 message.url,
28 // TODO Is this correct?
30 return;
31
32 if (sync::HandleProjectLink(message.url))
33 return;
34
35 if (sync::HandleMixdownLink(message.url))
36 return;
37 });
38}
Subscription Subscribe(Callback callback)
Connect a callback to the Publisher; later-connected are called earlier.
Definition: Observer.h:199
static URLSchemesRegistry & Get()
Retrieves the registry instance.
bool HandleProjectLink(std::string_view uri)
bool HandleMixdownLink(std::string_view uri)
OAuthService & GetOAuthService()
Returns the instance of the OAuthService.
A message that is invoked when a custom-scheme URL is passed to Audacity.