public void linkRoomRendererToRoom(RendererRoom _roomRenderer, Boolean _unlink = false, Boolean _crossLink = true) { Room room; ZoneManager zoneManager = Global.getZoneManager(); // the renderer id is given by the xml we get from the zoneInformation room = zoneManager.getRoomByRendererUDN(_roomRenderer.getRendererObject().UniqueDeviceName); if (room != null) { if (_unlink) { room.rendererUDN = String.Empty; } else { room.rendererUDN = _roomRenderer.udn; } room.rendererLinked(); //zoneManager.updateRoomsValue(room); if (_crossLink) { zoneManager.linkRoomToRoomRenderer(room, _unlink, false); } if (_unlink == true) { this.writeLog(LogType.Info, String.Format("Renderer '{1}' wurde von Raum '{0}' entfernt", room.name, _roomRenderer.udn)); } else { this.writeLog(LogType.Info, String.Format("Renderer '{1}' wurde zu Raum '{0}' zugeordnet", room.name, _roomRenderer.udn)); } } else { this.writeLog(LogType.Warning, String.Format("Kein Raum für Renderer '{0}' für Zuordnung gefunden", _roomRenderer.getRendererObject().UniqueDeviceName)); } }
public void linkVirtualRendererToZone(RendererVirtual _virtualRenderer, Boolean _unlink = false, Boolean _crossLink = true) { Zone zone; ZoneManager zoneManager = Global.getZoneManager(); zone = zoneManager.getZoneUUID(_virtualRenderer.getRendererObject().UniqueDeviceName); if (zone != null) { if (_unlink) { zone.rendererUDN = String.Empty; } else { zone.rendererUDN = _virtualRenderer.udn; } zone.rendererLinked(); //zoneManager.updateZonesValue(zone); if (_crossLink) { zoneManager.linkZoneToVirtualRenderer(zone, _unlink, false); } if (_unlink == true) { this.writeLog(LogType.Info, String.Format("Renderer '{1}' wurde von Zone '{0}' entfernt", zone.udn, _virtualRenderer.udn)); } else { this.writeLog(LogType.Info, String.Format("Renderer '{1}' wurde zu Zone '{0}' zugeordnet", zone.udn, _virtualRenderer.udn)); } } else { this.writeLog(LogType.Warning, String.Format("Keine Zone für virtuellen Renderer '{0}' für Zuordnung gefunden", _virtualRenderer.getRendererObject().UniqueDeviceName)); } }
public Controller(NetworkConnectInfo _networkConnectionInfo) { logWriter = Global.getLogWriter(); logWriter.setLogLevel(LogType.Error); this.writeLog(LogType.Info, "Starte Applikation Raumwiese"); // use OhNet-Upnp Stack. This is the only one we may use for now which contains most methods we need. // the intelUPNP device Stack is not developed in final realease for the wrapper. You may debelop other Stacks upnpStack = new UNPN_OhNet(); upnpStack.setNetwork(_networkConnectionInfo); upnpStack.onStartingNetwork += upnpStack_onStartingNetworkSink; upnpStack.init(); // create zone, mediaServer and renderer managers zoneManager = new ZoneManager(upnpStack); mediaServerManager = new MediaServerManager(upnpStack); rendererManager = new RendererManager(upnpStack); configManager = new ConfigManager(upnpStack); zoneTitleListManager = new ZoneTitleListManager(upnpStack); contentBrowser = new ContentDirectoryBrowserMulti("", upnpStack); playlistBrowser = new PlaylistBrowser(upnpStack); // create data cache for images imageDataCache = new ImageDataCache(); // set Managers global. Global.setMediaServerManager(mediaServerManager); Global.setRendererManager(rendererManager); Global.setZoneManager(zoneManager); Global.setConfigManager(configManager); Global.setImageDataCache(imageDataCache); Global.setZoneTitleListManager(zoneTitleListManager); Global.setContentBrowser(contentBrowser); Global.setPlaylistBrowser(playlistBrowser); }
static public void setZoneManager(ZoneManager _zoneManager) { zoneManager = _zoneManager; }
public static void setZoneManager(ZoneManager _zoneManager) { zoneManager = _zoneManager; }