IBackgroundCopyJob5::SetPeerCachingFlags method

[This documentation is preliminary and is subject to change.]

Applies to: desktop apps only

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.

Syntax

HRESULT SetPeerCachingFlags(
  DWORD Flags
);

Parameters

  • 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:

    Value Meaning
    BG_JOB_ENABLE_PEERCACHING_CLIENT 0x0001

    The job can download content from peers.

    The job will not download from a peer unless both the client computer and the job allow Background Intelligent Transfer Service (BITS) to download files from a peer. To enable the client computer to download files from a peer, set the EnablePeerCaching group policy or call the IBitsPeerCacheAdministration::SetConfigurationFlags method and set the BG_ENABLE_PEERCACHING_CLIENT flag.

    If one of the following conditions exists, BITS will stop the download and reschedule the job to begin transferring from either a peer or the origin server, depending on the value for the job and the cache:

    • This value for the cache is TRUE and the value for the job toggles between TRUE and FALSE.
    • This value for the job property is TRUEand the value for the cache toggles between TRUE and FALSE.
    The download will then resume from where it left off before BITS stopped the job.
    BITS 5.0:  This flag is deprecated.
    BG_JOB_ENABLE_PEERCACHING_SERVER 0x0002

    The files of the job can be cached and served to peers.

    BITS will not cache the files and serve them to peers unless both the client computer and job allow BITS to cache and serve the files. To allow BITS to cache and serve the files on the client computer, set the EnablePeerCaching group policy or call the IBitsPeerCacheAdministration::SetConfigurationFlags method and set the BG_ENABLE_PEERCACHING_SERVER flag.

    BITS 4.0:  This flag is deprecated.
    BG_JOB_DISABLE_BRANCH_CACHE 0x0004

    BITS will not use Windows BranchCache for transfer jobs. This setting does not affect the use of Windows BranchCache by applications other than BITS.

     

Return value

The method returns the following values.

Remarks

Setting these flags has meaning only if the peer caching has been enabled by either setting the EnablePeerCaching group policy or calling the IBitsPeerCacheAdministration::SetConfigurationFlags.

Requirements

Minimum supported client

Windows 8 Consumer Preview

Minimum supported server

Windows Server 8 Beta

Header

Bits5_0.h (include Bits.h)

IDL

Bits5_0.idl

Library

Bits.lib

See also

IBackgroundCopyJob5

IBackgroundCopyJob5::GetPeerCachingFlags

 

 

Build date: 1/12/2012