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 GetUserId() const;
38 wxString GetUserSlug() const;
40 wxString GetDisplayName() const;
42 wxString GetAvatarPath() const;
43
44private:
45 void DownloadAvatar(std::string_view url);
46
47}; // class UserService
48
49CLOUD_AUDIOCOM_API UserService& GetUserService();
50} // 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()