mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
This implements #3319 by allowing users to "listen" to a channel they have not joined. Doing so will place a "listener proxy" (in other software this is sometimes known as a "phantom") in that channel which will look like a normal user except that it'll have the same name as the user listening to that channel and an ear-icon instead of the normal avatar-icon. It will also always show a muted-icon next to it. If a listener proxy is in a channel, the server will route all audio packets from that channel to the user the proxy belongs to (as if that user was in the channel). Note though that the opposite of this is not true: The users in the channel will not hear audio from the listening user unless that user decides to join the channel. Furthermore it is possible to set a local volume adjustment for each individual proxy that will be applied to all audio that is received through it.
57 lines
1.1 KiB
C++
57 lines
1.1 KiB
C++
// Copyright 2005-2020 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_USER_H_
|
|
#define MUMBLE_USER_H_
|
|
|
|
#ifndef Q_MOC_RUN
|
|
# include <boost/optional.hpp>
|
|
#endif
|
|
|
|
#include <QtCore/QByteArray>
|
|
#include <QtCore/QDateTime>
|
|
#include <QtCore/QString>
|
|
#include <QtCore/QList>
|
|
|
|
class Channel;
|
|
|
|
class User {
|
|
private:
|
|
Q_DISABLE_COPY(User)
|
|
|
|
public:
|
|
unsigned int uiSession;
|
|
int iId;
|
|
QString qsName;
|
|
QString qsComment;
|
|
QByteArray qbaCommentHash;
|
|
QString qsHash;
|
|
bool bMute, bDeaf, bSuppress;
|
|
bool bSelfMute, bSelfDeaf;
|
|
bool bPrioritySpeaker;
|
|
bool bRecording;
|
|
Channel *cChannel;
|
|
QByteArray qbaTexture;
|
|
QByteArray qbaTextureHash;
|
|
|
|
User();
|
|
virtual ~User() {};
|
|
|
|
static bool lessThan(const User *, const User *);
|
|
};
|
|
|
|
// for last seen
|
|
struct UserInfo {
|
|
int user_id;
|
|
QString name;
|
|
boost::optional<int> last_channel;
|
|
QDateTime last_active;
|
|
|
|
UserInfo() : user_id(-1) {}
|
|
UserInfo(int id, QString uname) : user_id(id), name(uname) {}
|
|
};
|
|
|
|
#endif
|