| 1 | package Protocol::DBus::Path; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use constant _DEFAULT_SYSTEM_MESSAGE_BUS => 'unix:path=/var/run/dbus/system_bus_socket'; | ||
| 7 | |||
| 8 | # NB: If this returns âautolaunch:â, then the system should use | ||
| 9 | # platform-specific methods of locating a running D-Bus session server, | ||
| 10 | # or starting one if a running instance cannot be found. | ||
| 11 | sub login_session_message_bus { $ENV{'DBUS_SESSION_BUS_ADDRESS'} } | ||
| 12 | |||
| 13 | sub system_message_bus { | ||
| 14 | $ENV{'DBUS_SYSTEM_BUS_ADDRESS'} || _DEFAULT_SYSTEM_MESSAGE_BUS(); | ||
| 15 | } | ||
| 16 | |||
| 17 | 1; |