The udisks project provides:
- a daemon, udisksd, that implements well-defined D-Bus interfaces that can be used to query and manipulate storage devices.
- a command-line tool, udisksctl, that can be used to query and use the daemon
The actions that a user can perform using udisks are restricted using polkit.
Git repository: http://gitcafe.com/heiher/hev-udisks-library