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";
        }
 internal _DvContentDirectory(DvContentDirectory n)
 {
     Outer = n;
     S = BuildUPnPService();
 }
 public void ContentDirectory_GetTransferProgress(System.UInt32 TransferID, out DvContentDirectory.Enum_A_ARG_TYPE_TransferStatus TransferStatus, out System.String TransferLength, out System.String TransferTotal)
 {
     TransferStatus = DvContentDirectory.Enum_A_ARG_TYPE_TransferStatus.COMPLETED;
     TransferLength = "Sample String";
     TransferTotal = "Sample String";
     Console.WriteLine("ContentDirectory_GetTransferProgress(" + TransferID.ToString() + ")");
 }
 public void ContentDirectory_Browse(System.String ObjectID, DvContentDirectory.Enum_A_ARG_TYPE_BrowseFlag BrowseFlag, System.String Filter, System.UInt32 StartingIndex, System.UInt32 RequestedCount, System.String SortCriteria, out System.String Result, out System.UInt32 NumberReturned, out System.UInt32 TotalMatches, out System.UInt32 UpdateID)
 {
     Result = "Noget nyt";
     NumberReturned = 1;
     TotalMatches = 2;
     UpdateID = 3;
     Console.WriteLine("ContentDirectory_Browse(" + ObjectID.ToString() + BrowseFlag.ToString() + Filter.ToString() + StartingIndex.ToString() + RequestedCount.ToString() + SortCriteria.ToString() + ")");
 }