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 <string_view>
14
15#include <wx/string.h>
16
17#include "Observer.h"
18
19namespace cloud::audiocom
20{
23struct CLOUD_AUDIOCOM_API UserDataChanged final
24{
25};
26
28class CLOUD_AUDIOCOM_API UserService final :
29 public Observer::Publisher <UserDataChanged>
30{
31public:
33 void UpdateUserData();
35 void ClearUserData();
36
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 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:30
UserService & GetUserService()