Example #1
0
 public MediaServer (string udn, string friendlyName, string manufacturer, string modelName, RootDeviceOptions options, ConnectionManager connectionManager, LocalContentDirectory contentDirectory)
 {
     if (connectionManager == null) throw new ArgumentNullException ("connnectionManager");
     if (contentDirectory == null) throw new ArgumentNullException ("contentDirectory");
     
     if (options == null) {
         options = new RootDeviceOptions ();
     }
     
     this.content_directory = contentDirectory;
     
     var connectionManagerService = new Service<ConnectionManager> (ConnectionManager.ServiceType, "urn:upnp-org:serviceId:ConnectionManager", connectionManager);
     var contentDirectoryService = new Service<LocalContentDirectory> (ContentDirectory.ServiceType, "urn:upnp-org:serviceId:ContentDirectory", contentDirectory);
     options.Services = Combine (new Service[] { connectionManagerService, contentDirectoryService }, options.Services);
     server = new Server (new Root (DeviceType, udn, friendlyName, manufacturer, modelName, options));
 }
Example #2
0
        public MediaServer(string udn, string friendlyName, string manufacturer, string modelName, RootDeviceOptions options, ConnectionManager connectionManager, LocalContentDirectory contentDirectory)
        {
            if (connectionManager == null)
            {
                throw new ArgumentNullException("connnectionManager");
            }
            if (contentDirectory == null)
            {
                throw new ArgumentNullException("contentDirectory");
            }

            if (options == null)
            {
                options = new RootDeviceOptions();
            }

            this.content_directory = contentDirectory;

            var connectionManagerService = new Service <ConnectionManager> (ConnectionManager.ServiceType, "urn:upnp-org:serviceId:ConnectionManager", connectionManager);
            var contentDirectoryService  = new Service <LocalContentDirectory> (ContentDirectory.ServiceType, "urn:upnp-org:serviceId:ContentDirectory", contentDirectory);

            options.Services = Combine(new Service[] { connectionManagerService, contentDirectoryService }, options.Services);
            server           = new Server(new Root(DeviceType, udn, friendlyName, manufacturer, modelName, options));
        }
Example #3
0
 public DummyRoot (DeviceType type, string udn, string friendlyName, string manufacturer, string modelName, RootDeviceOptions options)
     : base (type, udn, friendlyName, manufacturer, modelName, options)
 {
 }
Example #4
0
 public DummyRoot(DeviceType type, string udn, string friendlyName, string manufacturer, string modelName, RootDeviceOptions options)
     : base(type, udn, friendlyName, manufacturer, modelName, options)
 {
 }