コード例 #1
0
        public static WebChannelState ToWebChannelState(this TvControl.ChannelState state, int channelId)
        {
            WebChannelState newState = new WebChannelState();

            newState.ChannelId = channelId;
            switch (state)
            {
            case TvControl.ChannelState.tunable:
                newState.State = Interfaces.ChannelState.Tunable;
                break;

            case TvControl.ChannelState.timeshifting:
                newState.State = Interfaces.ChannelState.Timeshifting;
                break;

            case TvControl.ChannelState.recording:
                newState.State = Interfaces.ChannelState.Recording;
                break;

            case TvControl.ChannelState.nottunable:
                newState.State = Interfaces.ChannelState.NotTunable;
                break;

            default:
                newState.State = Interfaces.ChannelState.Unknown;
                break;
            }

            return(newState);
        }
コード例 #2
0
        public WebChannelState GetChannelState(int channelId, string userName)
        {
            IUser user = new User();

            user.Name = userName;
            TvControl.ChannelState state = _tvControl.GetChannelState(channelId, user);
            Log.Trace("ChannelId: " + channelId + ", State: " + state.ToString());
            return(state.ToWebChannelState(channelId));
        }
コード例 #3
0
 public WebChannelState GetChannelState(int channelId, string userName)
 {
     TvControl.ChannelState state = _tvControl.GetChannelState(channelId, GetUserByUserName(userName, true));
     Log.Trace("ChannelId: " + channelId + ", State: " + state.ToString());
     return(state.ToWebChannelState(channelId));
 }