public SampleDevice()
        {
            device = UPnPDevice.CreateRootDevice(1800,1.0,"\\");

            device.FriendlyName = "Media Server (CASPER-LAPTOP)";
            device.Manufacturer = "OpenSource";
            device.ManufacturerURL = "";
            device.ModelName = "Media Server";
            device.ModelDescription = "Provides content through UPnP ContentDirectory service";
            device.ModelNumber = "0.765";
            device.HasPresentation = false;
            device.DeviceURN = "urn:schemas-upnp-org:device:MediaServer:1";

            DvConnectionManager ConnectionManager = new DvConnectionManager();

            ConnectionManager.External_GetCurrentConnectionIDs = ConnectionManager_GetCurrentConnectionIDs;
            ConnectionManager.External_GetCurrentConnectionInfo = ConnectionManager_GetCurrentConnectionInfo;
            //ConnectionManager.External_GetProtocolInfo = ConnectionManager_GetProtocolInfo;

            device.AddService(ConnectionManager);

            DvContentDirectory ContentDirectory = new DvContentDirectory();

            ContentDirectory.External_Browse = new OpenSource.DeviceBuilder.DvContentDirectory.Delegate_Browse(ContentDirectory_Browse);
            ContentDirectory.External_CreateObject = new OpenSource.DeviceBuilder.DvContentDirectory.Delegate_CreateObject(ContentDirectory_CreateObject);
            ContentDirectory.External_CreateReference = new OpenSource.DeviceBuilder.DvContentDirectory.Delegate_CreateReference(ContentDirectory_CreateReference);
            ContentDirectory.External_DeleteResource = new OpenSource.DeviceBuilder.DvContentDirectory.Delegate_DeleteResource(ContentDirectory_DeleteResource);
            ContentDirectory.External_DestroyObject = new OpenSource.DeviceBuilder.DvContentDirectory.Delegate_DestroyObject(ContentDirectory_DestroyObject);
            ContentDirectory.External_ExportResource = new OpenSource.DeviceBuilder.DvContentDirectory.Delegate_ExportResource(ContentDirectory_ExportResource);
            ContentDirectory.External_GetSearchCapabilities = new OpenSource.DeviceBuilder.DvContentDirectory.Delegate_GetSearchCapabilities(ContentDirectory_GetSearchCapabilities);
            ContentDirectory.External_GetSortCapabilities = new OpenSource.DeviceBuilder.DvContentDirectory.Delegate_GetSortCapabilities(ContentDirectory_GetSortCapabilities);
            ContentDirectory.External_GetSystemUpdateID = new OpenSource.DeviceBuilder.DvContentDirectory.Delegate_GetSystemUpdateID(ContentDirectory_GetSystemUpdateID);
            ContentDirectory.External_GetTransferProgress = new OpenSource.DeviceBuilder.DvContentDirectory.Delegate_GetTransferProgress(ContentDirectory_GetTransferProgress);
            ContentDirectory.External_ImportResource = new OpenSource.DeviceBuilder.DvContentDirectory.Delegate_ImportResource(ContentDirectory_ImportResource);
            ContentDirectory.External_Search = new OpenSource.DeviceBuilder.DvContentDirectory.Delegate_Search(ContentDirectory_Search);
            ContentDirectory.External_StopTransferResource = new OpenSource.DeviceBuilder.DvContentDirectory.Delegate_StopTransferResource(ContentDirectory_StopTransferResource);
            ContentDirectory.External_UpdateObject = new OpenSource.DeviceBuilder.DvContentDirectory.Delegate_UpdateObject(ContentDirectory_UpdateObject);

            device.AddService(ContentDirectory);

            // Setting the initial value of evented variables
            ConnectionManager.Evented_SourceProtocolInfo = "Sample String";
            ConnectionManager.Evented_SinkProtocolInfo = "Sample String";
            ConnectionManager.Evented_CurrentConnectionIDs = "Sample String";
            ContentDirectory.Evented_ContainerUpdateIDs = "Sample String";
            ContentDirectory.Evented_SystemUpdateID = 0;
            ContentDirectory.Evented_TransferIDs = "Sample String";
        }
        public SinkDevice()
        {
            //Creates root device
            device = UPnPDevice.CreateRootDevice(1800, 1.0 , "\\");

            //Device information:
            device.FriendlyName = "Caspers homemade Renderer";
            device.Manufacturer = "Awesome Casper";
            device.DeviceURN = "urn:schemas-upnp-org:device:MediaRenderer:1";

            //Create stacks
            DvAVTransport AVTransport = new DvAVTransport();
            DvConnectionManager connectionManager = new DvConnectionManager();
            DvRenderingControl renderingControl = new DvRenderingControl();

            //Add stacks to device (and network visibility)
            device.AddService(AVTransport);
            device.AddService(connectionManager);
            device.AddService(renderingControl);

            AVTransport.Evented_LastChange = "Sample string";
        }
 public void ConnectionManager_GetCurrentConnectionInfo(System.Int32 ConnectionID, out System.Int32 RcsID, out System.Int32 AVTransportID, out System.String ProtocolInfo, out System.String PeerConnectionManager, out System.Int32 PeerConnectionID, out DvConnectionManager.Enum_A_ARG_TYPE_Direction Direction, out DvConnectionManager.Enum_A_ARG_TYPE_ConnectionStatus Status)
 {
     RcsID = 0;
     AVTransportID = 0;
     ProtocolInfo = "Sample String";
     PeerConnectionManager = "Sample String";
     PeerConnectionID = 0;
     Direction = DvConnectionManager.Enum_A_ARG_TYPE_Direction.INPUT;
     Status = DvConnectionManager.Enum_A_ARG_TYPE_ConnectionStatus.OK;
     Console.WriteLine("ConnectionManager_GetCurrentConnectionInfo(" + ConnectionID.ToString() + ")");
 }
        public SampleDevice()
        {
            device = UPnPDevice.CreateRootDevice(1800,1.0,"\\");

            device.FriendlyName = "Media Renderer (Casper-laptop)";
            device.Manufacturer = "OpenSource";
            device.ManufacturerURL = "http://opentools.homeip.net/";
            device.ModelName = "AV Renderer";
            device.ModelDescription = "Media Renderer Device";
            device.HasPresentation = false;
            device.DeviceURN = "urn:schemas-upnp-org:device:MediaRenderer:1";
            OpenSource.DeviceBuilder.DvAVTransport AVTransport = new OpenSource.DeviceBuilder.DvAVTransport();
            AVTransport.External_GetCurrentTransportActions = new OpenSource.DeviceBuilder.DvAVTransport.Delegate_GetCurrentTransportActions(AVTransport_GetCurrentTransportActions);
            AVTransport.External_GetDeviceCapabilities = new OpenSource.DeviceBuilder.DvAVTransport.Delegate_GetDeviceCapabilities(AVTransport_GetDeviceCapabilities);
            AVTransport.External_GetMediaInfo = new OpenSource.DeviceBuilder.DvAVTransport.Delegate_GetMediaInfo(AVTransport_GetMediaInfo);
            AVTransport.External_GetPositionInfo = new OpenSource.DeviceBuilder.DvAVTransport.Delegate_GetPositionInfo(AVTransport_GetPositionInfo);
            AVTransport.External_GetTransportInfo = new OpenSource.DeviceBuilder.DvAVTransport.Delegate_GetTransportInfo(AVTransport_GetTransportInfo);
            AVTransport.External_GetTransportSettings = new OpenSource.DeviceBuilder.DvAVTransport.Delegate_GetTransportSettings(AVTransport_GetTransportSettings);
            AVTransport.External_Next = new OpenSource.DeviceBuilder.DvAVTransport.Delegate_Next(AVTransport_Next);
            AVTransport.External_Pause = new OpenSource.DeviceBuilder.DvAVTransport.Delegate_Pause(AVTransport_Pause);
            AVTransport.External_Play = new OpenSource.DeviceBuilder.DvAVTransport.Delegate_Play(AVTransport_Play);
            AVTransport.External_Previous = new OpenSource.DeviceBuilder.DvAVTransport.Delegate_Previous(AVTransport_Previous);
            AVTransport.External_Seek = new OpenSource.DeviceBuilder.DvAVTransport.Delegate_Seek(AVTransport_Seek);
            AVTransport.External_SetAVTransportURI = new OpenSource.DeviceBuilder.DvAVTransport.Delegate_SetAVTransportURI(AVTransport_SetAVTransportURI);
            AVTransport.External_SetPlayMode = new OpenSource.DeviceBuilder.DvAVTransport.Delegate_SetPlayMode(AVTransport_SetPlayMode);
            AVTransport.External_Stop = new OpenSource.DeviceBuilder.DvAVTransport.Delegate_Stop(AVTransport_Stop);
            device.AddService(AVTransport);
            OpenSource.DeviceBuilder.DvConnectionManager ConnectionManager = new OpenSource.DeviceBuilder.DvConnectionManager();
            ConnectionManager.External_GetCurrentConnectionIDs = new OpenSource.DeviceBuilder.DvConnectionManager.Delegate_GetCurrentConnectionIDs(ConnectionManager_GetCurrentConnectionIDs);
            ConnectionManager.External_GetCurrentConnectionInfo = new OpenSource.DeviceBuilder.DvConnectionManager.Delegate_GetCurrentConnectionInfo(ConnectionManager_GetCurrentConnectionInfo);
            ConnectionManager.External_GetProtocolInfo = new OpenSource.DeviceBuilder.DvConnectionManager.Delegate_GetProtocolInfo(ConnectionManager_GetProtocolInfo);
            device.AddService(ConnectionManager);
            OpenSource.DeviceBuilder.DvRenderingControl RenderingControl = new OpenSource.DeviceBuilder.DvRenderingControl();
            RenderingControl.External_GetBlueVideoBlackLevel = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetBlueVideoBlackLevel(RenderingControl_GetBlueVideoBlackLevel);
            RenderingControl.External_GetBlueVideoGain = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetBlueVideoGain(RenderingControl_GetBlueVideoGain);
            RenderingControl.External_GetBrightness = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetBrightness(RenderingControl_GetBrightness);
            RenderingControl.External_GetColorTemperature = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetColorTemperature(RenderingControl_GetColorTemperature);
            RenderingControl.External_GetContrast = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetContrast(RenderingControl_GetContrast);
            RenderingControl.External_GetGreenVideoBlackLevel = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetGreenVideoBlackLevel(RenderingControl_GetGreenVideoBlackLevel);
            RenderingControl.External_GetGreenVideoGain = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetGreenVideoGain(RenderingControl_GetGreenVideoGain);
            RenderingControl.External_GetHorizontalKeystone = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetHorizontalKeystone(RenderingControl_GetHorizontalKeystone);
            RenderingControl.External_GetLoudness = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetLoudness(RenderingControl_GetLoudness);
            RenderingControl.External_GetMute = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetMute(RenderingControl_GetMute);
            RenderingControl.External_GetRedVideoBlackLevel = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetRedVideoBlackLevel(RenderingControl_GetRedVideoBlackLevel);
            RenderingControl.External_GetRedVideoGain = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetRedVideoGain(RenderingControl_GetRedVideoGain);
            RenderingControl.External_GetSharpness = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetSharpness(RenderingControl_GetSharpness);
            RenderingControl.External_GetVerticalKeystone = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetVerticalKeystone(RenderingControl_GetVerticalKeystone);
            RenderingControl.External_GetVolume = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetVolume(RenderingControl_GetVolume);
            RenderingControl.External_GetVolumeDB = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetVolumeDB(RenderingControl_GetVolumeDB);
            RenderingControl.External_GetVolumeDBRange = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_GetVolumeDBRange(RenderingControl_GetVolumeDBRange);
            RenderingControl.External_ListPresets = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_ListPresets(RenderingControl_ListPresets);
            RenderingControl.External_SelectPreset = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SelectPreset(RenderingControl_SelectPreset);
            RenderingControl.External_SetBlueVideoBlackLevel = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetBlueVideoBlackLevel(RenderingControl_SetBlueVideoBlackLevel);
            RenderingControl.External_SetBlueVideoGain = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetBlueVideoGain(RenderingControl_SetBlueVideoGain);
            RenderingControl.External_SetBrightness = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetBrightness(RenderingControl_SetBrightness);
            RenderingControl.External_SetColorTemperature = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetColorTemperature(RenderingControl_SetColorTemperature);
            RenderingControl.External_SetContrast = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetContrast(RenderingControl_SetContrast);
            RenderingControl.External_SetGreenVideoBlackLevel = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetGreenVideoBlackLevel(RenderingControl_SetGreenVideoBlackLevel);
            RenderingControl.External_SetGreenVideoGain = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetGreenVideoGain(RenderingControl_SetGreenVideoGain);
            RenderingControl.External_SetHorizontalKeystone = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetHorizontalKeystone(RenderingControl_SetHorizontalKeystone);
            RenderingControl.External_SetLoudness = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetLoudness(RenderingControl_SetLoudness);
            RenderingControl.External_SetMute = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetMute(RenderingControl_SetMute);
            RenderingControl.External_SetRedVideoBlackLevel = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetRedVideoBlackLevel(RenderingControl_SetRedVideoBlackLevel);
            RenderingControl.External_SetRedVideoGain = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetRedVideoGain(RenderingControl_SetRedVideoGain);
            RenderingControl.External_SetSharpness = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetSharpness(RenderingControl_SetSharpness);
            RenderingControl.External_SetVerticalKeystone = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetVerticalKeystone(RenderingControl_SetVerticalKeystone);
            RenderingControl.External_SetVolume = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetVolume(RenderingControl_SetVolume);
            RenderingControl.External_SetVolumeDB = new OpenSource.DeviceBuilder.DvRenderingControl.Delegate_SetVolumeDB(RenderingControl_SetVolumeDB);
            device.AddService(RenderingControl);

            // Setting the initial value of evented variables
            AVTransport.Evented_LastChange = "Sample String";
            ConnectionManager.Evented_SourceProtocolInfo = "Sample String";
            ConnectionManager.Evented_SinkProtocolInfo = "Sample String";
            ConnectionManager.Evented_CurrentConnectionIDs = "Sample String";
            RenderingControl.Evented_LastChange = "Sample String";
        }
 internal _DvConnectionManager(DvConnectionManager n)
 {
     Outer = n;
     S = BuildUPnPService();
 }