1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/target/hal/HalContext.cc
11 * \brief Hardware abstaction layer library wrapper implementation.
13 #include <zypp/target/hal/HalException.h>
14 //////////////////////////////////////////////////////////////////////
16 { ////////////////////////////////////////////////////////////////////
17 ////////////////////////////////////////////////////////////////////
19 { //////////////////////////////////////////////////////////////////
20 //////////////////////////////////////////////////////////////////
22 { ////////////////////////////////////////////////////////////////
23 NoHalException::NoHalException()
24 : Exception(_("Sorry, but this version of libzypp was built without HAL support."))
26 ////////////////////////////////////////////////////////////////
28 //////////////////////////////////////////////////////////////////
29 //////////////////////////////////////////////////////////////////
31 ////////////////////////////////////////////////////////////////////
32 ////////////////////////////////////////////////////////////////////
34 //////////////////////////////////////////////////////////////////////
36 #ifndef NO_HAL // disables zypp's HAL dependency
38 #include <zypp/target/hal/HalContext.h>
39 #include <zypp/thread/Mutex.h>
40 #include <zypp/thread/MutexLock.h>
41 #include <zypp/base/NonCopyable.h>
42 #include <zypp/base/Logger.h>
43 #include <zypp/base/String.h>
44 #include <zypp/base/Gettext.h>
46 #include <hal/libhal.h>
47 #include <hal/libhal-storage.h>
53 //////////////////////////////////////////////////////////////////////
55 { ////////////////////////////////////////////////////////////////////
56 ////////////////////////////////////////////////////////////////////
58 { //////////////////////////////////////////////////////////////////
59 //////////////////////////////////////////////////////////////////
61 { ////////////////////////////////////////////////////////////////
63 using zypp::thread::Mutex;
64 using zypp::thread::MutexLock;
66 ////////////////////////////////////////////////////////////////
67 namespace // anonymous
68 { //////////////////////////////////////////////////////////////
71 //////////////////////////////////////////////////////////////
74 ** hmm... currently a global one..
79 //////////////////////////////////////////////////////////////
81 * Internal hal (dbus ) error helper class.
88 HalError() { dbus_error_init(&error); }
89 ~HalError() { dbus_error_free(&error); }
91 inline bool isSet() const
93 return dbus_error_is_set(&error);
96 inline HalException halException(const std::string &msg = std::string()) const
98 if( isSet() && error.name != NULL && error.message != NULL) {
99 return HalException(error.name, error.message);
101 else if( !msg.empty()) {
102 return HalException(msg);
105 return HalException();
111 // -----------------------------------------------------------
113 VERIFY_CONTEXT(const zypp::RW_pointer<HalContext_Impl> &h)
117 ZYPP_THROW(HalException(_("HalContext not connected")));
121 // -----------------------------------------------------------
123 VERIFY_DRIVE(const zypp::RW_pointer<HalDrive_Impl> &d)
127 ZYPP_THROW(HalException(_("HalDrive not initialized")));
131 // -----------------------------------------------------------
133 VERIFY_VOLUME(const zypp::RW_pointer<HalVolume_Impl> &v)
137 ZYPP_THROW(HalException(_("HalVolume not initialized")));
141 //////////////////////////////////////////////////////////////
143 ////////////////////////////////////////////////////////////////
145 ////////////////////////////////////////////////////////////////
147 HalException::dumpOn( std::ostream & str ) const
149 if(!e_name.empty() && !e_msg.empty())
150 return str << msg() << ": " << e_msg << " (" << e_name << ")";
151 else if(!e_msg.empty())
152 return str << msg() << ": " << e_msg;
157 ////////////////////////////////////////////////////////////////
158 class HalContext_Impl
164 DBusConnection *conn;
166 bool pcon; // private connection
170 ////////////////////////////////////////////////////////////////
174 zypp::RW_pointer<HalContext_Impl> hal;
182 HalDrive_Impl(const zypp::RW_pointer<HalContext_Impl> &r,
191 libhal_drive_free(drv);
196 ////////////////////////////////////////////////////////////////
202 HalVolume_Impl(LibHalVolume *v=NULL)
210 libhal_volume_free(vol);
215 ////////////////////////////////////////////////////////////////
216 HalContext_Impl::HalContext_Impl()
219 , pcon(false) // we allways use shared connections at the moment
224 conn = dbus_bus_get_private(DBUS_BUS_SYSTEM, &err.error);
226 conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err.error);
228 ZYPP_THROW(err.halException(
229 _("Unable to create dbus connection")
233 hctx = libhal_ctx_new();
237 dbus_connection_close(conn);
238 dbus_connection_unref(conn);
241 ZYPP_THROW(HalException(
242 _("libhal_ctx_new: Can't create libhal context")
246 if( !libhal_ctx_set_dbus_connection(hctx, conn))
248 libhal_ctx_free(hctx);
252 dbus_connection_close(conn);
253 dbus_connection_unref(conn);
256 ZYPP_THROW(HalException(
257 _("libhal_set_dbus_connection: Can't set dbus connection")
261 if( !libhal_ctx_init(hctx, &err.error))
263 libhal_ctx_free(hctx);
267 dbus_connection_close(conn);
268 dbus_connection_unref(conn);
271 ZYPP_THROW(err.halException(
272 _("Unable to initalize HAL context -- hald not running?")
277 // -------------------------------------------------------------
278 HalContext_Impl::~HalContext_Impl()
283 libhal_ctx_shutdown(hctx, &err.error);
284 libhal_ctx_free( hctx);
289 dbus_connection_close(conn);
290 dbus_connection_unref(conn);
295 ////////////////////////////////////////////////////////////////
296 HalContext::HalContext(bool autoconnect)
299 MutexLock lock(g_Mutex);
302 h_impl.reset( new HalContext_Impl());
305 // -------------------------------------------------------------
306 HalContext::HalContext(const HalContext &context)
309 MutexLock lock(g_Mutex);
311 zypp::RW_pointer<HalContext_Impl>(context.h_impl).swap(h_impl);
314 // -------------------------------------------------------------
315 HalContext::~HalContext()
317 MutexLock lock(g_Mutex);
322 // --------------------------------------------------------------
324 HalContext::operator=(const HalContext &context)
326 MutexLock lock(g_Mutex);
328 if( this == &context)
331 zypp::RW_pointer<HalContext_Impl>(context.h_impl).swap(h_impl);
335 // --------------------------------------------------------------
336 HalContext::operator HalContext::bool_type() const
338 MutexLock lock(g_Mutex);
343 // --------------------------------------------------------------
345 HalContext::connect()
347 MutexLock lock(g_Mutex);
350 h_impl.reset( new HalContext_Impl());
353 // --------------------------------------------------------------
354 std::vector<std::string>
355 HalContext::getAllDevices() const
357 MutexLock lock(g_Mutex);
358 VERIFY_CONTEXT(h_impl);
364 names = libhal_get_all_devices( h_impl->hctx, &count, &err.error);
367 ZYPP_THROW(err.halException());
370 std::vector<std::string> ret(names, names + count);
371 libhal_free_string_array(names);
375 // --------------------------------------------------------------
377 HalContext::getDriveFromUDI(const std::string &udi) const
379 MutexLock lock(g_Mutex);
380 VERIFY_CONTEXT(h_impl);
382 LibHalDrive *drv = libhal_drive_from_udi(h_impl->hctx, udi.c_str());
384 return HalDrive(new HalDrive_Impl( h_impl, drv));
389 // --------------------------------------------------------------
391 HalContext::getVolumeFromUDI(const std::string &udi) const
393 MutexLock lock(g_Mutex);
394 VERIFY_CONTEXT(h_impl);
396 LibHalVolume *vol = libhal_volume_from_udi(h_impl->hctx, udi.c_str());
398 return HalVolume( new HalVolume_Impl(vol));
403 // --------------------------------------------------------------
405 HalContext::getVolumeFromDeviceFile(const std::string &device_file) const
407 MutexLock lock(g_Mutex);
408 VERIFY_CONTEXT(h_impl);
410 LibHalVolume *vol = libhal_volume_from_device_file(h_impl->hctx,
411 device_file.c_str());
413 return HalVolume( new HalVolume_Impl(vol));
418 // --------------------------------------------------------------
419 std::vector<std::string>
420 HalContext::findDevicesByCapability(const std::string &capability) const
422 MutexLock lock(g_Mutex);
423 VERIFY_CONTEXT(h_impl);
429 names = libhal_find_device_by_capability(h_impl->hctx,
434 ZYPP_THROW(err.halException());
437 std::vector<std::string> ret(names, names + count);
438 libhal_free_string_array(names);
442 // --------------------------------------------------------------
444 HalContext::getDevicePropertyBool (const std::string &udi,
445 const std::string &key) const
447 MutexLock lock(g_Mutex);
448 VERIFY_CONTEXT(h_impl);
453 ret = libhal_device_get_property_bool (h_impl->hctx,
459 ZYPP_THROW(err.halException());
464 // --------------------------------------------------------------
466 HalContext::getDevicePropertyInt32 (const std::string &udi,
467 const std::string &key) const
469 MutexLock lock(g_Mutex);
470 VERIFY_CONTEXT(h_impl);
475 ret = libhal_device_get_property_int (h_impl->hctx,
481 ZYPP_THROW(err.halException());
486 // --------------------------------------------------------------
488 HalContext::getDevicePropertyUInt64(const std::string &udi,
489 const std::string &key) const
491 MutexLock lock(g_Mutex);
492 VERIFY_CONTEXT(h_impl);
497 ret = libhal_device_get_property_uint64(h_impl->hctx,
503 ZYPP_THROW(err.halException());
508 // --------------------------------------------------------------
510 HalContext::getDevicePropertyDouble(const std::string &udi,
511 const std::string &key) const
513 MutexLock lock(g_Mutex);
514 VERIFY_CONTEXT(h_impl);
519 ret = libhal_device_get_property_bool (h_impl->hctx,
525 ZYPP_THROW(err.halException());
531 // --------------------------------------------------------------
533 HalContext::getDevicePropertyString(const std::string &udi,
534 const std::string &key) const
536 MutexLock lock(g_Mutex);
537 VERIFY_CONTEXT(h_impl);
543 ptr = libhal_device_get_property_string(h_impl->hctx,
549 ZYPP_THROW(err.halException());
559 // --------------------------------------------------------------
561 HalContext::setDevicePropertyBool (const std::string &udi,
562 const std::string &key,
565 MutexLock lock(g_Mutex);
566 VERIFY_CONTEXT(h_impl);
571 ret = libhal_device_set_property_bool (h_impl->hctx,
578 ZYPP_THROW(err.halException());
582 // --------------------------------------------------------------
584 HalContext::setDevicePropertyInt32 (const std::string &udi,
585 const std::string &key,
588 MutexLock lock(g_Mutex);
589 VERIFY_CONTEXT(h_impl);
594 ret = libhal_device_set_property_int (h_impl->hctx,
601 ZYPP_THROW(err.halException());
605 // --------------------------------------------------------------
607 HalContext::setDevicePropertyUInt64(const std::string &udi,
608 const std::string &key,
611 MutexLock lock(g_Mutex);
612 VERIFY_CONTEXT(h_impl);
617 ret = libhal_device_set_property_uint64(h_impl->hctx,
624 ZYPP_THROW(err.halException());
628 // --------------------------------------------------------------
630 HalContext::setDevicePropertyDouble(const std::string &udi,
631 const std::string &key,
634 MutexLock lock(g_Mutex);
635 VERIFY_CONTEXT(h_impl);
640 ret = libhal_device_set_property_double(h_impl->hctx,
647 ZYPP_THROW(err.halException());
651 // --------------------------------------------------------------
653 HalContext::setDevicePropertyString(const std::string &udi,
654 const std::string &key,
655 const std::string &value)
657 MutexLock lock(g_Mutex);
658 VERIFY_CONTEXT(h_impl);
663 ret = libhal_device_set_property_string(h_impl->hctx,
670 ZYPP_THROW(err.halException());
674 // --------------------------------------------------------------
676 HalContext::removeDeviceProperty(const std::string &udi,
677 const std::string &key)
679 MutexLock lock(g_Mutex);
680 VERIFY_CONTEXT(h_impl);
685 ret = libhal_device_remove_property(h_impl->hctx,
691 ZYPP_THROW(err.halException());
695 ////////////////////////////////////////////////////////////////
701 // --------------------------------------------------------------
702 HalDrive::HalDrive(HalDrive_Impl *impl)
705 MutexLock lock(g_Mutex);
710 // --------------------------------------------------------------
711 HalDrive::HalDrive(const HalDrive &drive)
714 MutexLock lock(g_Mutex);
716 zypp::RW_pointer<HalDrive_Impl>(drive.d_impl).swap(d_impl);
719 // --------------------------------------------------------------
720 HalDrive::~HalDrive()
722 MutexLock lock(g_Mutex);
727 // --------------------------------------------------------------
729 HalDrive::operator=(const HalDrive &drive)
731 MutexLock lock(g_Mutex);
736 zypp::RW_pointer<HalDrive_Impl>(drive.d_impl).swap(d_impl);
740 // --------------------------------------------------------------
741 HalDrive::operator HalDrive::bool_type() const
743 MutexLock lock(g_Mutex);
748 // --------------------------------------------------------------
750 HalDrive::getUDI() const
752 MutexLock lock(g_Mutex);
753 VERIFY_DRIVE(d_impl);
755 const char *ptr = libhal_drive_get_udi(d_impl->drv);
756 return std::string(ptr ? ptr : "");
759 // --------------------------------------------------------------
761 HalDrive::getTypeName() const
763 MutexLock lock(g_Mutex);
764 VERIFY_DRIVE(d_impl);
766 const char *ptr = libhal_drive_get_type_textual(d_impl->drv);
767 return std::string(ptr ? ptr : "");
770 // --------------------------------------------------------------
772 HalDrive::getDeviceFile() const
774 MutexLock lock(g_Mutex);
775 VERIFY_DRIVE(d_impl);
777 return std::string(libhal_drive_get_device_file(d_impl->drv));
780 // --------------------------------------------------------------
782 HalDrive::getDeviceMajor() const
784 MutexLock lock(g_Mutex);
785 VERIFY_DRIVE(d_impl);
787 return libhal_drive_get_device_major(d_impl->drv);
790 // --------------------------------------------------------------
792 HalDrive::getDeviceMinor() const
794 MutexLock lock(g_Mutex);
795 VERIFY_DRIVE(d_impl);
797 return libhal_drive_get_device_minor(d_impl->drv);
800 // --------------------------------------------------------------
802 HalDrive::usesRemovableMedia() const
804 MutexLock lock(g_Mutex);
805 VERIFY_DRIVE(d_impl);
807 return libhal_drive_uses_removable_media(d_impl->drv);
810 // --------------------------------------------------------------
811 std::vector<std::string>
812 HalDrive::getCdromCapabilityNames() const
814 MutexLock lock(g_Mutex);
815 VERIFY_DRIVE(d_impl);
817 std::vector<std::string> ret;
818 LibHalDriveCdromCaps caps;
821 ** FIXME: there is no textual variant :-(
822 ** using property key names...
824 caps = libhal_drive_get_cdrom_caps(d_impl->drv);
826 if(caps & LIBHAL_DRIVE_CDROM_CAPS_CDROM)
827 ret.push_back("cdrom");
828 if(caps & LIBHAL_DRIVE_CDROM_CAPS_CDR)
829 ret.push_back("cdr");
830 if(caps & LIBHAL_DRIVE_CDROM_CAPS_CDRW)
831 ret.push_back("cdrw");
832 if(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDRAM)
833 ret.push_back("dvdram");
834 if(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDROM)
835 ret.push_back("dvd");
836 if(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDR)
837 ret.push_back("dvdr");
838 if(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDRW)
839 ret.push_back("dvdrw");
840 if(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSR)
841 ret.push_back("dvdplusr");
842 if(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRW)
843 ret.push_back("dvdplusrw");
844 if(caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRDL)
845 ret.push_back("dvdplusrdl");
850 if( libhal_drive_get_type(d_impl->drv) != LIBHAL_DRIVE_TYPE_CDROM)
851 ZYPP_THROW(HalException(_("Not a CDROM drive")));
854 ** FIXME: we use property keys matching
855 ** "storage.cdrom.cd*"
856 ** "storage.cdrom.dvd*"
857 ** but this may print other bool keys,
858 ** that are not CDROM caps.
860 LibHalPropertySet *props;
863 props = libhal_device_get_all_properties(d_impl->hal->hctx,
867 ZYPP_THROW(err.halException());
869 std::vector<std::string> ret(1, getTypeName());
871 std::string dvd("storage.cdrom.dvd");
872 std::string cd ("storage.cdrom.cd");
874 LibHalPropertySetIterator it;
875 for(libhal_psi_init(&it, props);
876 libhal_psi_has_more(&it);
877 libhal_psi_next(&it))
879 if( libhal_psi_get_type(&it) == LIBHAL_PROPERTY_TYPE_BOOLEAN &&
880 libhal_psi_get_bool(&it))
882 key = libhal_psi_get_key(&it);
883 if( key.compare(0, cd.size(), cd) == 0)
885 ret.push_back(key.substr(sizeof("storage.cdrom.")-1));
888 if( key.compare(0, dvd.size(), dvd) == 0)
890 ret.push_back(key.substr(sizeof("storage.cdrom.")-1));
894 libhal_free_property_set(props);
900 // --------------------------------------------------------------
901 std::vector<std::string>
902 HalDrive::findAllVolumes() const
904 MutexLock lock(g_Mutex);
905 VERIFY_DRIVE(d_impl);
910 names = libhal_drive_find_all_volumes(d_impl->hal->hctx,
914 std::vector<std::string> ret;
915 ret.assign(names, names + count);
916 libhal_free_string_array(names);
921 ////////////////////////////////////////////////////////////////
922 HalVolume::HalVolume()
926 HalVolume::HalVolume(HalVolume_Impl *impl)
929 MutexLock lock(g_Mutex);
934 // --------------------------------------------------------------
935 HalVolume::HalVolume(const HalVolume &volume)
938 MutexLock lock(g_Mutex);
940 zypp::RW_pointer<HalVolume_Impl>(volume.v_impl).swap(v_impl);
943 // --------------------------------------------------------------
944 HalVolume::~HalVolume()
946 MutexLock lock(g_Mutex);
951 // --------------------------------------------------------------
953 HalVolume::operator=(const HalVolume &volume)
955 MutexLock lock(g_Mutex);
960 zypp::RW_pointer<HalVolume_Impl>(volume.v_impl).swap(v_impl);
964 // --------------------------------------------------------------
965 HalVolume::operator HalVolume::bool_type() const
967 MutexLock lock(g_Mutex);
972 // --------------------------------------------------------------
974 HalVolume::getUDI() const
976 MutexLock lock(g_Mutex);
977 VERIFY_VOLUME(v_impl);
979 const char *ptr = libhal_volume_get_udi(v_impl->vol);
980 return std::string(ptr ? ptr : "");
983 // --------------------------------------------------------------
985 HalVolume::getDeviceFile() const
987 MutexLock lock(g_Mutex);
988 VERIFY_VOLUME(v_impl);
990 return std::string(libhal_volume_get_device_file(v_impl->vol));
993 // --------------------------------------------------------------
995 HalVolume::getDeviceMajor() const
997 MutexLock lock(g_Mutex);
998 VERIFY_VOLUME(v_impl);
1000 return libhal_volume_get_device_major(v_impl->vol);
1003 // --------------------------------------------------------------
1005 HalVolume::getDeviceMinor() const
1007 MutexLock lock(g_Mutex);
1008 VERIFY_VOLUME(v_impl);
1010 return libhal_volume_get_device_minor(v_impl->vol);
1013 // --------------------------------------------------------------
1015 HalVolume::isDisc() const
1017 MutexLock lock(g_Mutex);
1018 VERIFY_VOLUME(v_impl);
1020 return libhal_volume_is_disc(v_impl->vol);
1023 // --------------------------------------------------------------
1025 HalVolume::isPartition() const
1027 MutexLock lock(g_Mutex);
1028 VERIFY_VOLUME(v_impl);
1030 return libhal_volume_is_partition(v_impl->vol);
1033 // --------------------------------------------------------------
1035 HalVolume::isMounted() const
1037 MutexLock lock(g_Mutex);
1038 VERIFY_VOLUME(v_impl);
1040 return libhal_volume_is_mounted(v_impl->vol);
1043 // --------------------------------------------------------------
1045 HalVolume::getFSType() const
1047 MutexLock lock(g_Mutex);
1048 VERIFY_VOLUME(v_impl);
1050 return std::string( libhal_volume_get_fstype(v_impl->vol));
1053 // --------------------------------------------------------------
1055 HalVolume::getFSUsage() const
1057 MutexLock lock(g_Mutex);
1058 VERIFY_VOLUME(v_impl);
1060 LibHalVolumeUsage usage( libhal_volume_get_fsusage(v_impl->vol));
1064 case LIBHAL_VOLUME_USAGE_MOUNTABLE_FILESYSTEM:
1067 case LIBHAL_VOLUME_USAGE_PARTITION_TABLE:
1068 ret = "partitiontable";
1070 case LIBHAL_VOLUME_USAGE_RAID_MEMBER:
1073 case LIBHAL_VOLUME_USAGE_CRYPTO:
1076 case LIBHAL_VOLUME_USAGE_UNKNOWN:
1083 // --------------------------------------------------------------
1085 HalVolume::getMountPoint() const
1087 VERIFY_VOLUME(v_impl);
1089 return std::string( libhal_volume_get_mount_point(v_impl->vol));
1093 ////////////////////////////////////////////////////////////////
1095 //////////////////////////////////////////////////////////////////
1096 //////////////////////////////////////////////////////////////////
1097 } // namespace target
1098 ////////////////////////////////////////////////////////////////////
1099 ////////////////////////////////////////////////////////////////////
1101 //////////////////////////////////////////////////////////////////////
1103 #include <zypp/target/hal/HalContext.h>
1104 #include <zypp/target/hal/HalException.h>
1106 { ////////////////////////////////////////////////////////////////////
1107 ////////////////////////////////////////////////////////////////////
1109 { //////////////////////////////////////////////////////////////////
1110 //////////////////////////////////////////////////////////////////
1112 { ////////////////////////////////////////////////////////////////
1115 HalException::dumpOn( std::ostream & str ) const
1118 // --------------------------------------------------------------
1119 class HalContext_Impl
1123 class HalVolume_Impl
1126 // --------------------------------------------------------------
1127 HalContext::HalContext(bool)
1128 { ZYPP_THROW( NoHalException() ); }
1129 HalContext::~HalContext()
1132 HalContext::operator=(const HalContext &)
1134 HalContext::operator HalContext::bool_type() const
1137 HalContext::connect()
1139 std::vector<std::string>
1140 HalContext::getAllDevices() const
1141 { return std::vector<std::string>(); }
1143 HalContext::getDriveFromUDI(const std::string &) const
1144 { return HalDrive(); }
1146 HalContext::getVolumeFromUDI(const std::string &) const
1147 { return HalVolume(); }
1149 HalContext::getVolumeFromDeviceFile(const std::string &) const
1150 { return HalVolume(); }
1151 std::vector<std::string>
1152 HalContext::findDevicesByCapability(const std::string &) const
1153 { return std::vector<std::string>(); }
1155 HalContext::getDevicePropertyBool(const std::string &, const std::string &) const
1158 HalContext::setDevicePropertyBool (const std::string &, const std::string &, bool value)
1161 HalContext::removeDeviceProperty(const std::string &, const std::string &)
1164 HalContext::getDevicePropertyString(const std::string &, const std::string &) const
1166 // --------------------------------------------------------------
1167 HalDrive::HalDrive()
1168 { ZYPP_THROW( NoHalException() ); }
1169 HalDrive::~HalDrive()
1172 HalDrive::operator=(const HalDrive &)
1174 HalDrive::operator HalDrive::bool_type() const
1177 HalDrive::getUDI() const
1178 { return std::string(); }
1180 HalDrive::getTypeName() const
1181 { return std::string(); }
1183 HalDrive::getDeviceFile() const
1184 { return std::string(); }
1186 HalDrive::getDeviceMinor() const
1189 HalDrive::getDeviceMajor() const
1192 HalDrive::usesRemovableMedia() const
1194 std::vector<std::string>
1195 HalDrive::getCdromCapabilityNames() const
1196 { return std::vector<std::string>(); }
1197 std::vector<std::string>
1198 HalDrive::findAllVolumes() const
1199 { return std::vector<std::string>(); }
1201 // --------------------------------------------------------------
1202 HalVolume::HalVolume()
1203 { ZYPP_THROW( NoHalException() ); }
1204 HalVolume::~HalVolume()
1207 HalVolume::operator=(const HalVolume &)
1209 HalVolume::operator HalVolume::bool_type() const
1212 HalVolume::getUDI() const
1213 { return std::string(); }
1215 HalVolume::getDeviceFile() const
1216 { return std::string(); }
1218 HalVolume::getDeviceMinor() const
1221 HalVolume::getDeviceMajor() const
1224 HalVolume::isDisc() const
1227 HalVolume::isPartition() const
1230 HalVolume::isMounted() const
1233 HalVolume::getFSType() const
1234 { return std::string(); }
1236 HalVolume::getFSUsage() const
1237 { return std::string(); }
1239 HalVolume::getMountPoint() const
1240 { return std::string(); }
1242 ////////////////////////////////////////////////////////////////
1244 //////////////////////////////////////////////////////////////////
1245 //////////////////////////////////////////////////////////////////
1246 } // namespace target
1247 ////////////////////////////////////////////////////////////////////
1248 ////////////////////////////////////////////////////////////////////
1250 //////////////////////////////////////////////////////////////////////
1254 ** vim: set ts=2 sts=2 sw=2 ai et: