#include <HalContext.h>
Public Types | |
| typedef zypp::RW_pointer< HalContext_Impl >::unspecified_bool_type | bool_type |
Public Member Functions | |
| HalContext (bool autoconnect=false) | |
| HalContext (const HalContext &context) | |
| ~HalContext () | |
| HalContext & | operator= (const HalContext &context) |
| operator bool_type () const | |
| Verifies if the context is initialized. | |
| void | connect () |
| std::vector< std::string > | getAllDevices () const |
| Retrieve UDI's of all devices. | |
| HalDrive | getDriveFromUDI (const std::string &udi) const |
| Construct a HalDrive object for the specified UDI. | |
| HalVolume | getVolumeFromUDI (const std::string &udi) const |
| Construct a HalVolume object for the specified UDI. | |
| HalVolume | getVolumeFromDeviceFile (const std::string &device_file) const |
| std::vector< std::string > | findDevicesByCapability (const std::string &capability) const |
| Retrieve UDI's of all devices with a capability. | |
| bool | getDevicePropertyBool (const std::string &udi, const std::string &key) const |
| int32_t | getDevicePropertyInt32 (const std::string &udi, const std::string &key) const |
| uint64_t | getDevicePropertyUInt64 (const std::string &udi, const std::string &key) const |
| double | getDevicePropertyDouble (const std::string &udi, const std::string &key) const |
| std::string | getDevicePropertyString (const std::string &udi, const std::string &key) const |
| void | setDevicePropertyBool (const std::string &udi, const std::string &key, bool value) |
| void | setDevicePropertyInt32 (const std::string &udi, const std::string &key, int32_t value) |
| void | setDevicePropertyUInt64 (const std::string &udi, const std::string &key, uint64_t value) |
| void | setDevicePropertyDouble (const std::string &udi, const std::string &key, double value) |
| void | setDevicePropertyString (const std::string &udi, const std::string &key, const std::string &value) |
| void | removeDeviceProperty (const std::string &udi, const std::string &key) |
Private Member Functions | |
| HalContext (bool, bool) | |
Private Attributes | |
| zypp::RW_pointer< HalContext_Impl > | h_impl |
Hal context wrapper. It manages the dbus connection and is the entry point to query drives, volumes and other information.
Definition at line 57 of file HalContext.h.
| typedef zypp::RW_pointer<HalContext_Impl>::unspecified_bool_type zypp::target::hal::HalContext::bool_type |
Definition at line 61 of file HalContext.h.
| zypp::target::hal::HalContext::HalContext | ( | bool | autoconnect = false |
) |
| zypp::target::hal::HalContext::HalContext | ( | const HalContext & | context | ) |
| zypp::target::hal::HalContext::~HalContext | ( | ) |
| zypp::target::hal::HalContext::HalContext | ( | bool | , | |
| bool | ||||
| ) | [private] |
| HalContext & zypp::target::hal::HalContext::operator= | ( | const HalContext & | context | ) |
| zypp::target::hal::HalContext::operator HalContext::bool_type | ( | ) | const |
Verifies if the context is initialized.
Definition at line 328 of file HalContext.cc.
References zypp::target::hal::g_Mutex, and h_impl.
| void zypp::target::hal::HalContext::connect | ( | ) |
| std::vector< std::string > zypp::target::hal::HalContext::getAllDevices | ( | ) | const |
Retrieve UDI's of all devices.
Definition at line 347 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, zypp::target::hal::VERIFY_CONTEXT(), and ZYPP_THROW.
| HalDrive zypp::target::hal::HalContext::getDriveFromUDI | ( | const std::string & | udi | ) | const |
Construct a HalDrive object for the specified UDI.
| The | udi of the drive. |
Definition at line 369 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, and zypp::target::hal::VERIFY_CONTEXT().
| HalVolume zypp::target::hal::HalContext::getVolumeFromUDI | ( | const std::string & | udi | ) | const |
Construct a HalVolume object for the specified UDI.
| The | udi of the volume. |
Definition at line 383 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, and zypp::target::hal::VERIFY_CONTEXT().
| HalVolume zypp::target::hal::HalContext::getVolumeFromDeviceFile | ( | const std::string & | device_file | ) | const |
Definition at line 397 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, and zypp::target::hal::VERIFY_CONTEXT().
| std::vector< std::string > zypp::target::hal::HalContext::findDevicesByCapability | ( | const std::string & | capability | ) | const |
Retrieve UDI's of all devices with a capability.
| The | capability name |
Definition at line 412 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, zypp::target::hal::VERIFY_CONTEXT(), and ZYPP_THROW.
| bool zypp::target::hal::HalContext::getDevicePropertyBool | ( | const std::string & | udi, | |
| const std::string & | key | |||
| ) | const |
Definition at line 436 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, zypp::target::hal::VERIFY_CONTEXT(), and ZYPP_THROW.
| int32_t zypp::target::hal::HalContext::getDevicePropertyInt32 | ( | const std::string & | udi, | |
| const std::string & | key | |||
| ) | const |
Definition at line 458 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, zypp::target::hal::VERIFY_CONTEXT(), and ZYPP_THROW.
| uint64_t zypp::target::hal::HalContext::getDevicePropertyUInt64 | ( | const std::string & | udi, | |
| const std::string & | key | |||
| ) | const |
Definition at line 480 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, zypp::target::hal::VERIFY_CONTEXT(), and ZYPP_THROW.
| double zypp::target::hal::HalContext::getDevicePropertyDouble | ( | const std::string & | udi, | |
| const std::string & | key | |||
| ) | const |
Definition at line 502 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, zypp::target::hal::VERIFY_CONTEXT(), and ZYPP_THROW.
| std::string zypp::target::hal::HalContext::getDevicePropertyString | ( | const std::string & | udi, | |
| const std::string & | key | |||
| ) | const |
Definition at line 525 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, zypp::target::hal::VERIFY_CONTEXT(), and ZYPP_THROW.
| void zypp::target::hal::HalContext::setDevicePropertyBool | ( | const std::string & | udi, | |
| const std::string & | key, | |||
| bool | value | |||
| ) |
Definition at line 553 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, zypp::target::hal::VERIFY_CONTEXT(), and ZYPP_THROW.
| void zypp::target::hal::HalContext::setDevicePropertyInt32 | ( | const std::string & | udi, | |
| const std::string & | key, | |||
| int32_t | value | |||
| ) |
Definition at line 576 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, zypp::target::hal::VERIFY_CONTEXT(), and ZYPP_THROW.
| void zypp::target::hal::HalContext::setDevicePropertyUInt64 | ( | const std::string & | udi, | |
| const std::string & | key, | |||
| uint64_t | value | |||
| ) |
Definition at line 599 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, zypp::target::hal::VERIFY_CONTEXT(), and ZYPP_THROW.
| void zypp::target::hal::HalContext::setDevicePropertyDouble | ( | const std::string & | udi, | |
| const std::string & | key, | |||
| double | value | |||
| ) |
Definition at line 622 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, zypp::target::hal::VERIFY_CONTEXT(), and ZYPP_THROW.
| void zypp::target::hal::HalContext::setDevicePropertyString | ( | const std::string & | udi, | |
| const std::string & | key, | |||
| const std::string & | value | |||
| ) |
Definition at line 645 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, zypp::target::hal::VERIFY_CONTEXT(), and ZYPP_THROW.
| void zypp::target::hal::HalContext::removeDeviceProperty | ( | const std::string & | udi, | |
| const std::string & | key | |||
| ) |
Definition at line 668 of file HalContext.cc.
References zypp::target::hal::g_Mutex, h_impl, zypp::target::hal::VERIFY_CONTEXT(), and ZYPP_THROW.
Definition at line 167 of file HalContext.h.
Referenced by connect(), findDevicesByCapability(), getAllDevices(), getDevicePropertyBool(), getDevicePropertyDouble(), getDevicePropertyInt32(), getDevicePropertyString(), getDevicePropertyUInt64(), getDriveFromUDI(), getVolumeFromDeviceFile(), getVolumeFromUDI(), HalContext(), operator bool_type(), operator=(), removeDeviceProperty(), setDevicePropertyBool(), setDevicePropertyDouble(), setDevicePropertyInt32(), setDevicePropertyString(), setDevicePropertyUInt64(), and ~HalContext().
1.5.0