getMediaServerManager() 공개 정적인 메소드

public static getMediaServerManager ( ) : MediaServerManager
리턴 MediaServerManager
예제 #1
0
        protected virtual MediaItem_Playlist createPlaylistQueue(String _playlistName)
        {
            System.String      givenName, queueIdCreated, containerInfoMetaData;
            CpContentDirectory contentDirectory = Global.getMediaServerManager().getContentDirectory();

            contentDirectory.CreateQueueSync(_playlistName, PlaylistRootContainerId, out givenName, out queueIdCreated, out containerInfoMetaData);

            UPNPMediaList dummyList = new UPNPMediaList();

            dummyList.createItemsFromMetaData(containerInfoMetaData);
            MediaItem_Playlist mediaItem = (MediaItem_Playlist)dummyList.list[0];

            /*Regex regex = new Regex(@"<dc:title>(?<command>.+)</dc:title>");
             * Match match = regex.Match(containerInfoMetaData);
             * if (match.Success)
             * {
             *  givenName = match.Groups["command"].Value;
             * }*/

            if (playlistCreated != null)
            {
                playlistCreated(givenName);
            }

            return(mediaItem);
        }
예제 #2
0
        public String getMetaDataForObjectId(String _objectId)
        {
            uint   dummy;
            String metaData;

            Global.getMediaServerManager().getContentDirectory().BrowseSyncMeta(_objectId, "*", 0, 0, "", out metaData, out dummy, out dummy, out dummy);
            return(metaData);
        }
예제 #3
0
        public void deletePlaylist(String _playlistObjectId)
        {
            CpContentDirectory contentDirectory = Global.getMediaServerManager().getContentDirectory();

            contentDirectory.DestroyObjectSync(_playlistObjectId);
            if (playlistDeleted != null)
            {
                playlistDeleted(_playlistObjectId);
            }
        }
예제 #4
0
        public void renamePlaylist(String _playlistObjectId, String _desiredName)
        {
            String             givenName;
            CpContentDirectory contentDirectory = Global.getMediaServerManager().getContentDirectory();

            contentDirectory.RenameQueueSync(_playlistObjectId, _desiredName, out givenName);
            if (playlistRenamed != null)
            {
                playlistRenamed(_playlistObjectId, givenName);
            }
        }
예제 #5
0
        public void dropRoomFromZone(String _roomUDN)
        {
            Dictionary <String, String> dropRoomJobParms = new Dictionary <String, String>();
            string dropRoomJobRequestUri = Global.getMediaServerManager().mediaServerRequestUriBase + dropRoomJobUri;

            if (!String.IsNullOrEmpty(_roomUDN))
            {
                dropRoomJobParms.Add("roomUDN", _roomUDN);
            }

            webRequestHelper.httpPostRequest(dropRoomJobRequestUri, dropRoomJobParms, null);
        }
예제 #6
0
        public void connectRoomToZone(String _roomUDN, String _zoneUDN = "")
        {
            Dictionary <String, String> connectRoomToZoneParms = new Dictionary <String, String>();
            string connectRoomToZoneRequestUri = Global.getMediaServerManager().mediaServerRequestUriBase + connectRoomToZoneUri;

            if (!String.IsNullOrEmpty(_roomUDN))
            {
                connectRoomToZoneParms.Add("roomUDN", _roomUDN);
            }
            if (!String.IsNullOrEmpty(_zoneUDN))
            {
                connectRoomToZoneParms.Add("zoneUDN", _zoneUDN);
            }

            webRequestHelper.httpPostRequest(connectRoomToZoneRequestUri, connectRoomToZoneParms, null);
        }
예제 #7
0
        public void retrieveZones(String _updateId = "")
        {
            Dictionary <String, String> retrieveZonesParms = null;
            string retrieveZonesRequestUri = Global.getMediaServerManager().mediaServerRequestUriBase + retrieveZonesUri;

            this.writeLog(LogType.Info, String.Format("Starte Zonen Request mit updateId: '{0}'", _updateId));

            // set parameters for "long polling"
            if (!String.IsNullOrEmpty(_updateId))
            {
                retrieveZonesParms = new Dictionary <String, String>();
                retrieveZonesParms.Add("updateId", _updateId);
            }

            webRequestHelper.httpPostRequestAsync(retrieveZonesRequestUri, null, retrieveZonesParms, retrieveZonesResponseSink);
        }
예제 #8
0
 public UPNPMediaList(String _listId = "")
     : base(_listId)
 {
     contentDirectory = Global.getMediaServerManager().getContentDirectory();
 }