getMediaServerManager() public static method

public static getMediaServerManager ( ) : MediaServerManager
return MediaServerManager
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
        public void deletePlaylist(String _playlistObjectId)
        {
            CpContentDirectory contentDirectory = Global.getMediaServerManager().getContentDirectory();

            contentDirectory.DestroyObjectSync(_playlistObjectId);
            if (playlistDeleted != null)
            {
                playlistDeleted(_playlistObjectId);
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 8
0
 public UPNPMediaList(String _listId = "")
     : base(_listId)
 {
     contentDirectory = Global.getMediaServerManager().getContentDirectory();
 }