コード例 #1
0
        public ModelSourceMediaRendererDs(Source aSource)
            : base(aSource)
        {
            iSource    = aSource;
            iInserting = false;

            try
            {
                iServicePlaylist = new ServicePlaylist(iSource.Device, iSource.House.EventServer);
            }
            catch (ServiceException)
            {
                throw new ModelSourceException(301, "Service failure");
            }

            iActionPlay               = iServicePlaylist.CreateAsyncActionPlay();
            iActionPause              = iServicePlaylist.CreateAsyncActionPause();
            iActionStop               = iServicePlaylist.CreateAsyncActionStop();
            iActionNext               = iServicePlaylist.CreateAsyncActionNext();
            iActionPrevious           = iServicePlaylist.CreateAsyncActionPrevious();
            iActionSeekSecondAbsolute = iServicePlaylist.CreateAsyncActionSeekSecondAbsolute();
            iActionSeekIndex          = iServicePlaylist.CreateAsyncActionSeekIndex();
            iActionDelete             = iServicePlaylist.CreateAsyncActionDeleteId();
            iActionDeleteAll          = iServicePlaylist.CreateAsyncActionDeleteAll();
            iActionSetRepeat          = iServicePlaylist.CreateAsyncActionSetRepeat();
            iActionSetShuffle         = iServicePlaylist.CreateAsyncActionSetShuffle();

            iIdArray = new ModelIdArray(new PlaylistIdArray(iServicePlaylist));
        }