Inheritance: RaumfeldNET.Base.BaseManager
コード例 #1
0
        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));
            }
        }
コード例 #2
0
        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));
            }
        }
コード例 #3
0
ファイル: Controller.cs プロジェクト: woweidmann/raumwiese
        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);
        }
コード例 #4
0
ファイル: Controller.cs プロジェクト: stoennies/raumwiese
        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);
        }
コード例 #5
0
 static public void setZoneManager(ZoneManager _zoneManager)
 {
     zoneManager = _zoneManager;
 }
コード例 #6
0
ファイル: Global.cs プロジェクト: stoennies/raumwiese
 public static void setZoneManager(ZoneManager _zoneManager)
 {
     zoneManager = _zoneManager;
 }