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
//! High-level MTP (Media Transfer Protocol) API for Android devices and media players.
//!
//! This module provides a convenient, batteries-included API for common file transfer
//! operations. Use this module when:
//!
//! - Working with Android phones and tablets
//! - You want simple file listing, upload, and download
//! - You need storage enumeration and device info
//! - You don't need camera-specific features (capture, live view, etc.)
//!
//! ## When to use `ptp` instead
//!
//! Use the lower-level [`crate::ptp`] module when you need:
//! - Direct control over PTP operations and transactions
//! - Camera-specific functionality
//! - Custom protocol extensions
//! - Access to raw response codes and error details
//!
//! ## Quick example
//!
//! ```rust,ignore
//! use mtp_rs::mtp::MtpDevice;
//!
//! let device = MtpDevice::open_first().await?;
//! for storage in device.storages().await? {
//! for obj in storage.list_objects(None).await? {
//! println!("{}", obj.filename);
//! }
//! }
//! ```
pub use ;
pub use DeviceEvent;
pub use NewObjectInfo;
pub use ;
pub use ;