1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/target/hal/HalContext.cc
11 * \brief Hardware abstaction layer library wrapper implementation.
13 #ifndef FAKE_HAL // disables zypp's HAL dependency
15 #include <zypp/target/hal/HalContext.h>
16 #include <zypp/thread/Mutex.h>
17 #include <zypp/thread/MutexLock.h>
18 #include <zypp/base/NonCopyable.h>
19 #include <zypp/base/Logger.h>
20 #include <zypp/base/String.h>
21 #include <zypp/base/Gettext.h>
23 #include <dbus/dbus-glib-lowlevel.h>
24 #include <dbus/dbus-glib.h>
25 #include <hal/libhal.h>
26 #include <hal/libhal-storage.h>
32 //////////////////////////////////////////////////////////////////////
34 { ////////////////////////////////////////////////////////////////////
35 ////////////////////////////////////////////////////////////////////
37 { //////////////////////////////////////////////////////////////////
38 //////////////////////////////////////////////////////////////////
40 { ////////////////////////////////////////////////////////////////
42 using zypp::thread::Mutex;
43 using zypp::thread::MutexLock;
45 ////////////////////////////////////////////////////////////////
46 namespace // anonymous
47 { //////////////////////////////////////////////////////////////
50 //////////////////////////////////////////////////////////////
53 ** hmm... currently a global one..
58 //////////////////////////////////////////////////////////////
60 * Internal hal (dbus ) error helper class.
67 HalError() { dbus_error_init(&error); }
68 ~HalError() { dbus_error_free(&error); }
70 inline bool isSet() const
72 return dbus_error_is_set(&error);
75 inline HalException halException(const std::string &msg = std::string()) const
77 if( isSet() && error.name != NULL && error.message != NULL) {
78 return HalException(error.name, error.message);
80 else if( !msg.empty()) {
81 return HalException(msg);
84 return HalException();
90 // -----------------------------------------------------------
92 VERIFY_CONTEXT(const zypp::RW_pointer<HalContext_Impl> &h)
96 ZYPP_THROW(HalException(_("HalContext not connected")));
100 // -----------------------------------------------------------
102 VERIFY_DRIVE(const zypp::RW_pointer<HalDrive_Impl> &d)
106 ZYPP_THROW(HalException(_("HalDrive not initialized")));
110 // -----------------------------------------------------------
112 VERIFY_VOLUME(const zypp::RW_pointer<HalVolume_Impl> &v)
116 ZYPP_THROW(HalException(_("HalVolume not initialized")));
120 //////////////////////////////////////////////////////////////
122 ////////////////////////////////////////////////////////////////
124 ////////////////////////////////////////////////////////////////
126 HalException::dumpOn( std::ostream & str ) const
128 if(!e_name.empty() && !e_msg.empty())
129 return str << msg() << ": " << e_msg << " (" << e_name << ")";
130 else if(!e_msg.empty())
131 return str << msg() << ": " << e_msg;
136 ////////////////////////////////////////////////////////////////
137 class HalContext_Impl
140 HalContext_Impl(bool monitorable = false);
143 DBusConnection *conn;
145 bool pcon; // private connection
149 ////////////////////////////////////////////////////////////////
153 zypp::RW_pointer<HalContext_Impl> hal;
161 HalDrive_Impl(const zypp::RW_pointer<HalContext_Impl> &r,
170 libhal_drive_free(drv);
175 ////////////////////////////////////////////////////////////////
181 HalVolume_Impl(LibHalVolume *v=NULL)
189 libhal_volume_free(vol);
194 ////////////////////////////////////////////////////////////////
195 HalContext_Impl::HalContext_Impl(bool monitorable)
198 , pcon(false) // we allways use shared connections at the moment
203 conn = dbus_bus_get_private(DBUS_BUS_SYSTEM, &err.error);
205 conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err.error);
207 ZYPP_THROW(err.halException(
208 _("Unable to create dbus connection")
213 dbus_connection_setup_with_g_main(conn, NULL);
215 hctx = libhal_ctx_new();
219 dbus_connection_close(conn);
220 dbus_connection_unref(conn);
223 ZYPP_THROW(HalException(
224 _("libhal_ctx_new: Can't create libhal context")
228 if( !libhal_ctx_set_dbus_connection(hctx, conn))
230 libhal_ctx_free(hctx);
234 dbus_connection_close(conn);
235 dbus_connection_unref(conn);
238 ZYPP_THROW(HalException(
239 _("libhal_set_dbus_connection: Can't set dbus connection")
243 if( !libhal_ctx_init(hctx, &err.error))
245 libhal_ctx_free(hctx);
249 dbus_connection_close(conn);
250 dbus_connection_unref(conn);
253 ZYPP_THROW(err.halException(
254 _("Unable to initalize HAL context -- hald not running?")
259 // -------------------------------------------------------------
260 HalContext_Impl::~HalContext_Impl()
265 libhal_ctx_shutdown(hctx, &err.error);
266 libhal_ctx_free( hctx);
271 dbus_connection_close(conn);
272 dbus_connection_unref(conn);
277 ////////////////////////////////////////////////////////////////
278 HalContext::HalContext(bool autoconnect)
281 MutexLock lock(g_Mutex);
284 h_impl.reset( new HalContext_Impl());
287 // -------------------------------------------------------------
288 HalContext::HalContext(const HalContext &context)
291 MutexLock lock(g_Mutex);
293 zypp::RW_pointer<HalContext_Impl>(context.h_impl).swap(h_impl);
296 // -------------------------------------------------------------
297 HalContext::HalContext(bool autoconnect, bool monitorable)
300 MutexLock lock(g_Mutex);
303 h_impl.reset( new HalContext_Impl(monitorable));
306 // -------------------------------------------------------------
307 HalContext::~HalContext()
309 MutexLock lock(g_Mutex);
314 // --------------------------------------------------------------
316 HalContext::operator=(const HalContext &context)
318 MutexLock lock(g_Mutex);
320 if( this == &context)
323 zypp::RW_pointer<HalContext_Impl>(context.h_impl).swap(h_impl);
327 // --------------------------------------------------------------
328 HalContext::operator HalContext::bool_type() const
330 MutexLock lock(g_Mutex);
335 // --------------------------------------------------------------
337 HalContext::connect()
339 MutexLock lock(g_Mutex);
342 h_impl.reset( new HalContext_Impl());
345 // --------------------------------------------------------------
346 std::vector<std::string>
347 HalContext::getAllDevices() const
349 MutexLock lock(g_Mutex);
350 VERIFY_CONTEXT(h_impl);
356 names = libhal_get_all_devices( h_impl->hctx, &count, &err.error);
359 ZYPP_THROW(err.halException());
362 std::vector<std::string> ret(names, names + count);
363 libhal_free_string_array(names);
367 // --------------------------------------------------------------
369 HalContext::getDriveFromUDI(const std::string &udi) const
371 MutexLock lock(g_Mutex);
372 VERIFY_CONTEXT(h_impl);
374 LibHalDrive *drv = libhal_drive_from_udi(h_impl->hctx, udi.c_str());
376 return HalDrive(new HalDrive_Impl( h_impl, drv));
381 // --------------------------------------------------------------
383 HalContext::getVolumeFromUDI(const std::string &udi) const
385 MutexLock lock(g_Mutex);
386 VERIFY_CONTEXT(h_impl);
388 LibHalVolume *vol = libhal_volume_from_udi(h_impl->hctx, udi.c_str());
390 return HalVolume( new HalVolume_Impl(vol));
395 // --------------------------------------------------------------
397 HalContext::getVolumeFromDeviceFile(const std::string &device_file) const
399 MutexLock lock(g_Mutex);
400 VERIFY_CONTEXT(h_impl);
402 LibHalVolume *vol = libhal_volume_from_device_file(h_impl->hctx,
403 device_file.c_str());
405 return HalVolume( new HalVolume_Impl(vol));
410 // --------------------------------------------------------------
411 std::vector<std::string>
412 HalContext::findDevicesByCapability(const std::string &capability) const
414 MutexLock lock(g_Mutex);
415 VERIFY_CONTEXT(h_impl);
421 names = libhal_find_device_by_capability(h_impl->hctx,
426 ZYPP_THROW(err.halException());
429 std::vector<std::string> ret(names, names + count);
430 libhal_free_string_array(names);
434 // --------------------------------------------------------------
436 HalContext::getDevicePropertyBool (const std::string &udi,
437 const std::string &key) const
439 MutexLock lock(g_Mutex);
440 VERIFY_CONTEXT(h_impl);
445 ret = libhal_device_get_property_bool (h_impl->hctx,
451 ZYPP_THROW(err.halException());
456 // --------------------------------------------------------------
458 HalContext::getDevicePropertyInt32 (const std::string &udi,
459 const std::string &key) const
461 MutexLock lock(g_Mutex);
462 VERIFY_CONTEXT(h_impl);
467 ret = libhal_device_get_property_int (h_impl->hctx,
473 ZYPP_THROW(err.halException());
478 // --------------------------------------------------------------
480 HalContext::getDevicePropertyUInt64(const std::string &udi,
481 const std::string &key) const
483 MutexLock lock(g_Mutex);
484 VERIFY_CONTEXT(h_impl);
489 ret = libhal_device_get_property_uint64(h_impl->hctx,
495 ZYPP_THROW(err.halException());
500 // --------------------------------------------------------------
502 HalContext::getDevicePropertyDouble(const std::string &udi,
503 const std::string &key) const
505 MutexLock lock(g_Mutex);
506 VERIFY_CONTEXT(h_impl);
511 ret = libhal_device_get_property_bool (h_impl->hctx,
517 ZYPP_THROW(err.halException());
523 // --------------------------------------------------------------
525 HalContext::getDevicePropertyString(const std::string &udi,
526 const std::string &key) const
528 MutexLock lock(g_Mutex);
529 VERIFY_CONTEXT(h_impl);
535 ptr = libhal_device_get_property_string(h_impl->hctx,
541 ZYPP_THROW(err.halException());
551 // --------------------------------------------------------------
553 HalContext::setDevicePropertyBool (const std::string &udi,
554 const std::string &key,
557 MutexLock lock(g_Mutex);
558 VERIFY_CONTEXT(h_impl);
563 ret = libhal_device_set_property_bool (h_impl->hctx,
570 ZYPP_THROW(err.halException());
574 // --------------------------------------------------------------
576 HalContext::setDevicePropertyInt32 (const std::string &udi,
577 const std::string &key,
580 MutexLock lock(g_Mutex);
581 VERIFY_CONTEXT(h_impl);
586 ret = libhal_device_set_property_int (h_impl->hctx,
593 ZYPP_THROW(err.halException());
597 // --------------------------------------------------------------
599 HalContext::setDevicePropertyUInt64(const std::string &udi,
600 const std::string &key,
603 MutexLock lock(g_Mutex);
604 VERIFY_CONTEXT(h_impl);
609 ret = libhal_device_set_property_uint64(h_impl->hctx,
616 ZYPP_THROW(err.halException());
620 // --------------------------------------------------------------
622 HalContext::setDevicePropertyDouble(const std::string &udi,
623 const std::string &key,
626 MutexLock lock(g_Mutex);
627 VERIFY_CONTEXT(h_impl);
632 ret = libhal_device_set_property_double(h_impl->hctx,
639 ZYPP_THROW(err.halException());
643 // --------------------------------------------------------------
645 HalContext::setDevicePropertyString(const std::string &udi,
646 const std::string &key,
647 const std::string &value)
649 MutexLock lock(g_Mutex);
650 VERIFY_CONTEXT(h_impl);
655 ret = libhal_device_set_property_string(h_impl->hctx,
662 ZYPP_THROW(err.halException());
666 // --------------------------------------------------------------
668 HalContext::removeDeviceProperty(const std::string &udi,
669 const std::string &key)
671 MutexLock lock(g_Mutex);
672 VERIFY_CONTEXT(h_impl);
677 ret = libhal_device_remove_property(h_impl->hctx,
683 ZYPP_THROW(err.halException());
687 ////////////////////////////////////////////////////////////////
693 // --------------------------------------------------------------
694 HalDrive::HalDrive(HalDrive_Impl *impl)
697 MutexLock lock(g_Mutex);
702 // --------------------------------------------------------------
703 HalDrive::HalDrive(const HalDrive &drive)
706 MutexLock lock(g_Mutex);
708 zypp::RW_pointer<HalDrive_Impl>(drive.d_impl).swap(d_impl);
711 // --------------------------------------------------------------
712 HalDrive::~HalDrive()
714 MutexLock lock(g_Mutex);
719 // --------------------------------------------------------------
721 HalDrive::operator=(const HalDrive &drive)
723 MutexLock lock(g_Mutex);
728 zypp::RW_pointer<HalDrive_Impl>(drive.d_impl).swap(d_impl);
732 // --------------------------------------------------------------
733 HalDrive::operator HalDrive::bool_type() const
735 MutexLock lock(g_Mutex);
740 // --------------------------------------------------------------
742 HalDrive::getUDI() const
744 MutexLock lock(g_Mutex);
745 VERIFY_DRIVE(d_impl);
747 const char *ptr = libhal_drive_get_udi(d_impl->drv);
748 return std::string(ptr ? ptr : "");
751 // --------------------------------------------------------------
753 HalDrive::getTypeName() const
755 MutexLock lock(g_Mutex);
756 VERIFY_DRIVE(d_impl);
758 const char *ptr = libhal_drive_get_type_textual(d_impl->drv);
759 return std::string(ptr ? ptr : "");
762 // --------------------------------------------------------------
764 HalDrive::getDeviceFile() const
766 MutexLock lock(g_Mutex);
767 VERIFY_DRIVE(d_impl);
769 return std::string(libhal_drive_get_device_file(d_impl->drv));
772 // --------------------------------------------------------------
774 HalDrive::getDeviceMajor() const
776 MutexLock lock(g_Mutex);
777 VERIFY_DRIVE(d_impl);
779 return libhal_drive_get_device_major(d_impl->drv);
782 // --------------------------------------------------------------
784 HalDrive::getDeviceMinor() const
786 MutexLock lock(g_Mutex);
787 VERIFY_DRIVE(d_impl);
789 return libhal_drive_get_device_minor(d_impl->drv);
792 // --------------------------------------------------------------
794 HalDrive::usesRemovableMedia() const
796 MutexLock lock(g_Mutex);
797 VERIFY_DRIVE(d_impl);
799 return libhal_drive_uses_removable_media(d_impl->drv);
802 // --------------------------------------------------------------
803 std::vector<std::string>
804 HalDrive::getCdromCapabilityNames() const
806 MutexLock lock(g_Mutex);
807 VERIFY_DRIVE(d_impl);
809 std::vector<std::string> ret;
810 LibHalDriveCdromCaps caps;
813 ** FIXME: there is no textual variant :-(
814 ** using property key names...
816 caps = libhal_drive_get_cdrom_caps(d_impl->drv);
818 if(caps & LIBHAL_DRIVE_CDROM_CAPS_CDROM)
819 ret.push_back("cdrom");
820 if(caps & LIBHAL_DRIVE_CDROM_CAPS_CDR)
821 ret.push_back("cdr");
822 if(caps & LIBHAL_DRIVE_CDROM_CAPS_CDRW)
823 ret.push_back("cdrw");
824 if(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDRAM)
825 ret.push_back("dvdram");
826 if(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDROM)
827 ret.push_back("dvd");
828 if(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDR)
829 ret.push_back("dvdr");
830 if(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDRW)
831 ret.push_back("dvdrw");
832 if(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSR)
833 ret.push_back("dvdplusr");
834 if(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRW)
835 ret.push_back("dvdplusrw");
836 if(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRDL)
837 ret.push_back("dvdplusrdl");
842 if( libhal_drive_get_type(d_impl->drv) != LIBHAL_DRIVE_TYPE_CDROM)
843 ZYPP_THROW(HalException(_("Not a CDROM drive")));
846 ** FIXME: we use property keys matching
847 ** "storage.cdrom.cd*"
848 ** "storage.cdrom.dvd*"
849 ** but this may print other bool keys,
850 ** that are not CDROM caps.
852 LibHalPropertySet *props;
855 props = libhal_device_get_all_properties(d_impl->hal->hctx,
859 ZYPP_THROW(err.halException());
861 std::vector<std::string> ret(1, getTypeName());
863 std::string dvd("storage.cdrom.dvd");
864 std::string cd ("storage.cdrom.cd");
866 LibHalPropertySetIterator it;
867 for(libhal_psi_init(&it, props);
868 libhal_psi_has_more(&it);
869 libhal_psi_next(&it))
871 if( libhal_psi_get_type(&it) == LIBHAL_PROPERTY_TYPE_BOOLEAN &&
872 libhal_psi_get_bool(&it))
874 key = libhal_psi_get_key(&it);
875 if( key.compare(0, cd.size(), cd) == 0)
877 ret.push_back(key.substr(sizeof("storage.cdrom.")-1));
880 if( key.compare(0, dvd.size(), dvd) == 0)
882 ret.push_back(key.substr(sizeof("storage.cdrom.")-1));
886 libhal_free_property_set(props);
892 // --------------------------------------------------------------
893 std::vector<std::string>
894 HalDrive::findAllVolumes() const
896 MutexLock lock(g_Mutex);
897 VERIFY_DRIVE(d_impl);
902 names = libhal_drive_find_all_volumes(d_impl->hal->hctx,
906 std::vector<std::string> ret;
907 ret.assign(names, names + count);
908 libhal_free_string_array(names);
913 ////////////////////////////////////////////////////////////////
914 HalVolume::HalVolume()
918 HalVolume::HalVolume(HalVolume_Impl *impl)
921 MutexLock lock(g_Mutex);
926 // --------------------------------------------------------------
927 HalVolume::HalVolume(const HalVolume &volume)
930 MutexLock lock(g_Mutex);
932 zypp::RW_pointer<HalVolume_Impl>(volume.v_impl).swap(v_impl);
935 // --------------------------------------------------------------
936 HalVolume::~HalVolume()
938 MutexLock lock(g_Mutex);
943 // --------------------------------------------------------------
945 HalVolume::operator=(const HalVolume &volume)
947 MutexLock lock(g_Mutex);
952 zypp::RW_pointer<HalVolume_Impl>(volume.v_impl).swap(v_impl);
956 // --------------------------------------------------------------
957 HalVolume::operator HalVolume::bool_type() const
959 MutexLock lock(g_Mutex);
964 // --------------------------------------------------------------
966 HalVolume::getUDI() const
968 MutexLock lock(g_Mutex);
969 VERIFY_VOLUME(v_impl);
971 const char *ptr = libhal_volume_get_udi(v_impl->vol);
972 return std::string(ptr ? ptr : "");
975 // --------------------------------------------------------------
977 HalVolume::getDeviceFile() const
979 MutexLock lock(g_Mutex);
980 VERIFY_VOLUME(v_impl);
982 return std::string(libhal_volume_get_device_file(v_impl->vol));
985 // --------------------------------------------------------------
987 HalVolume::getDeviceMajor() const
989 MutexLock lock(g_Mutex);
990 VERIFY_VOLUME(v_impl);
992 return libhal_volume_get_device_major(v_impl->vol);
995 // --------------------------------------------------------------
997 HalVolume::getDeviceMinor() const
999 MutexLock lock(g_Mutex);
1000 VERIFY_VOLUME(v_impl);
1002 return libhal_volume_get_device_minor(v_impl->vol);
1005 // --------------------------------------------------------------
1007 HalVolume::isDisc() const
1009 MutexLock lock(g_Mutex);
1010 VERIFY_VOLUME(v_impl);
1012 return libhal_volume_is_disc(v_impl->vol);
1015 // --------------------------------------------------------------
1017 HalVolume::isPartition() const
1019 MutexLock lock(g_Mutex);
1020 VERIFY_VOLUME(v_impl);
1022 return libhal_volume_is_partition(v_impl->vol);
1025 // --------------------------------------------------------------
1027 HalVolume::isMounted() const
1029 MutexLock lock(g_Mutex);
1030 VERIFY_VOLUME(v_impl);
1032 return libhal_volume_is_mounted(v_impl->vol);
1035 // --------------------------------------------------------------
1037 HalVolume::getFSType() const
1039 MutexLock lock(g_Mutex);
1040 VERIFY_VOLUME(v_impl);
1042 return std::string( libhal_volume_get_fstype(v_impl->vol));
1045 // --------------------------------------------------------------
1047 HalVolume::getFSUsage() const
1049 MutexLock lock(g_Mutex);
1050 VERIFY_VOLUME(v_impl);
1052 LibHalVolumeUsage usage( libhal_volume_get_fsusage(v_impl->vol));
1056 case LIBHAL_VOLUME_USAGE_MOUNTABLE_FILESYSTEM:
1059 case LIBHAL_VOLUME_USAGE_PARTITION_TABLE:
1060 ret = "partitiontable";
1062 case LIBHAL_VOLUME_USAGE_RAID_MEMBER:
1065 case LIBHAL_VOLUME_USAGE_CRYPTO:
1068 case LIBHAL_VOLUME_USAGE_UNKNOWN:
1075 // --------------------------------------------------------------
1077 HalVolume::getMountPoint() const
1079 VERIFY_VOLUME(v_impl);
1081 return std::string( libhal_volume_get_mount_point(v_impl->vol));
1085 ////////////////////////////////////////////////////////////////
1087 //////////////////////////////////////////////////////////////////
1088 //////////////////////////////////////////////////////////////////
1089 } // namespace target
1090 ////////////////////////////////////////////////////////////////////
1091 ////////////////////////////////////////////////////////////////////
1093 //////////////////////////////////////////////////////////////////////
1095 #include <zypp/target/hal/HalContext.h>
1096 #include <zypp/target/hal/HalException.h>
1098 { ////////////////////////////////////////////////////////////////////
1099 ////////////////////////////////////////////////////////////////////
1101 { //////////////////////////////////////////////////////////////////
1102 //////////////////////////////////////////////////////////////////
1104 { ////////////////////////////////////////////////////////////////
1107 HalException::dumpOn( std::ostream & str ) const
1110 // --------------------------------------------------------------
1111 class HalContext_Impl
1115 class HalVolume_Impl
1118 // --------------------------------------------------------------
1119 HalContext::HalContext(bool)
1121 HalContext::~HalContext()
1124 HalContext::operator=(const HalContext &)
1126 HalContext::operator HalContext::bool_type() const
1129 HalContext::connect()
1131 std::vector<std::string>
1132 HalContext::getAllDevices() const
1133 { return std::vector<std::string>(); }
1135 HalContext::getDriveFromUDI(const std::string &) const
1136 { return HalDrive(); }
1138 HalContext::getVolumeFromUDI(const std::string &) const
1139 { return HalVolume(); }
1141 HalContext::getVolumeFromDeviceFile(const std::string &) const
1142 { return HalVolume(); }
1143 std::vector<std::string>
1144 HalContext::findDevicesByCapability(const std::string &) const
1145 { return std::vector<std::string>(); }
1147 HalContext::getDevicePropertyBool(const std::string &, const std::string &) const
1150 HalContext::setDevicePropertyBool (const std::string &, const std::string &, bool value)
1153 HalContext::removeDeviceProperty(const std::string &, const std::string &)
1156 HalContext::getDevicePropertyString(const std::string &, const std::string &) const
1158 // --------------------------------------------------------------
1159 HalDrive::HalDrive()
1161 HalDrive::~HalDrive()
1164 HalDrive::operator=(const HalDrive &)
1166 HalDrive::operator HalDrive::bool_type() const
1169 HalDrive::getUDI() const
1170 { return std::string(); }
1172 HalDrive::getTypeName() const
1173 { return std::string(); }
1175 HalDrive::getDeviceFile() const
1176 { return std::string(); }
1178 HalDrive::getDeviceMinor() const
1181 HalDrive::getDeviceMajor() const
1184 HalDrive::usesRemovableMedia() const
1186 std::vector<std::string>
1187 HalDrive::getCdromCapabilityNames() const
1188 { return std::vector<std::string>(); }
1189 std::vector<std::string>
1190 HalDrive::findAllVolumes() const
1191 { return std::vector<std::string>(); }
1193 // --------------------------------------------------------------
1194 HalVolume::HalVolume()
1196 HalVolume::~HalVolume()
1199 HalVolume::operator=(const HalVolume &)
1201 HalVolume::operator HalVolume::bool_type() const
1204 HalVolume::getUDI() const
1205 { return std::string(); }
1207 HalVolume::getDeviceFile() const
1208 { return std::string(); }
1210 HalVolume::getDeviceMinor() const
1213 HalVolume::getDeviceMajor() const
1216 HalVolume::isDisc() const
1219 HalVolume::isPartition() const
1222 HalVolume::isMounted() const
1225 HalVolume::getFSType() const
1226 { return std::string(); }
1228 HalVolume::getFSUsage() const
1229 { return std::string(); }
1231 HalVolume::getMountPoint() const
1232 { return std::string(); }
1234 ////////////////////////////////////////////////////////////////
1236 //////////////////////////////////////////////////////////////////
1237 //////////////////////////////////////////////////////////////////
1238 } // namespace target
1239 ////////////////////////////////////////////////////////////////////
1240 ////////////////////////////////////////////////////////////////////
1242 //////////////////////////////////////////////////////////////////////
1246 ** vim: set ts=2 sts=2 sw=2 ai et: