/// <summary> /// Setup the actions to take place on various incoming API calls /// </summary> void SetupFunctions() { Parent.AddAction(@"/room/room1/promptForCode", new Action(() => EISC.PulseBool(BoolJoin.PromptForCode))); Parent.AddAction(@"/room/room1/clientJoined", new Action(() => EISC.PulseBool(BoolJoin.ClientJoined))); Parent.AddAction(@"/room/room1/status", new Action(SendFullStatus)); Parent.AddAction(@"/room/room1/source", new Action <SourceSelectMessageContent>(c => { EISC.SetString(StringJoin.SelectedSourceKey, c.SourceListItem); EISC.PulseBool(BoolJoin.SourceHasChanged); })); Parent.AddAction(@"/room/room1/defaultsource", new Action(() => EISC.PulseBool(BoolJoin.ActivityShare))); Parent.AddAction(@"/room/room1/activityPhone", new Action(() => EISC.PulseBool(BoolJoin.ActivityPhoneCall))); Parent.AddAction(@"/room/room1/activityVideo", new Action(() => EISC.PulseBool(BoolJoin.ActivityVideoCall))); Parent.AddAction(@"/room/room1/volumes/master/level", new Action <ushort>(u => EISC.SetUshort(UshortJoin.MasterVolumeLevel, u))); Parent.AddAction(@"/room/room1/volumes/master/muteToggle", new Action(() => EISC.PulseBool(BoolJoin.MasterVolumeIsMuted))); Parent.AddAction(@"/room/room1/volumes/master/privacyMuteToggle", new Action(() => EISC.PulseBool(BoolJoin.PrivacyMute))); // /xyzxyz/volumes/master/muteToggle ---> BoolInput[1] for (uint i = 2; i <= 7; i++) { var index = i; Parent.AddAction(string.Format(@"/room/room1/volumes/level-{0}/level", index), new Action <ushort>(u => EISC.SetUshort(index, u))); Parent.AddAction(string.Format(@"/room/room1/volumes/level-{0}/muteToggle", index), new Action(() => EISC.PulseBool(index))); } Parent.AddAction(@"/room/room1/shutdownStart", new Action(() => EISC.PulseBool(BoolJoin.ShutdownStart))); Parent.AddAction(@"/room/room1/shutdownEnd", new Action(() => EISC.PulseBool(BoolJoin.ShutdownEnd))); Parent.AddAction(@"/room/room1/shutdownCancel", new Action(() => EISC.PulseBool(BoolJoin.ShutdownCancel))); }
/// <summary> /// Setup the actions to take place on various incoming API calls /// </summary> void SetupFunctions() { Parent.AddAction(@"/room/room1/promptForCode", new Action(() => EISC.PulseBool(JoinMap.PromptForCode.JoinNumber))); Parent.AddAction(@"/room/room1/clientJoined", new Action(() => EISC.PulseBool(JoinMap.ClientJoined.JoinNumber))); Parent.AddAction(@"/room/room1/status", new Action(SendFullStatus)); Parent.AddAction(@"/room/room1/source", new Action <SourceSelectMessageContent>(c => { EISC.SetString(JoinMap.CurrentSourceKey.JoinNumber, c.SourceListItem); EISC.PulseBool(JoinMap.SourceHasChanged.JoinNumber); })); Parent.AddAction(@"/room/room1/defaultsource", new Action(() => EISC.PulseBool(JoinMap.ActivityShare.JoinNumber))); Parent.AddAction(@"/room/room1/activityPhone", new Action(() => EISC.PulseBool(JoinMap.ActivityPhoneCall.JoinNumber))); Parent.AddAction(@"/room/room1/activityVideo", new Action(() => EISC.PulseBool(JoinMap.ActivityVideoCall.JoinNumber))); Parent.AddAction(@"/room/room1/volumes/master/level", new Action <ushort>(u => EISC.SetUshort(JoinMap.MasterVolume.JoinNumber, u))); Parent.AddAction(@"/room/room1/volumes/master/muteToggle", new Action(() => EISC.PulseBool(JoinMap.MasterVolume.JoinNumber))); Parent.AddAction(@"/room/room1/volumes/master/privacyMuteToggle", new Action(() => EISC.PulseBool(JoinMap.PrivacyMute.JoinNumber))); // /xyzxyz/volumes/master/muteToggle ---> BoolInput[1] var volumeStart = JoinMap.VolumeJoinStart.JoinNumber; var volumeEnd = JoinMap.VolumeJoinStart.JoinNumber + JoinMap.VolumeJoinStart.JoinSpan; for (uint i = volumeStart; i <= volumeEnd; i++) { var index = i; Parent.AddAction(string.Format(@"/room/room1/volumes/level-{0}/level", index), new Action <ushort>(u => EISC.SetUshort(index, u))); Parent.AddAction(string.Format(@"/room/room1/volumes/level-{0}/muteToggle", index), new Action(() => EISC.PulseBool(index))); } Parent.AddAction(@"/room/room1/shutdownStart", new Action(() => EISC.PulseBool(JoinMap.ShutdownStart.JoinNumber))); Parent.AddAction(@"/room/room1/shutdownEnd", new Action(() => EISC.PulseBool(JoinMap.ShutdownEnd.JoinNumber))); Parent.AddAction(@"/room/room1/shutdownCancel", new Action(() => EISC.PulseBool(JoinMap.ShutdownCancel.JoinNumber))); }