1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Safe Rust abstraction over Windows MTP API
//!
//! Microsoft provides a [COM API for WPD (Windows Portable Devices)](https://learn.microsoft.com/en-us/windows/win32/wpd_sdk/programming-guide).<br/>
//! It also provides [raw bindings over these COM APIs](https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Devices/PortableDevices/index.html).
//!
//! This create provides a safe Rust abstraction over this API.<br/>
//!
//! # What is MTP
//!
//! MTP stands for "Media Transfer Protocol". This is how many devices expose themselves when plugged by USB.<br/>
//! Most (every?) Android device, as well as Kindle e-readers, support it.
//!
//! # Important note
//!
//! The WPD API is fairly large. This crate only provides a small fraction of what is possible.<br/>
//! Basically, only device enumeration, simple content enumeration, and content transfer from and to devices that expose disk-like contents are implemented.
//!
//! Much of this crate implements features from code samples at <https://github.com/microsoft/Windows-classic-samples/blob/HEAD/Samples/PortableDeviceCOM/>.<br/>
//! Much can be added in the future. Contributions are welcome!
//!
//! # Usage
//!
//! The entry point of this library is to create a `Provider`, e.g. by [`Provider::new`]. Other structs can be created from its various methods.
//!
//! Some examples are provided in the `examples/` folder. The `tests/` folder also contains examples on how to use this library.
pub use Provider;
/// Re-exported from the windows-rs crate, because it is used in our public API.<br/>
pub use Result as WindowsResult;
/// Re-exported from the windows-rs crate, because it is used in our public API.<br/>
pub use Error as WindowsError;
/// Re-exported from the windows-rs crate, because it is used in our public API.<br/>
pub use PortableDevices;
/// Re-exported from the windows-rs crate, because it is used in our public API.<br/>
pub use UIPROPERTYKEY;