| 1 |
// Licensed under the Apache License, Version 2.0 |
| 2 |
// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license |
| 3 |
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. |
| 4 |
// All files in the project carrying such notice may not be copied, modified, or distributed |
| 5 |
// except according to those terms. |
| 6 |
use shared::basetsd::UINT64; |
| 7 |
use shared::minwindef::DWORD; |
| 8 |
use um::bits::{IBackgroundCopyFile, IBackgroundCopyFileVtbl}; |
| 9 |
use um::bits1_5::{IBackgroundCopyJob2, IBackgroundCopyJob2Vtbl}; |
| 10 |
use um::winnt::{HRESULT, LPCWSTR}; |
| 11 |
pub const BG_LENGTH_TO_EOF: UINT64 = -1i64 as u64; |
| 12 |
STRUCT!{struct BG_FILE_RANGE { |
| 13 |
InitialOffset: UINT64, |
| 14 |
Length: UINT64, |
| 15 |
}} |
| 16 |
pub const BG_COPY_FILE_OWNER: DWORD = 1; |
| 17 |
pub const BG_COPY_FILE_GROUP: DWORD = 2; |
| 18 |
pub const BG_COPY_FILE_DACL: DWORD = 4; |
| 19 |
pub const BG_COPY_FILE_SACL: DWORD = 8; |
| 20 |
pub const BG_COPY_FILE_ALL: DWORD = 15; |
| 21 |
RIDL!{#[uuid(0x443c8934, 0x90ff, 0x48ed, 0xbc, 0xde, 0x26, 0xf5, 0xc7, 0x45, 0x00, 0x42)] |
| 22 |
interface IBackgroundCopyJob3(IBackgroundCopyJob3Vtbl): |
| 23 |
IBackgroundCopyJob2(IBackgroundCopyJob2Vtbl) { |
| 24 |
fn ReplaceRemotePrefix( |
| 25 |
OldPrefix: LPCWSTR, |
| 26 |
NewPrefix: LPCWSTR, |
| 27 |
) -> HRESULT, |
| 28 |
fn AddFileWithRanges( |
| 29 |
RemoteUrl: LPCWSTR, |
| 30 |
LocalName: LPCWSTR, |
| 31 |
RangeCount: DWORD, |
| 32 |
Ranges: *mut BG_FILE_RANGE, |
| 33 |
) -> HRESULT, |
| 34 |
fn SetFileACLFlags( |
| 35 |
Flags: DWORD, |
| 36 |
) -> HRESULT, |
| 37 |
fn GetFileACLFlags( |
| 38 |
Flags: *mut DWORD, |
| 39 |
) -> HRESULT, |
| 40 |
}} |
| 41 |
RIDL!{#[uuid(0x83e81b93, 0x0873, 0x474d, 0x8a, 0x8c, 0xf2, 0x01, 0x8b, 0x1a, 0x93, 0x9c)] |
| 42 |
interface IBackgroundCopyFile2(IBackgroundCopyFile2Vtbl): |
| 43 |
IBackgroundCopyFile(IBackgroundCopyFileVtbl) { |
| 44 |
fn GetFileRanges( |
| 45 |
RangeCount: *mut DWORD, |
| 46 |
Ranges: *mut *mut BG_FILE_RANGE, |
| 47 |
) -> HRESULT, |
| 48 |
fn SetRemoteName( |
| 49 |
Val: LPCWSTR, |
| 50 |
) -> HRESULT, |
| 51 |
}} |