Removed erroneous add of IBackgroundCopyJob6

pull/267/head
dahall 2021-12-10 17:30:24 -07:00
parent fb64311e4d
commit 012034f883
1 changed files with 0 additions and 511 deletions

View File

@ -3343,517 +3343,6 @@ namespace Vanara.PInvoke
BITS_JOB_PROPERTY_VALUE GetProperty(BITS_JOB_PROPERTY_ID PropertyId);
}
/// <summary>
/// <para>Use this interface to query or set several optional behaviors of a job.</para>
/// <para>To get this interface, call the <c>IBackgroundCopyJob::QueryInterface</c> method using as the interface identifier.</para>
/// </summary>
/// <returns></returns>
// https://msdn.microsoft.com/en-us/library/windows/desktop/hh446781(v=vs.85).aspx
[PInvokeData("Bits5_0.h", MSDNShortId = "hh446781", MinClient = PInvokeClient.Windows10)]
[ComImport, Guid("CF6784F7-D677-49FD-9368-CB47AEE9D1AD"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IBackgroundCopyJob6 : IBackgroundCopyJob5
{
/// <summary>Adds multiple files to a job.</summary>
/// <param name="cFileCount">Number of elements in paFileSet.</param>
/// <param name="pFileSet">
/// Array of BG_FILE_INFO structures that identify the local and remote file names of the files to transfer.
/// <para>
/// Upload jobs are restricted to a single file.If the array contains more than one element, or the job already contains a file,
/// the method returns BG_E_TOO_MANY_FILES.
/// </para>
/// </param>
new void AddFileSet([In] uint cFileCount, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] BG_FILE_INFO[] pFileSet);
/// <summary>Adds a single file to the job.</summary>
/// <param name="RemoteUrl">
/// Null-terminated string that contains the name of the file on the server. For information on specifying the remote name, see
/// the RemoteName member and Remarks section of the BG_FILE_INFO structure.
/// </param>
/// <param name="LocalName">
/// Null-terminated string that contains the name of the file on the client. For information on specifying the local name, see
/// the LocalName member and Remarks section of the BG_FILE_INFO structure.
/// </param>
new void AddFile([In, MarshalAs(UnmanagedType.LPWStr)] string RemoteUrl, [In, MarshalAs(UnmanagedType.LPWStr)] string LocalName);
/// <summary>Retrieves an IEnumBackgroundCopyFiles interface pointer that you use to enumerate the files in a job.</summary>
/// <returns>
/// IEnumBackgroundCopyFiles interface pointer that you use to enumerate the files in the job. Release ppEnumFiles when done.
/// </returns>
new IEnumBackgroundCopyFiles EnumFiles();
/// <summary>
/// Suspends a job. New jobs, jobs that are in error, and jobs that have finished transferring files are automatically suspended.
/// </summary>
new void Suspend();
/// <summary>Activates a new job or restarts a job that has been suspended.</summary>
new void Resume();
/// <summary>
/// Deletes the job from the transfer queue and removes related temporary files from the client (downloads) and server (uploads).
/// </summary>
new void Cancel();
/// <summary>Ends the job and saves the transferred files on the client.</summary>
new void Complete();
/// <summary>Retrieves the identifier used to identify the job in the queue.</summary>
/// <returns>GUID that identifies the job within the BITS queue.</returns>
new Guid GetId();
/// <summary>Retrieves the type of transfer being performed, such as a file download or upload.</summary>
/// <returns>Type of transfer being performed. For a list of transfer types, see the BG_JOB_TYPE enumeration.</returns>
new BG_JOB_TYPE GetType();
/// <summary>Retrieves job-related progress information, such as the number of bytes and files transferred.</summary>
/// <returns>
/// Contains data that you can use to calculate the percentage of the job that is complete. For more information, see BG_JOB_PROGRESS.
/// </returns>
new BG_JOB_PROGRESS GetProgress();
/// <summary>Retrieves job-related time stamps, such as the time that the job was created or last modified.</summary>
/// <returns>Contains job-related time stamps. For available time stamps, see the BG_JOB_TIMES structure.</returns>
new BG_JOB_TIMES GetTimes();
/// <summary>Retrieves the state of the job.</summary>
/// <returns>
/// The state of the job. For example, the state reflects whether the job is in error, transferring data, or suspended. For a
/// list of job states, see the BG_JOB_STATE enumeration.
/// </returns>
new BG_JOB_STATE GetState();
/// <summary>
/// Retrieves the error interface after an error occurs.
/// <para>
/// BITS generates an error object when the state of the job is BG_JOB_STATE_ERROR or BG_JOB_STATE_TRANSIENT_ERROR.The service
/// does not create an error object when a call to an IBackgroundCopyXXXX interface method fails.The error object is available
/// until BITS begins transferring data(the state of the job changes to BG_JOB_STATE_TRANSFERRING) for the job or until your
/// application exits.
/// </para>
/// </summary>
/// <returns>
/// Error interface that provides the error code, a description of the error, and the context in which the error occurred. This
/// parameter also identifies the file being transferred at the time the error occurred. Release ppError when done.
/// </returns>
[return: MarshalAs(UnmanagedType.Interface)]
new IBackgroundCopyError GetError();
/// <summary>Retrieves the identity of the job's owner.</summary>
/// <returns>
/// Null-terminated string that contains the string version of the SID that identifies the job's owner. Call the CoTaskMemFree
/// function to free ppOwner when done.
/// </returns>
[return: MarshalAs(UnmanagedType.LPWStr)]
new string GetOwner();
/// <summary>Specifies a display name for the job. Typically, you use the display name to identify the job in a user interface.</summary>
/// <param name="pDisplayName">
/// Null-terminated string that identifies the job. Must not be NULL. The length of the string is limited to 256 characters, not
/// including the null terminator.
/// </param>
new void SetDisplayName([In, MarshalAs(UnmanagedType.LPWStr)] string pDisplayName);
/// <summary>Retrieves the display name for the job. Typically, you use the display name to identify the job in a user interface.</summary>
/// <returns>
/// Null-terminated string that contains the display name that identifies the job. More than one job can have the same display
/// name. Call the CoTaskMemFree function to free ppDisplayName when done.
/// </returns>
[return: MarshalAs(UnmanagedType.LPWStr)]
new string GetDisplayName();
/// <summary>Provides a description of the job.</summary>
/// <param name="pDescription">
/// Null-terminated string that provides additional information about the job. The length of the string is limited to 1,024
/// characters, not including the null terminator.
/// </param>
new void SetDescription([In, MarshalAs(UnmanagedType.LPWStr)] string pDescription);
/// <summary>Retrieves the description of the job.</summary>
/// <returns>
/// Null-terminated string that contains a short description of the job. Call the CoTaskMemFree function to free ppDescription
/// when done.
/// </returns>
[return: MarshalAs(UnmanagedType.LPWStr)]
new string GetDescription();
/// <summary>
/// Specifies the priority level of your job. The priority level determines when your job is processed relative to other jobs in
/// the transfer queue.
/// </summary>
/// <param name="Priority">
/// Specifies the priority level of your job relative to other jobs in the transfer queue. The default is BG_JOB_PRIORITY_NORMAL.
/// For a list of priority levels, see the BG_JOB_PRIORITY enumeration.
/// </param>
new void SetPriority(BG_JOB_PRIORITY Priority);
/// <summary>
/// Retrieves the priority level for the job. The priority level determines when the job is processed relative to other jobs in
/// the transfer queue.
/// </summary>
/// <returns>Priority of the job relative to other jobs in the transfer queue.</returns>
new BG_JOB_PRIORITY GetPriority();
/// <summary>Specifies the type of event notification you want to receive, such as job transferred events.</summary>
/// <param name="NotifyFlags">Set one or more of the following flags to identify the events that you want to receive.</param>
new void SetNotifyFlags([In] BG_NOTIFY NotifyFlags);
/// <summary>Retrieves the event notification flags for the job.</summary>
/// <returns>Identifies the events that your application receives.</returns>
new BG_NOTIFY GetNotifyFlags();
/// <summary>
/// Identifies your implementation of the IBackgroundCopyCallback interface to BITS. Use the IBackgroundCopyCallback interface to
/// receive notification of job-related events.
/// </summary>
/// <param name="pNotifyInterface">
/// An IBackgroundCopyCallback interface pointer. To remove the current callback interface pointer, set this parameter to NULL.
/// </param>
new void SetNotifyInterface(IBackgroundCopyCallback pNotifyInterface);
/// <summary>Retrieves the interface pointer to your implementation of the IBackgroundCopyCallback interface.</summary>
/// <returns>Interface pointer to your implementation of the IBackgroundCopyCallback interface. When done, release ppNotifyInterface.</returns>
[return: MarshalAs(UnmanagedType.IUnknown)]
new object GetNotifyInterface();
/// <summary>
/// Sets the minimum length of time that BITS waits after encountering a transient error condition before trying to transfer the file.
/// </summary>
/// <param name="RetryDelay">
/// Minimum length of time, in seconds, that BITS waits after encountering a transient error before trying to transfer the file.
/// The default retry delay is 600 seconds (10 minutes). The minimum retry delay that you can specify is 5 seconds. If you
/// specify a value less than 5 seconds, BITS changes the value to 5 seconds. If the value exceeds the no-progress-timeout value
/// retrieved from the GetNoProgressTimeout method, BITS will not retry the transfer and moves the job to the BG_JOB_STATE_ERROR state.
/// </param>
new void SetMinimumRetryDelay([In] uint RetryDelay);
/// <summary>
/// Retrieves the minimum length of time that the service waits after encountering a transient error condition before trying to
/// transfer the file.
/// </summary>
/// <returns>
/// Length of time, in seconds, that the service waits after encountering a transient error before trying to transfer the file.
/// </returns>
new uint GetMinimumRetryDelay();
/// <summary>
/// Sets the length of time that BITS tries to transfer the file after a transient error condition occurs. If there is progress,
/// the timer is reset.
/// </summary>
/// <param name="RetryPeriod">
/// Length of time, in seconds, that BITS tries to transfer the file after the first transient error occurs. The default retry
/// period is 1,209,600 seconds (14 days). Set the retry period to 0 to prevent retries and to force the job into the
/// BG_JOB_STATE_ERROR state for all errors. If the retry period value exceeds the JobInactivityTimeout Group Policy value
/// (90-day default), BITS cancels the job after the policy value is exceeded.
/// </param>
new void SetNoProgressTimeout([In] uint RetryPeriod);
/// <summary>
/// Retrieves the length of time that the service tries to transfer the file after a transient error condition occurs. If there
/// is progress, the timer is reset.
/// </summary>
/// <returns>Length of time, in seconds, that the service tries to transfer the file after a transient error occurs.</returns>
new uint GetNoProgressTimeout();
/// <summary>Retrieves the number of times BITS tried to transfer the job and an error occurred.</summary>
/// <returns>
/// Number of errors that occurred while BITS tried to transfer the job. The count increases when the job moves from the
/// BG_JOB_STATE_TRANSFERRING state to the BG_JOB_STATE_TRANSIENT_ERROR or BG_JOB_STATE_ERROR state.
/// </returns>
new uint GetErrorCount();
/// <summary>Specifies which proxy to use to transfer files.</summary>
/// <param name="ProxyUsage">
/// Specifies whether to use the user's proxy settings, not to use a proxy, or to use application-specified proxy settings. The
/// default is to use the user's proxy settings, BG_JOB_PROXY_USAGE_PRECONFIG. For a list of proxy options, see the
/// BG_JOB_PROXY_USAGE enumeration.
/// </param>
/// <param name="ProxyList">
/// Null-terminated string that contains the proxies to use to transfer files. The list is space-delimited. For details on
/// specifying a proxy, see Remarks.
/// <para>
/// This parameter must be NULL if the value of ProxyUsage is BG_JOB_PROXY_USAGE_PRECONFIG, BG_JOB_PROXY_USAGE_NO_PROXY, or BG_JOB_PROXY_USAGE_AUTODETECT.
/// </para>
/// <para>The length of the proxy list is limited to 4,000 characters, not including the null terminator.</para>
/// </param>
/// <param name="ProxyBypassList">
/// Null-terminated string that contains an optional list of host names, IP addresses, or both, that can bypass the proxy. The
/// list is space-delimited. For details on specifying a bypass proxy, see Remarks.
/// <para>
/// This parameter must be NULL if the value of ProxyUsage is BG_JOB_PROXY_USAGE_PRECONFIG, BG_JOB_PROXY_USAGE_NO_PROXY, or BG_JOB_PROXY_USAGE_AUTODETECT.
/// </para>
/// <para>The length of the proxy list is limited to 4,000 characters, not including the null terminator.</para>
/// </param>
new void SetProxySettings([In] BG_JOB_PROXY_USAGE ProxyUsage, [In, MarshalAs(UnmanagedType.LPWStr)] string ProxyList, [In, MarshalAs(UnmanagedType.LPWStr)] string ProxyBypassList);
/// <summary>Retrieves the proxy information that the job uses to transfer the files.</summary>
/// <param name="pProxyUsage">
/// Specifies the proxy settings the job uses to transfer the files. For a list of proxy options, see the BG_JOB_PROXY_USAGE enumeration.
/// </param>
/// <param name="pProxyList">
/// Null-terminated string that contains one or more proxies to use to transfer files. The list is space-delimited. For details
/// on the format of the string, see the Listing Proxy Servers section of Enabling Internet Functionality. Call the CoTaskMemFree
/// function to free ppProxyList when done.
/// </param>
/// <param name="pProxyBypassList">
/// Null-terminated string that contains an optional list of host names or IP addresses, or both, that were not routed through
/// the proxy. The list is space-delimited. For details on the format of the string, see the Listing the Proxy Bypass section of
/// Enabling Internet Functionality. Call the CoTaskMemFree function to free ppProxyBypassList when done.
/// </param>
new void GetProxySettings(out BG_JOB_PROXY_USAGE pProxyUsage, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoTaskMemStringMarshaler))] out string pProxyList, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoTaskMemStringMarshaler))] out string pProxyBypassList);
/// <summary>Changes ownership of the job to the current user.</summary>
new void TakeOwnership();
/// <summary>
/// Specifies a program to execute if the job enters the BG_JOB_STATE_ERROR or BG_JOB_STATE_TRANSFERRED state. BITS executes the
/// program in the context of the user who called this method.
/// </summary>
/// <param name="Program">
/// Null-terminated string that contains the program to execute. The pProgram parameter is limited to MAX_PATH characters, not
/// including the null terminator. You should specify a full path to the program; the method will not use the search path to
/// locate the program.
/// <para>
/// To remove command line notification, set pProgram and pParameters to NULL. The method fails if pProgram is NULL and
/// pParameters is non-NULL.
/// </para>
/// </param>
/// <param name="Parameters">
/// Null-terminated string that contains the parameters of the program in pProgram. The first parameter must be the program in
/// pProgram (use quotes if the path uses long file names). The pParameters parameter is limited to 4,000 characters, not
/// including the null terminator. This parameter can be NULL.
/// </param>
new void SetNotifyCmdLine([In, MarshalAs(UnmanagedType.LPWStr)] string Program, [In, MarshalAs(UnmanagedType.LPWStr)] string Parameters);
/// <summary>Retrieves the program to execute when the job enters the error or transferred state.</summary>
/// <param name="pProgram">
/// Null-terminated string that contains the program to execute when the job enters the error or transferred state. Call the
/// CoTaskMemFree function to free pProgram when done.
/// </param>
/// <param name="pParameters">
/// Null-terminated string that contains the arguments of the program in pProgram. Call the CoTaskMemFree function to free
/// pParameters when done.
/// </param>
new void GetNotifyCmdLine([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoTaskMemStringMarshaler))] out string pProgram, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoTaskMemStringMarshaler))] out string pParameters);
/// <summary>Retrieves progress information related to the transfer of the reply data from an upload-reply job.</summary>
/// <returns>
/// Contains information that you use to calculate the percentage of the reply file transfer that is complete. For more
/// information, see BG_JOB_REPLY_PROGRESS.
/// </returns>
new BG_JOB_REPLY_PROGRESS GetReplyProgress();
/// <summary>
/// Retrieves an in-memory copy of the reply data from the server application. Call this method only if the job's type is
/// BG_JOB_TYPE_UPLOAD_REPLY and its state is BG_JOB_STATE_TRANSFERRED.
/// </summary>
/// <param name="ppBuffer">
/// Buffer to contain the reply data. The method sets ppBuffer to NULL if the server application did not return a reply. Call the
/// CoTaskMemFree function to free ppBuffer when done.
/// </param>
/// <param name="pLength">Size, in bytes, of the reply data in ppBuffer.</param>
new void GetReplyData(out SafeCoTaskMemHandle ppBuffer, out ulong pLength);
/// <summary>
/// Specifies the name of the file to contain the reply data from the server application. Call this method only if the job's type
/// is BG_JOB_TYPE_UPLOAD_REPLY.
/// </summary>
/// <param name="ReplyFileName">
/// Null-terminated string that contains the full path to the reply file. BITS generates the file name if ReplyFileNamePathSpec
/// is NULL or an empty string. You cannot use wildcards in the path or file name, and directories in the path must exist. The
/// path is limited to MAX_PATH, not including the null terminator. The user must have permissions to write to the directory.
/// BITS does not support NTFS streams. Instead of using network drives, which are session specific, use UNC paths (for example,
/// \\server\share\path\file). Do not include the \\? prefix in the path.
/// </param>
new void SetReplyFileName([In, MarshalAs(UnmanagedType.LPWStr)] string ReplyFileName);
/// <summary>
/// Retrieves the name of the file that contains the reply data from the server application. Call this method only if the job
/// type is BG_JOB_TYPE_UPLOAD_REPLY.
/// </summary>
/// <returns>
/// Null-terminated string that contains the full path to the reply file. Call the CoTaskMemFree function to free pReplyFileName
/// when done.
/// </returns>
[return: MarshalAs(UnmanagedType.LPWStr)]
new string GetReplyFileName();
/// <summary>Specifies the credentials to use for a proxy or remote server user authentication request.</summary>
/// <param name="Credentials">
/// Identifies the target (proxy or server), authentication scheme, and the user's credentials to use for user authentication.
/// For details, see the BG_AUTH_CREDENTIALS structure.
/// </param>
new void SetCredentials(ref BG_AUTH_CREDENTIALS Credentials);
/// <summary>
/// Removes credentials from use. The credentials must match an existing target and scheme pair that you specified using the
/// IBackgroundCopyJob2::SetCredentials method. There is no method to retrieve the credentials you have set.
/// </summary>
/// <param name="Target">Identifies whether to use the credentials for proxy or server authentication.</param>
/// <param name="Scheme">
/// Identifies the authentication scheme to use (basic or one of several challenge-response schemes). For details, see the
/// BG_AUTH_SCHEME enumeration.
/// </param>
new void RemoveCredentials(BG_AUTH_TARGET Target, BG_AUTH_SCHEME Scheme);
/// <summary>Replaces the beginning text of all remote names in the download job with the specified string.</summary>
/// <param name="OldPrefix">
/// Null-terminated string that identifies the text to replace in the remote name. The text must start at the beginning of the
/// remote name.
/// </param>
/// <param name="NewPrefix">Null-terminated string that contains the replacement text.</param>
new void ReplaceRemotePrefix([In, MarshalAs(UnmanagedType.LPWStr)] string OldPrefix, [In, MarshalAs(UnmanagedType.LPWStr)] string NewPrefix);
/// <summary>Adds a file to a download job and specifies the ranges of the file you want to download.</summary>
/// <param name="RemoteUrl">
/// Null-terminated string that contains the name of the file on the server. For information on specifying the remote name, see
/// the RemoteName member and Remarks section of the BG_FILE_INFO structure. Starting with BITS 3.0, the SMB protocol is not
/// supported for ranges.
/// <para>BITS 2.5 and 2.0: BITS supports the SMB protocol for ranges.</para>
/// </param>
/// <param name="LocalName">
/// Null-terminated string that contains the name of the file on the client. For information on specifying the local name, see
/// the LocalName member and Remarks section of the BG_FILE_INFO structure.
/// </param>
/// <param name="rangeCount">Number of elements in Ranges.</param>
/// <param name="ranges">
/// Array of one or more BG_FILE_RANGE structures that specify the ranges to download. Do not specify duplicate or overlapping ranges.
/// </param>
new void AddFileWithRanges([In, MarshalAs(UnmanagedType.LPWStr)] string RemoteUrl, [In, MarshalAs(UnmanagedType.LPWStr)] string LocalName, [In] uint rangeCount, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] BG_FILE_RANGE[] ranges);
/// <summary>Specifies the owner and ACL information to maintain when using SMB to download or upload a file.</summary>
/// <param name="Flags">
/// Flags that identify the owner and ACL information to maintain when transferring a file using SMB. Subsequent calls to this
/// method overwrite the previous flags. Specify 0 to remove the flags from the job. You can specify any combination of the
/// following flags.
/// </param>
new void SetFileACLFlags([In] BG_COPY_FILE Flags);
/// <summary>Retrieves the flags that identify the owner and ACL information to maintain when transferring a file using SMB.</summary>
/// <returns>
/// Flags that identify the owner and ACL information to maintain when transferring a file using SMB. Flags can contain any
/// combination of the following flags. If no flags are set, Flags is zero.
/// </returns>
new BG_COPY_FILE GetFileACLFlags();
/// <summary>
/// Sets flags that determine if the files of the job can be cached and served to peers and if the job can download content from peers.
/// </summary>
/// <param name="Flags">
/// Flags that determine if the files of the job can be cached and served to peers and if the job can download content from
/// peers. The following flags can be set:
/// </param>
new void SetPeerCachingFlags(BG_JOB_ENABLE_PEERCACHING Flags);
/// <summary>
/// Retrieves flags that determine if the files of the job can be cached and served to peers and if BITS can download content for
/// the job from peers.
/// </summary>
/// <returns>
/// Flags that determine if the files of the job can be cached and served to peers and if BITS can download content for the job
/// from peers. The following flags can be set:
/// </returns>
new BG_JOB_ENABLE_PEERCACHING GetPeerCachingFlags();
/// <summary>Gets the integrity level of the token of the owner that created or took ownership of the job.</summary>
/// <returns>Integrity level of the token of the owner that created or took ownership of the job.</returns>
new uint GetOwnerIntegrityLevel();
/// <summary>
/// Gets a value that determines if the token of the owner was elevated at the time they created or took ownership of the job.
/// </summary>
/// <returns>
/// Is TRUE if the token of the owner was elevated at the time they created or took ownership of the job; otherwise, FALSE.
/// </returns>
[return: MarshalAs(UnmanagedType.Bool)]
new bool GetOwnerElevationState();
/// <summary>Sets the maximum time that BITS will spend transferring the files in the job.</summary>
/// <param name="Timeout">
/// Maximum time, in seconds, that BITS will spend transferring the files in the job. The default is 7,776,000 seconds (90 days).
/// </param>
new void SetMaximumDownloadTime(uint Timeout);
/// <summary>Retrieves the maximum time that BITS will spend transferring the files in the job.</summary>
/// <returns>Maximum time, in seconds, that BITS will spend transferring the files in the job.</returns>
new uint GetMaximumDownloadTime();
/// <summary>A generic method for setting BITS job properties.</summary>
/// <param name="PropertyId">The ID of the property that is being set specified as a BITS_JOB_PROPERTY_ID enum value.</param>
/// <param name="PropertyValue">
/// The value of the property that is being set. In order to hold a value whose type is appropriate to the property, this value
/// is specified via the BITS_JOB_PROPERTY_VALUE union that is composed of all the known property types.
/// </param>
new void SetProperty(BITS_JOB_PROPERTY_ID PropertyId, BITS_JOB_PROPERTY_VALUE PropertyValue);
/// <summary>A generic method for getting BITS job properties.</summary>
/// <param name="PropertyId">The ID of the property that is being obtained specified as a BITS_JOB_PROPERTY_ID enum value.</param>
/// <returns>The property value returned as a BITS_JOB_PROPERTY_VALUE union.</returns>
new BITS_JOB_PROPERTY_VALUE GetProperty(BITS_JOB_PROPERTY_ID PropertyId);
/// <summary>Specifies a position to prioritize downloading missing data from.</summary>
/// <param name="offset">Specifies the new position to prioritize downloading missing data from.</param>
/// <remarks>
/// <para>
/// <c>UpdateDownloadPosition</c> can be requested for any download job that also meets the requirements for
/// <c>BITS_JOB_PROPERTY_ON_DEMAND_MODE</c> jobs.
/// </para>
/// <para>
/// The requirements for a <c>BITS_JOB_PROPERTY_ON_DEMAND_MODE</c> job is that the transfer must be a <c>DOWNLOAD</c> job. The
/// job must not be <c>DYNAMIC</c> and the server must be an HTTP or HTTPS server and the server requirements for range support
/// must all be met. For more information, see HTTP Requirements for BITS Downloads.
/// </para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/api/bits10_1/nf-bits10_1-ibackgroundcopyfile6-updatedownloadposition
// HRESULT UpdateDownloadPosition( [in] UINT64 offset );
void UpdateDownloadPosition(ulong offset);
/// <summary>Adds a new set of file ranges to be prioritized for download.</summary>
/// <param name="rangeCount">Specifies the size of the <c>Ranges</c> array.</param>
/// <param name="ranges">
/// An array of file ranges to be downloaded. Requested ranges are allowed to overlap previously downloaded (or pending) ranges.
/// Ranges are automatically split into non-overlapping ranges.
/// </param>
/// <remarks>
/// <para>
/// <c>RequestFileRanges</c> can be requested for any download job that also meets the requirements for
/// <c>BITS_JOB_PROPERTY_ON_DEMAND_MODE</c> jobs.
/// </para>
/// <para>
/// The requirements for a <c>BITS_JOB_PROPERTY_ON_DEMAND_MODE</c> job is that the transfer must be a <c>DOWNLOAD</c> job. The
/// job must not be <c>DYNAMIC</c> and the server must be an HTTP or HTTPS server and the server requirements for range support
/// must all be met. For more information, see HTTP Requirements for BITS Downloads.
/// </para>
/// <para>
/// When all of the requested ranges have been downloaded the job state will be set to <c>BG_JOB_STATE_TRANSFERRED</c> if all of
/// the bytes of the file have been transferred. Otherwise, the job state will be set to <c>BG_JOB_STATE_SUSPENDED</c>.
/// </para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/api/bits10_1/nf-bits10_1-ibackgroundcopyfile6-requestfileranges
// HRESULT RequestFileRanges( [in] DWORD rangeCount, [in] const BG_FILE_RANGE [] ranges );
void RequestFileRanges(uint rangeCount, [In, MarshalAs(UnmanagedType.LPArray)] BG_FILE_RANGE[] ranges);
/// <summary>Returns the set of file ranges that have been downloaded.</summary>
/// <param name="rangeCount">The number of elements in <c>Ranges</c>.</param>
/// <param name="ranges">
/// Array of <c>BG_FILE_RANGE</c> structures that describes the ranges that have been downloaded. Ranges will be merged together
/// as much as possible. The ranges are ordered by offset. When done, call the CoTaskMemFree function to free <c>Ranges</c>.
/// </param>
/// <remarks>
/// <para>
/// <c>GetFilledFileRanges</c> can be requested for any download job that also meets the requirements for
/// <c>BITS_JOB_PROPERTY_ON_DEMAND_MODE</c> jobs.
/// </para>
/// <para>
/// The requirements for a <c>BITS_JOB_PROPERTY_ON_DEMAND_MODE</c> job is that the transfer must be a <c>DOWNLOAD</c> job. The
/// job must not be <c>DYNAMIC</c> and the server must be an HTTP or HTTPS server and the server requirements for range support
/// must all be met. For more information, see HTTP Requirements for BITS Downloads.
/// </para>
/// </remarks>
// https://docs.microsoft.com/en-us/windows/win32/api/bits10_1/nf-bits10_1-ibackgroundcopyfile6-getfilledfileranges
// HRESULT GetFilledFileRanges( [out] DWORD *rangeCount, [out] BG_FILE_RANGE **ranges );
void GetFilledFileRanges(out uint rangeCount, out SafeCoTaskMemHandle ranges);
}
/// <summary>
/// <para>
/// Use this interface to specify client certificates for certificate-based client authentication and custom headers for HTTP requests.