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
21 connect(nodeList.data(), &NodeList::usernameFromIDReply, this, &UsersScriptingInterface::usernameFromIDReply);21 connect(nodeList.data(), &NodeList::usernameFromIDReply, this, &UsersScriptingInterface::usernameFromIDReply);
22 connect(nodeList.data(), &NodeList::ignoredNode, this, &UsersScriptingInterface::ignoredNode);22 connect(nodeList.data(), &NodeList::ignoredNode, this, &UsersScriptingInterface::ignoredNode);
23 connect(nodeList.data(), &NodeList::unignoredNode, this, &UsersScriptingInterface::unignoredNode);23 connect(nodeList.data(), &NodeList::unignoredNode, this, &UsersScriptingInterface::unignoredNode);
24 connect(nodeList.data(), &NodeList::personalMuteStatusReply, this, &UsersScriptingInterface::personalMuteStatusReply);
24}25}
25 26
26void UsersScriptingInterface::ignore(const QUuid& nodeID) {27void UsersScriptingInterface::ignore(const QUuid& nodeID) {
@@ -33,6 +34,17 @@ void UsersScriptingInterface::unignore(const QUuid& nodeID) { · 6 unmodified lines
33 DependencyManager::get<NodeList>()->unignoreNodeBySessionID(nodeID);34 DependencyManager::get<NodeList>()->unignoreNodeBySessionID(nodeID);
34}35}
35 36
37void 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
43void 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
36 48
37void UsersScriptingInterface::kick(const QUuid& nodeID) {49void UsersScriptingInterface::kick(const QUuid& nodeID) {
38 // ask the NodeList to kick the user with the given session ID50 // ask the NodeList to kick the user with the given session ID