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

User.h « src - github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d9d895f7841ea0a467e02939d5a1564a2e2c9fb9 (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
49
50
51
52
53
54
// Copyright 2005-2017 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>

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