#android #player #mtp #api-bindings #libmtp

libmtp-rs

High-level interface for the libmtp C library

15 releases (6 breaking)

0.7.7 Oct 27, 2020
0.7.6 Oct 27, 2020
0.6.0 Oct 22, 2020
0.5.1 Oct 18, 2020
0.1.0-alpha1 Sep 29, 2020

#1154 in Filesystem

42 downloads per month

MIT license

1.5MB
28K SLoC

C 21K SLoC // 0.2% comments Rust 5.5K SLoC // 0.0% comments M4 803 SLoC // 0.3% comments Shell 103 SLoC // 0.1% comments Automake 77 SLoC // 0.2% comments

libmtp-rs

This crate aims to provide a flexible and high-level interface to the libmtp library, at its current state is alpha software and may not be used in production since some features are still missing, said this contributions are welcome.

Requirements

You need to have libmtp installed (minimum version 1.1.15), and have pkg-config properly configured (pkg-config --libs libmtp should output something reasonable).

Available APIs

  • Internals API
  • Device properties API
  • Object management API
    • Get properties/attributes
    • Set properties/attributes
    • Move, copy, delete object
    • Get/send partial object
    • Truncate object
  • Storage API
    • Format storage
    • File management
      • List files
      • Send files
      • Receive files
      • Rename files
      • Sample data
      • Events
      • Thumbnails
    • Folder management
      • List folders
      • Create folder
      • Rename folder
    • Track management
      • List tracks
      • Send tracks
      • Receive tracks
      • Rename track
      • Update metadata
    • Album management
      • List albums
      • Create album
      • Update album
      • Rename album
    • Playlist management
      • List playlists
      • Create playlist
      • Update playlist
      • Rename playlist
  • Custom operations API (c_variadic)

Contributing

libmtp-rs is an open source project! If you'd like to contribute, check any open issue or create one, current API design is open to discussion. Note that the code you submit in PRs is assumed to be licensed under the MIT License.

License

This crate is licensed under the terms of the MIT License.

See LICENSE to see the full text.

Dependencies

~3MB
~59K SLoC