示例#1
0
        /// <summary>
        ///     Executes the SetMute action.
        /// </summary>
        /// <param name="instanceId">In value for the InstanceID action parameter.</param>
        /// <param name="channel">In value for the Channel action parameter.</param>
        /// <param name="desiredMute">In value for the DesiredMute action parameter.</param>
        public async Task SetMute(UInt32 instanceId, AargtypeMuteChannelEnum channel, Boolean desiredMute)
        {
            var loIn = new object[3];

            loIn[0] = instanceId;
            loIn[1] = RenderingControlExtensions.ToStringAargtypeMuteChannel(channel);
            loIn[2] = desiredMute;
            var action = new SoapAction
            {
                ArgNames           = new[] { "InstanceID", "Channel", "DesiredMute" },
                Name               = CsActionSetMute,
                ExpectedReplyCount = 0
            };

            await InvokeActionAsync(action, loIn);
        }
示例#2
0
        /// <summary>
        ///     Executes the GetMute action.
        /// </summary>
        /// <param name="instanceId">In value for the InstanceID action parameter.</param>
        /// <param name="channel">In value for the Channel action parameter.</param>
        /// <returns>Out value for the CurrentMute action parameter.</returns>
        public async Task <ActionResult> GetMute(UInt32 instanceId, AargtypeMuteChannelEnum channel)
        {
            var loIn = new object[2];

            loIn[0] = instanceId;
            loIn[1] = RenderingControlExtensions.ToStringAargtypeMuteChannel(channel);

            var action = new SoapAction
            {
                ArgNames           = new[] { "InstanceID", "Channel" },
                Name               = CsActionGetMute,
                ExpectedReplyCount = 1
            };
            SoapActionResult result = await InvokeActionAsync(action, loIn);

            // TODO: check for execption
            return(new ActionResult(result.XElement));
        }
示例#3
0
        /// <summary>
        ///     Gets the string value for the AARGTYPEMuteChannel state var from its enumeration value.
        /// </summary>
        /// <param name="value">The enumeration value to get the string value for.</param>
        /// <returns>The string value for the enumeration, or string.empty if AARGTYPEMuteChannelEnum.Invalid or out of range.</returns>
        public static string ToStringAargtypeMuteChannel(AargtypeMuteChannelEnum value)
        {
            switch (value)
            {
            case AargtypeMuteChannelEnum.Master:
                return(CsAllowedValAargtypeMuteChannelMaster);

            case AargtypeMuteChannelEnum.Lf:
                return(CsAllowedValAargtypeMuteChannelLf);

            case AargtypeMuteChannelEnum.Rf:
                return(CsAllowedValAargtypeMuteChannelRf);

            case AargtypeMuteChannelEnum.SpeakerOnly:
                return(CsAllowedValAargtypeMuteChannelSpeakerOnly);

            default:
                return(String.Empty);
            }
        }