History

First steps, holding off til Howard finishes

Zach Fox committed 9 years ago

Commit 46e8bf51 parent 800389c9 files · +178 −12Browse files

Showing the changes to libraries/script-engine/src/UsersScriptingInterface.cpp (1 of 9 files). Show all

Unified · Split

libraries/script-engine/src/UsersScriptingInterface.cpp+12−0
@@ -21,6 +21,7 @@ UsersScriptingInterface::UsersScriptingInterface() { · 20 unmodified lines
2121 connect(nodeList.data(), &NodeList::usernameFromIDReply, this, &UsersScriptingInterface::usernameFromIDReply);
2222 connect(nodeList.data(), &NodeList::ignoredNode, this, &UsersScriptingInterface::ignoredNode);
2323 connect(nodeList.data(), &NodeList::unignoredNode, this, &UsersScriptingInterface::unignoredNode);
24+ connect(nodeList.data(), &NodeList::personalMuteStatusReply, this, &UsersScriptingInterface::personalMuteStatusReply);
2425 }
2526
2627 void UsersScriptingInterface::ignore(const QUuid& nodeID) {
@@ -33,6 +34,17 @@ void UsersScriptingInterface::unignore(const QUuid& nodeID) { · 6 unmodified lines
3334 DependencyManager::get<NodeList>()->unignoreNodeBySessionID(nodeID);
3435 }
3536
37+void UsersScriptingInterface::personalMute(const QUuid& nodeID, bool enabled) {
38+ // ask the NodeList to mute the user with the given session ID
39+ // "Personal Mute" only applies one way and is not global
40+ DependencyManager::get<NodeList>()->personalMuteNodeBySessionID(nodeID, enabled);
41+}
42+
43+void UsersScriptingInterface::requestPersonalMuteStatus(const QUuid& nodeID) {
44+ // ask the Audio Mixer via the NodeList for the Personal Mute status associated with the given session ID
45+ DependencyManager::get<NodeList>()->requestPersonalMuteStatus(nodeID);
46+}
47+
3648
3749 void UsersScriptingInterface::kick(const QUuid& nodeID) {
3850 // ask the NodeList to kick the user with the given session ID