Audacity 3.2.0
UserService.h
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 UserService.h
7
8 Dmitry Vedenko
9
10**********************************************************************/
11#pragma once
12
13#include <wx/string.h>
14
15#include "Observer.h"
16
18{
21struct CLOUD_AUDIOCOM_API UserDataChanged final
22{
23};
24
26class CLOUD_AUDIOCOM_API UserService final :
27 public Observer::Publisher <UserDataChanged>
28{
29public:
31 void UpdateUserData();
33 void ClearUserData();
34
36 wxString GetUserSlug() const;
38 wxString GetDisplayName() const;
40 wxString GetAvatarPath() const;
41
42private:
43 void DownloadAvatar(std::string_view url);
44
45}; // class UserService
46
47CLOUD_AUDIOCOM_API UserService& GetUserService();
48} // namespace audacity::cloud::audiocom
An object that sends messages to an open-ended list of subscribed callbacks.
Definition: Observer.h:108
Service for providing information about the user profile.
Definition: UserService.h:28
UserService & GetUserService()