Overte C++ Documentation
DiscordRichPresence.h
1 //
2 // DiscordRichPresence.h
3 // interface/src
4 //
5 // Created by Julian Groß on 30th October 2023.
6 // Copyright 2023 Overte e.V.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 // SPDX-License-Identifier: Apache-2.0
11 //
12 
13 #ifndef overte_DiscordPresence_h
14 #define overte_DiscordPresence_h
15 
16 #include "discord_rpc.h"
17 #include <QtCore/QLoggingCategory>
18 #include <QtCore/QObject>
19 
20 Q_DECLARE_LOGGING_CATEGORY(discord_rich_presence)
21 
22 class DiscordPresence : public QObject {
23  Q_OBJECT
24 public:
25  DiscordPresence();
26  static void shutdown();
27 
28 public slots:
29  void domainChanged();
30  void vrChanged(bool isHMDMode);
31 
32 private:
33  QString currentDomainID;
34  DiscordRichPresence discordPresence{};
35 };
36 
37 #endif