Commit 0c63b641 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

File/Folder: Publicly expose isRemovable

parent 3e91a7eb
......@@ -52,6 +52,7 @@ public:
virtual Type type() const = 0;
virtual unsigned int lastModificationDate() const = 0;
virtual unsigned int size() const = 0;
virtual bool isRemovable() const = 0;
///
/// \brief isExternal returns true if this stream isn't managed by the medialibrary
///
......
......@@ -46,6 +46,7 @@ public:
virtual const std::string& mrl() const = 0;
virtual const std::string& name() const = 0;
virtual bool isPresent() const = 0;
virtual bool isRemovable() const = 0;
/**
* @brief isBanned Will return true if the folder was explicitely banned
* from being discovered.
......
......@@ -61,7 +61,7 @@ public:
virtual unsigned int size() const override;
virtual bool isExternal() const override;
bool updateFsInfo( uint32_t newLastModificationDate, uint32_t newSize );
bool isRemovable() const;
virtual bool isRemovable() const override;
std::shared_ptr<Media> media() const;
bool destroy();
......
......@@ -397,6 +397,11 @@ int64_t Folder::deviceId() const
return m_deviceId;
}
bool Folder::isRemovable() const
{
return m_isRemovable;
}
bool Folder::isPresent() const
{
if ( m_device == nullptr )
......
......@@ -79,6 +79,7 @@ public:
std::vector<std::shared_ptr<Folder>> folders();
std::shared_ptr<Folder> parent();
int64_t deviceId() const;
virtual bool isRemovable() const override;
virtual bool isPresent() const override;
virtual bool isBanned() const override;
bool isRootFolder() const;
......
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