*
* \brief Hardware abstaction layer library wrapper implementation.
*/
-#ifndef FAKE_HAL // disables zypp's HAL dependency
-
-#include <zypp/target/hal/HalContext.h>
-#include <zypp/thread/Mutex.h>
-#include <zypp/thread/MutexLock.h>
-#include <zypp/base/NonCopyable.h>
-#include <zypp/base/Logger.h>
-#include <zypp/base/String.h>
-#include <zypp/base/Gettext.h>
-
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib.h>
+#include "zypp/base/Gettext.h"
+#include "zypp/target/hal/HalException.h"
+//////////////////////////////////////////////////////////////////////
+namespace zypp
+{ ////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////
+ namespace target
+ { //////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////
+ namespace hal
+ { ////////////////////////////////////////////////////////////////
+ HalException::HalException()
+ : zypp::Exception(_("Hal Exception"))
+ {}
+ HalException::HalException(const std::string &msg_r)
+ : zypp::Exception(_("Hal Exception"))
+ , e_name()
+ , e_msg(msg_r)
+ {}
+ HalException::HalException(const std::string &err_name, const std::string &err_msg)
+ : zypp::Exception(_("Hal Exception"))
+ , e_name(err_name)
+ , e_msg(err_msg)
+ {}
+ NoHalException::NoHalException()
+ : Exception(_("Sorry, but this version of libzypp was built without HAL support."))
+ {}
+ ////////////////////////////////////////////////////////////////
+ } // namespace hal
+ //////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////
+ } // namespace target
+ ////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////
+} // namespace zypp
+//////////////////////////////////////////////////////////////////////
+
+#ifndef NO_HAL // disables zypp's HAL dependency
+
+#include "zypp/target/hal/HalContext.h"
+#include "zypp/thread/Mutex.h"
+#include "zypp/thread/MutexLock.h"
+#include "zypp/base/NonCopyable.h"
+#include "zypp/base/Logger.h"
+#include "zypp/base/String.h"
+#include "zypp/base/Gettext.h"
+
#include <hal/libhal.h>
#include <hal/libhal-storage.h>
////////////////////////////////////////////////////////////////////
} // namespace zypp
//////////////////////////////////////////////////////////////////////
-#else // FAKE_HAL
-#include <zypp/target/hal/HalContext.h>
-#include <zypp/target/hal/HalException.h>
+#else // NO_HAL
+#include "zypp/target/hal/HalContext.h"
+#include "zypp/target/hal/HalException.h"
namespace zypp
{ ////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
// --------------------------------------------------------------
HalContext::HalContext(bool)
- {}
+ { ZYPP_THROW( NoHalException() ); }
HalContext::~HalContext()
{}
HalContext &
{ return ""; }
// --------------------------------------------------------------
HalDrive::HalDrive()
- {}
+ { ZYPP_THROW( NoHalException() ); }
HalDrive::~HalDrive()
{}
HalDrive &
// --------------------------------------------------------------
HalVolume::HalVolume()
- {}
+ { ZYPP_THROW( NoHalException() ); }
HalVolume::~HalVolume()
{}
HalVolume &
////////////////////////////////////////////////////////////////////
} // namespace zypp
//////////////////////////////////////////////////////////////////////
-#endif // FAKE_HAL
+#endif // NO_HAL
/*
** vim: set ts=2 sts=2 sw=2 ai et: