Skip to content
Permalink
Browse files

Merge PR #2555: Added a DBus method for getting a list of currently t…

…alking users.
  • Loading branch information...
mkrautz committed Sep 19, 2016
2 parents 4009ea3 + a528343 commit f3a1a6c774066ac4652c3b6bec75b00393f2f72b
Showing with 13 additions and 0 deletions.
  1. +12 −0 src/mumble/DBus.cpp
  2. +1 −0 src/mumble/DBus.h
@@ -61,6 +61,18 @@ void MumbleDBus::getCurrentUrl(const QDBusMessage &msg) {
QDBusConnection::sessionBus().send(msg.createReply(QString::fromLatin1(u.toEncoded())));
}

void MumbleDBus::getTalkingUsers(const QDBusMessage &msg) {
if (!g.sh || !g.sh->isRunning() || ! g.uiSession) {
QDBusConnection::sessionBus().send(msg.createErrorReply(QLatin1String("net.sourceforge.mumble.Error.connection"), QLatin1String("Not connected")));
return;
}
QStringList names;
foreach(ClientUser *cu, ClientUser::getTalking()) {
names.append(cu->qsName);
}
QDBusConnection::sessionBus().send(msg.createReply(names));
}

void MumbleDBus::focus() {
g.mw->show();
g.mw->raise();
@@ -22,6 +22,7 @@ class MumbleDBus : public QDBusAbstractAdaptor {
public slots:
void openUrl(const QString &url, const QDBusMessage &);
void getCurrentUrl(const QDBusMessage &);
void getTalkingUsers(const QDBusMessage &);
void focus();
void setSelfMuted(bool mute);
void setSelfDeaf(bool deafen);

0 comments on commit f3a1a6c

Please sign in to comment.
You can’t perform that action at this time.