コード例 #1
0
ファイル: Boxes.cs プロジェクト: daviddw/oss-public
        public Boxes(Helper aHelper, EventServerUpnp aEventServer, ISsdpNotifyProvider aSsdpNotify, bool aDiscoverProxyDevices)
        {
            iLock           = new object();
            iHelper         = aHelper;
            iEventServer    = aEventServer;
            iListenerNotify = aSsdpNotify;
            iTree           = new Tree(aHelper);

            //listen to the volkano service
            iDeviceListVolkano = new DeviceListUpnp(ServiceVolkano.ServiceType(), iListenerNotify);
            iDeviceListVolkano.EventDeviceAdded   += VolkanoAddedHandler;
            iDeviceListVolkano.EventDeviceRemoved += VolkanoRemovedHandler;

            //listen to the proxy service
            if (aDiscoverProxyDevices)
            {
                iDeviceListProxy = new DeviceListUpnp(ServiceProxy.ServiceType(), iListenerNotify);
                iDeviceListProxy.EventDeviceAdded   += ProxyAddedHandler;
                iDeviceListProxy.EventDeviceRemoved += ProxyRemovedHandler;
            }

            // Configure Service Point Manager
            ServicePointManager.DefaultConnectionLimit = 50;
            ServicePointManager.Expect100Continue      = false;
            ServicePointManager.UseNagleAlgorithm      = false;
        }
コード例 #2
0
        public ModelSenders(ISsdpNotifyProvider aListenerNotify, IEventUpnpProvider aEventServer)
        {
            iOpen        = false;
            iEventServer = aEventServer;

            iPendingSenderList = new Dictionary <string, ModelSender>();
            iEnabledSenderList = new List <IModelSender>();
            iSenderList        = new Dictionary <string, ModelSender>();
            iSenders           = new Senders(aListenerNotify);

            iLock = new object();
        }
コード例 #3
0
ファイル: PlaylistManager.cs プロジェクト: daviddw/oss-public
        public PlaylistManagers(ISsdpNotifyProvider aListenerNotify)
        {
            // create discovery system

            iDeviceListPlaylistManager = new DeviceListUpnp(ServicePlaylistManager.ServiceType(), aListenerNotify);
            iDeviceListPlaylistManager.EventDeviceAdded   += PlaylistManagerAdded;
            iDeviceListPlaylistManager.EventDeviceRemoved += PlaylistManagerRemoved;

            iLock             = new object();
            iJobList          = new List <IJob>();
            iJobReady         = new ManualResetEvent(false);
            iPlaylistManagers = new Dictionary <Device, PlaylistManager>();
        }
コード例 #4
0
ファイル: House2.cs プロジェクト: daviddw/oss-public
        public House(ISsdpNotifyProvider aListenerNotify, IEventUpnpProvider aEventServer, IModelFactory aModelFactory)
        {
            iModelFactory = aModelFactory;
            iEventServer  = aEventServer;

            iMutex = new Mutex();

            Linn.Topology.Layer0.IStack layer0 = new Linn.Topology.Layer0.Stack(aListenerNotify);
            iLayer1 = new Linn.Topology.Layer1.Stack(layer0, iEventServer);

            iLayer1.EventGroupAdded   += GroupAdded;
            iLayer1.EventGroupRemoved += GroupRemoved;

            iRoomList = new SortedList <string, Room>();
        }
コード例 #5
0
ファイル: MultipusSenders.cs プロジェクト: daviddw/Kinsky
        public Senders(ISsdpNotifyProvider aListenerNotify)
        {
            // create discovery system

            iDeviceListSender = new DeviceListUpnp(ServiceSender.ServiceType(), aListenerNotify);
            iDeviceListSender.EventDeviceAdded   += SenderAdded;
            iDeviceListSender.EventDeviceRemoved += SenderRemoved;

            iMutex    = new Mutex();
            iJobList  = new List <IJob>();
            iJobReady = new ManualResetEvent(false);
            iDevices  = new Dictionary <string, Device>();
            iLock     = new object();
            iOpen     = false;
        }
コード例 #6
0
ファイル: House0.cs プロジェクト: daviddw/oss-public
        public Stack(ISsdpNotifyProvider aListenerNotify)
        {
            // create discovery system

            iDeviceListProduct = new DeviceListUpnp(ServiceProduct.ServiceType(), aListenerNotify);
            iDeviceListProduct.EventDeviceAdded   += ProductAdded;
            iDeviceListProduct.EventDeviceRemoved += ProductRemoved;

            iDeviceListUpnp = new DeviceListUpnp(ServiceAVTransport.ServiceType(), aListenerNotify);
            iDeviceListUpnp.EventDeviceAdded   += UpnpAdded;
            iDeviceListUpnp.EventDeviceRemoved += UpnpRemoved;

            iMutex    = new Mutex();
            iJobList  = new List <IJob>();
            iJobReady = new ManualResetEvent(false);
        }
コード例 #7
0
ファイル: Library.cs プロジェクト: daviddw/oss-public
        public Library(ISsdpNotifyProvider aListenerNotify)
        {
            // create discovery system

            iDeviceListContentDirectory = new DeviceListUpnp(ServiceContentDirectory.ServiceType(), aListenerNotify);
            iDeviceListContentDirectory.EventDeviceAdded   += ContentDirectoryAdded;
            iDeviceListContentDirectory.EventDeviceRemoved += ContentDirectoryRemoved;

            iMutex    = new Mutex();
            iJobList  = new List <IJob>();
            iJobReady = new ManualResetEvent(false);

            iCloudServers = new Dictionary <string, Device>();
            iMediaServers = new Dictionary <Device, MediaServer>();
            //iCloudServers.Add("http://89.238.133.245:26125/DeviceDescription.xml", new DeviceUpnp("http://89.238.133.245:26125/DeviceDescription.xml"));
        }
コード例 #8
0
ファイル: ModelLibrary.cs プロジェクト: daviddw/Kinsky
        public ModelLibrary(ISsdpNotifyProvider aListenerNotify, IEventUpnpProvider aEventServer)
        {
            iUpdateId = 0;
            iMutex    = new Mutex(false);

            iLibrary = new Linn.Topology.Library(aListenerNotify);

            iEventServer = aEventServer;

            iMediaServerByUdn = new Dictionary <string, ModelMediaServer>();
            iMediaServerList  = new SortedList <string, MediaServer>();

            iHomeContainer            = new container();
            iHomeContainer.Title      = "Library";
            iHomeContainer.Id         = kLibraryId;
            iHomeContainer.ChildCount = 0;
            iHomeContainer.Restricted = true;
            iHomeContainer.Searchable = true;

            iLibrary.EventMediaServerAdded   += MediaServerAdded;
            iLibrary.EventMediaServerRemoved += MediaServerRemoved;
        }
コード例 #9
0
ファイル: Boxes.cs プロジェクト: daviddw/oss-public
 public Boxes(Helper aHelper, EventServerUpnp aEventServer, ISsdpNotifyProvider aSsdpNotify)
     : this(aHelper, aEventServer, aSsdpNotify, true)
 {
 }
コード例 #10
0
 public DeviceListUpnp(ServiceType aType, ISsdpNotifyProvider aListener)
     : this(aType)
 {
     aListener.Add(this);
 }
コード例 #11
0
ファイル: Form1.cs プロジェクト: daviddw/oss-public
 public AppSupport(AppKinskyWinForm aAppKinsky, IEventUpnpProvider aEventUpnpProvider, ISsdpNotifyProvider aSsdpNotifyProvider)
 {
     iAppKinsky          = aAppKinsky;
     iEventUpnpProvider  = aEventUpnpProvider;
     iSsdpNotifyProvider = aSsdpNotifyProvider;
 }