private static unsafe int DoStopTransferResource(IntPtr aPtr, uint aVersion, uint aTransferID)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgContentDirectory1 self = (DvServiceUpnpOrgContentDirectory1)gch.Target;

            self.StopTransferResource(aVersion, aTransferID);
            return(0);
        }
        private static unsafe int DoDeleteResource(IntPtr aPtr, uint aVersion, char *aResourceURI)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgContentDirectory1 self = (DvServiceUpnpOrgContentDirectory1)gch.Target;
            string resourceURI = Marshal.PtrToStringAnsi((IntPtr)aResourceURI);

            self.DeleteResource(aVersion, resourceURI);
            return(0);
        }
        private static unsafe int DoDestroyObject(IntPtr aPtr, uint aVersion, char *aObjectID)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgContentDirectory1 self = (DvServiceUpnpOrgContentDirectory1)gch.Target;
            string objectID = Marshal.PtrToStringAnsi((IntPtr)aObjectID);

            self.DestroyObject(aVersion, objectID);
            return(0);
        }
        private static unsafe int DoGetSystemUpdateID(IntPtr aPtr, uint aVersion, uint *aId)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgContentDirectory1 self = (DvServiceUpnpOrgContentDirectory1)gch.Target;
            uint id;

            self.GetSystemUpdateID(aVersion, out id);
            *aId = id;
            return(0);
        }
        private static unsafe int DoGetSortCapabilities(IntPtr aPtr, uint aVersion, char **aSortCaps)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgContentDirectory1 self = (DvServiceUpnpOrgContentDirectory1)gch.Target;
            string sortCaps;

            self.GetSortCapabilities(aVersion, out sortCaps);
            *aSortCaps = (char *)Marshal.StringToHGlobalAnsi(sortCaps).ToPointer();
            return(0);
        }
        private static unsafe int DoUpdateObject(IntPtr aPtr, uint aVersion, char *aObjectID, char *aCurrentTagValue, char *aNewTagValue)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgContentDirectory1 self = (DvServiceUpnpOrgContentDirectory1)gch.Target;
            string objectID        = Marshal.PtrToStringAnsi((IntPtr)aObjectID);
            string currentTagValue = Marshal.PtrToStringAnsi((IntPtr)aCurrentTagValue);
            string newTagValue     = Marshal.PtrToStringAnsi((IntPtr)aNewTagValue);

            self.UpdateObject(aVersion, objectID, currentTagValue, newTagValue);
            return(0);
        }
        private static unsafe int DoCreateReference(IntPtr aPtr, uint aVersion, char *aContainerID, char *aObjectID, char **aNewID)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgContentDirectory1 self = (DvServiceUpnpOrgContentDirectory1)gch.Target;
            string containerID = Marshal.PtrToStringAnsi((IntPtr)aContainerID);
            string objectID    = Marshal.PtrToStringAnsi((IntPtr)aObjectID);
            string newID;

            self.CreateReference(aVersion, containerID, objectID, out newID);
            *aNewID = (char *)Marshal.StringToHGlobalAnsi(newID).ToPointer();
            return(0);
        }
        private static unsafe int DoExportResource(IntPtr aPtr, uint aVersion, char *aSourceURI, char *aDestinationURI, uint *aTransferID)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgContentDirectory1 self = (DvServiceUpnpOrgContentDirectory1)gch.Target;
            string sourceURI      = Marshal.PtrToStringAnsi((IntPtr)aSourceURI);
            string destinationURI = Marshal.PtrToStringAnsi((IntPtr)aDestinationURI);
            uint   transferID;

            self.ExportResource(aVersion, sourceURI, destinationURI, out transferID);
            *aTransferID = transferID;
            return(0);
        }
        private static unsafe int DoGetTransferProgress(IntPtr aPtr, uint aVersion, uint aTransferID, char **aTransferStatus, char **aTransferLength, char **aTransferTotal)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgContentDirectory1 self = (DvServiceUpnpOrgContentDirectory1)gch.Target;
            string transferStatus;
            string transferLength;
            string transferTotal;

            self.GetTransferProgress(aVersion, aTransferID, out transferStatus, out transferLength, out transferTotal);
            *aTransferStatus = (char *)Marshal.StringToHGlobalAnsi(transferStatus).ToPointer();
            *aTransferLength = (char *)Marshal.StringToHGlobalAnsi(transferLength).ToPointer();
            *aTransferTotal  = (char *)Marshal.StringToHGlobalAnsi(transferTotal).ToPointer();
            return(0);
        }
        private static unsafe int DoCreateObject(IntPtr aPtr, uint aVersion, char *aContainerID, char *aElements, char **aObjectID, char **aResult)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgContentDirectory1 self = (DvServiceUpnpOrgContentDirectory1)gch.Target;
            string containerID = Marshal.PtrToStringAnsi((IntPtr)aContainerID);
            string elements    = Marshal.PtrToStringAnsi((IntPtr)aElements);
            string objectID;
            string result;

            self.CreateObject(aVersion, containerID, elements, out objectID, out result);
            *aObjectID = (char *)Marshal.StringToHGlobalAnsi(objectID).ToPointer();
            *aResult   = (char *)Marshal.StringToHGlobalAnsi(result).ToPointer();
            return(0);
        }
        private static unsafe int DoSearch(IntPtr aPtr, uint aVersion, char *aContainerID, char *aSearchCriteria, char *aFilter, uint aStartingIndex, uint aRequestedCount, char *aSortCriteria, char **aResult, uint *aNumberReturned, uint *aTotalMatches, uint *aUpdateID)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgContentDirectory1 self = (DvServiceUpnpOrgContentDirectory1)gch.Target;
            string containerID    = Marshal.PtrToStringAnsi((IntPtr)aContainerID);
            string searchCriteria = Marshal.PtrToStringAnsi((IntPtr)aSearchCriteria);
            string filter         = Marshal.PtrToStringAnsi((IntPtr)aFilter);
            string sortCriteria   = Marshal.PtrToStringAnsi((IntPtr)aSortCriteria);
            string result;
            uint   numberReturned;
            uint   totalMatches;
            uint   updateID;

            self.Search(aVersion, containerID, searchCriteria, filter, aStartingIndex, aRequestedCount, sortCriteria, out result, out numberReturned, out totalMatches, out updateID);
            *aResult         = (char *)Marshal.StringToHGlobalAnsi(result).ToPointer();
            *aNumberReturned = numberReturned;
            *aTotalMatches   = totalMatches;
            *aUpdateID       = updateID;
            return(0);
        }