db/upnp/Directory: move checkobjok() to class UPnPDirObject
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#define MPD_UPNP_OBJECT_HXX
|
||||
|
||||
#include "tag/Tag.hxx"
|
||||
#include "Compiler.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -87,6 +88,13 @@ public:
|
||||
item_class = ItemClass::UNKNOWN;
|
||||
tag.Clear();
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
bool Check() const {
|
||||
return !id.empty() && !parent_id.empty() && !name.empty() &&
|
||||
(type != UPnPDirObject::Type::ITEM ||
|
||||
item_class != UPnPDirObject::ItemClass::UNKNOWN);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _UPNPDIRCONTENT_H_X_INCLUDED_ */
|
||||
|
Reference in New Issue
Block a user