Commit 68ad2ee3 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

IDevice: Add a setPresent method

parent 27d5747f
...@@ -36,6 +36,7 @@ public: ...@@ -36,6 +36,7 @@ public:
virtual const std::string& uuid() const = 0; virtual const std::string& uuid() const = 0;
virtual bool isRemovable() const = 0; virtual bool isRemovable() const = 0;
virtual bool isPresent() const = 0; virtual bool isPresent() const = 0;
virtual void setPresent( bool present ) = 0;
virtual const std::string& mountpoint() const = 0; virtual const std::string& mountpoint() const = 0;
}; };
} }
......
...@@ -55,6 +55,11 @@ bool CommonDevice::isPresent() const ...@@ -55,6 +55,11 @@ bool CommonDevice::isPresent() const
return m_present; return m_present;
} }
void CommonDevice::setPresent( bool present )
{
m_present = present;
}
const std::string& CommonDevice::mountpoint() const const std::string& CommonDevice::mountpoint() const
{ {
return m_mountpoint; return m_mountpoint;
......
...@@ -36,6 +36,7 @@ public: ...@@ -36,6 +36,7 @@ public:
virtual const std::string& uuid() const override; virtual const std::string& uuid() const override;
virtual bool isRemovable() const override; virtual bool isRemovable() const override;
virtual bool isPresent() const override; virtual bool isPresent() const override;
virtual void setPresent( bool present ) override;
virtual const std::string& mountpoint() const override; virtual const std::string& mountpoint() const override;
private: private:
......
...@@ -302,6 +302,10 @@ public: ...@@ -302,6 +302,10 @@ public:
return true; return true;
} }
virtual void setPresent( bool ) override
{
}
virtual const std::string& mountpoint() const override virtual const std::string& mountpoint() const override
{ {
return m_mountpoint; return m_mountpoint;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment