ukui-search/ukui-search-service-dir-man.../dirwatcher/search-dir.cpp

58 lines
1.0 KiB
C++
Raw Normal View History

#include "search-dir.h"
SearchDir::SearchDir(const QString &path, bool generateBlackList)
{
m_path = path;
if(generateBlackList) {
//根据VulumeManager和Congig的数据计算黑名单here
}
}
bool SearchDir::operator ==(const SearchDir &rhs) const
{
return (m_path == rhs.m_path);
}
SearchDir::ErrorInfo SearchDir::error()
{
return m_error;
}
QString SearchDir::errorString()
{
switch (m_error) {
case ErrorInfo::Successful:
return "";
case ErrorInfo::Duplicated:
return "";
case ErrorInfo::UnderBlackList:
return "";
case ErrorInfo::RepeatMount1:
return "";
case ErrorInfo::RepeatMount2:
return "";
case ErrorInfo::NotExists:
return "";
}
}
QString SearchDir::getPath() const
{
return m_path;
}
void SearchDir::setBlackList(const QStringList &blackList)
{
m_blackList = blackList;
}
QStringList SearchDir::getBlackList() const
{
return m_blackList;
}
void SearchDir::generateBlackList()
{
//生成黑名单
}