ifndef __REQUIRED_RPCNDR_H_VERSION__
define __REQUIRED_RPCNDR_H_VERSION__ 500
endif
ifndef __REQUIRED_RPCSAL_H_VERSION__
define __REQUIRED_RPCSAL_H_VERSION__ 100
endif

include rpc.inc
include rpcndr.inc

ifndef __RPCNDR_H_VERSION__
.err <this stub requires an updated version of rpcndr.h>
endif

ifndef COM_NO_WINDOWS_H
include windows.inc
include ole2.inc
endif

ifndef __bits5_0_h__
define __bits5_0_h__

include bits.inc
include bits1_5.inc
include bits2_0.inc
include bits2_5.inc
include bits3_0.inc
include bits4_0.inc

include winapifamily.inc

if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)

BITS_COST_STATE_UNRESTRICTED equ 0x1
BITS_COST_STATE_CAPPED_USAGE_UNKNOWN equ 0x2
BITS_COST_STATE_BELOW_CAP equ 0x4
BITS_COST_STATE_NEAR_CAP equ 0x8
BITS_COST_STATE_OVERCAP_CHARGED equ 0x10
BITS_COST_STATE_OVERCAP_THROTTLED equ 0x20
BITS_COST_STATE_USAGE_BASED equ 0x40
BITS_COST_STATE_ROAMING equ 0x80
BITS_COST_OPTION_IGNORE_CONGESTION equ 0x80000000
BITS_COST_STATE_RESERVED equ 0x40000000
BITS_COST_STATE_TRANSFER_NOT_ROAMING equ (BITS_COST_OPTION_IGNORE_CONGESTION OR BITS_COST_STATE_USAGE_BASED OR BITS_COST_STATE_OVERCAP_THROTTLED OR BITS_COST_STATE_OVERCAP_CHARGED OR BITS_COST_STATE_NEAR_CAP OR BITS_COST_STATE_BELOW_CAP OR BITS_COST_STATE_CAPPED_USAGE_UNKNOWN OR BITS_COST_STATE_UNRESTRICTED)
BITS_COST_STATE_TRANSFER_NO_SURCHARGE equ (BITS_COST_OPTION_IGNORE_CONGESTION OR BITS_COST_STATE_USAGE_BASED OR BITS_COST_STATE_OVERCAP_THROTTLED OR BITS_COST_STATE_NEAR_CAP OR BITS_COST_STATE_BELOW_CAP OR BITS_COST_STATE_CAPPED_USAGE_UNKNOWN OR BITS_COST_STATE_UNRESTRICTED)
BITS_COST_STATE_TRANSFER_STANDARD equ (BITS_COST_OPTION_IGNORE_CONGESTION OR BITS_COST_STATE_USAGE_BASED OR BITS_COST_STATE_OVERCAP_THROTTLED OR BITS_COST_STATE_BELOW_CAP OR BITS_COST_STATE_CAPPED_USAGE_UNKNOWN OR BITS_COST_STATE_UNRESTRICTED)
BITS_COST_STATE_TRANSFER_UNRESTRICTED equ (BITS_COST_OPTION_IGNORE_CONGESTION OR BITS_COST_STATE_OVERCAP_THROTTLED OR BITS_COST_STATE_UNRESTRICTED)
BITS_COST_STATE_TRANSFER_ALWAYS equ (BITS_COST_OPTION_IGNORE_CONGESTION OR BITS_COST_STATE_ROAMING OR BITS_COST_STATE_USAGE_BASED OR BITS_COST_STATE_OVERCAP_THROTTLED OR BITS_COST_STATE_OVERCAP_CHARGED OR BITS_COST_STATE_NEAR_CAP OR BITS_COST_STATE_BELOW_CAP OR BITS_COST_STATE_CAPPED_USAGE_UNKNOWN OR BITS_COST_STATE_UNRESTRICTED)

.enum BITS_JOB_TRANSFER_POLICY {
    BITS_JOB_TRANSFER_POLICY_ALWAYS		= 0x800000ff,
    BITS_JOB_TRANSFER_POLICY_NOT_ROAMING	= 0x8000007f,
    BITS_JOB_TRANSFER_POLICY_NO_SURCHARGE	= 0x8000006f,
    BITS_JOB_TRANSFER_POLICY_STANDARD		= 0x80000067,
    BITS_JOB_TRANSFER_POLICY_UNRESTRICTED	= 0x80000021
    }

.enum BITS_JOB_PROPERTY_ID {
    BITS_JOB_PROPERTY_ID_COST_FLAGS		= 1,
    BITS_JOB_PROPERTY_NOTIFICATION_CLSID	= 2,
    BITS_JOB_PROPERTY_DYNAMIC_CONTENT		= 3,
    BITS_JOB_PROPERTY_HIGH_PERFORMANCE		= 4,
    BITS_JOB_PROPERTY_MAX_DOWNLOAD_SIZE		= 5,
    BITS_JOB_PROPERTY_USE_STORED_CREDENTIALS	= 7
    }

BITS_JOB_PROPERTY_VALUE UNION
_Dword			DWORD ?
ClsID			GUID <>
Enable			BOOL ?
Uint64			UINT64 ?
Target			BG_AUTH_TARGET ?
BITS_JOB_PROPERTY_VALUE ENDS

.enum BITS_FILE_PROPERTY_ID {
    BITS_FILE_PROPERTY_ID_HTTP_RESPONSE_HEADERS = 1
    }

BITS_FILE_PROPERTY_VALUE UNION
String			LPWSTR ?
BITS_FILE_PROPERTY_VALUE ENDS

ifndef __IBackgroundCopyJob5_INTERFACE_DEFINED__
define __IBackgroundCopyJob5_INTERFACE_DEFINED__

DEFINE_IIDX(IBackgroundCopyJob5, "E847030C-BBBA-4657-AF6D-484AA42BF1FE")

.comdef IBackgroundCopyJob5 : public IBackgroundCopyJob4

    SetProperty		proc :BITS_JOB_PROPERTY_ID, :BITS_JOB_PROPERTY_VALUE
    GetProperty		proc :BITS_JOB_PROPERTY_ID, :ptr
    .ends

endif

ifndef __IBackgroundCopyFile5_INTERFACE_DEFINED__
define __IBackgroundCopyFile5_INTERFACE_DEFINED__

DEFINE_IIDX(IBackgroundCopyFile5, "85C1657F-DAFC-40E8-8834-DF18EA25717E")

.comdef IBackgroundCopyFile5 : public IBackgroundCopyFile4

    SetProperty		proc :BITS_FILE_PROPERTY_ID, :BITS_FILE_PROPERTY_VALUE
    GetProperty		proc :BITS_FILE_PROPERTY_ID, :ptr
    .ends

endif

ifndef __BackgroundCopyManager5_0_LIBRARY_DEFINED__
define __BackgroundCopyManager5_0_LIBRARY_DEFINED__

externdef LIBID_BackgroundCopyManager5_0:IID

DEFINE_GUIDS(CLSID_BackgroundCopyManager5_0, "1ECCA34C-E88A-44E3-8D6A-8921BDE9E452")

endif
endif
endif
