Skip to content

Commit

Permalink
Use DBUS to detect media insertion or removal
Browse files Browse the repository at this point in the history
This patch upgrades libmyth/mediamonitor-unix.cpp to use the DBus
message bus to detect changes to removable media.

 Currently, to detect the insertion of USB drives and key-disks the code
requires changes to udev configuration files, needing root permission,
and is very Linux specific. This patch uses UDisks
http://hal.freedesktop.org/docs/udisks/ messages which is a standard
across many *nix systems. In addition the code is simpler, provides more
information on the devices and most importantly needs no changes to
system configuration. If the QT DBus module is not present the code will
fallback to the current system.

Closes #9519

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
  • Loading branch information
Lawrence Rust authored and stuartm committed Jun 9, 2011
1 parent ef0160b commit 06a98ff
Show file tree
Hide file tree
Showing 3 changed files with 246 additions and 25 deletions.
1 change: 1 addition & 0 deletions mythtv/libs/libmyth/libmyth.pro
Expand Up @@ -144,6 +144,7 @@ using_pulse {
unix:!cygwin {
SOURCES += mediamonitor-unix.cpp
HEADERS += mediamonitor-unix.h
using_qtdbus: CONFIG += qdbus
}

linux:DEFINES += linux
Expand Down

0 comments on commit 06a98ff

Please sign in to comment.