Welcome to mirror list, hosted at ThFree Co, Russian Federation.

DBus.h « mumble « src - github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 47411567c588038a25de7761883230ab2d4fa429 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright 2007-2021 The Mumble Developers. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file at the root of the
// Mumble source tree or at <https://www.mumble.info/LICENSE>.

#ifndef MUMBLE_MUMBLE_DBUS_H_
#define MUMBLE_MUMBLE_DBUS_H_

#include <QtDBus/QDBusAbstractAdaptor>

class QDBusMessage;

class MumbleDBus : public QDBusAbstractAdaptor {
private:
	Q_OBJECT
	Q_CLASSINFO("D-Bus Interface", "net.sourceforge.mumble.Mumble")
	Q_DISABLE_COPY(MumbleDBus)
	Q_PROPERTY(bool mute READ isSelfMuted WRITE setSelfMuted)
	Q_PROPERTY(bool deaf READ isSelfDeaf WRITE setSelfDeaf)
public:
	MumbleDBus(QObject *parent);
public slots:
	void openUrl(const QString &url, const QDBusMessage &);
	void getCurrentUrl(const QDBusMessage &);
	void getTalkingUsers(const QDBusMessage &);
	void focus();

	/// Change when Mumble transmits voice.
	///
	/// @param mode The new transmit mode (0 = continous, 1 = voice activity, 2 = push-to-talk)
	void setTransmitMode(unsigned int mode, const QDBusMessage &);

	/// Get the current transmit mode.
	///
	/// @return The current transmit mode (0 = continous, 1 = voice activity, 2 = push-to-talk)
	unsigned int getTransmitMode();

	void toggleSelfMuted();
	void toggleSelfDeaf();
	void setSelfMuted(bool mute);
	void setSelfDeaf(bool deafen);
	bool isSelfMuted();
	bool isSelfDeaf();
	void startTalking();
	void stopTalking();
};

#endif