attributes = json.get<picojson::object>();
}
-bool MessageFolder::isMatchingAttribute(const std::string& attribute_name,
- const common::AttributeMatchFlag match_flag,
- AnyPtr match_value) const {
- ScopeLogger();
- LoggerD("Attribute: (%s), Operator: (%s), Value: (%s)", attribute_name.c_str(),
- common::AttributeMatchFlagToString(match_flag).c_str(), match_value->toString().c_str());
-
- const auto attr = attributes.find(attribute_name);
- if (attr == attributes.end()) {
- LoggerD("Attribute does not exist.");
- return false;
- }
-
- if (common::AttributeMatchFlag::kExists == match_flag) {
- return true;
- }
-
- return FilterUtils::isMatching(*match_value, attr->second, match_flag);
-}
-
-bool MessageFolder::isMatchingAttributeRange(const std::string& attribute_name,
- AnyPtr initial_value, AnyPtr end_value) const {
- ScopeLogger();
- LoggerD("attribute_name: (%s) is NOT SUPPORTED", attribute_name.c_str());
- return false;
-}
-
FolderPtrVector filterFolders(tizen::AbstractFilterPtr filter,
const FolderPtrVector& source_folders) {
ScopeLogger();
};
extern const char* MessageFolderTypeStr[MESSAGE_FOLDER_TYPE_NOTSTANDARD];
-struct MessageFolder : public tizen::FilterableObject {
+struct MessageFolder {
MessageFolder(const std::string& id, const std::string& parent_id, const std::string& service_id,
const std::string& content_type, const std::string& name, const std::string& path,
const std::string& type, bool synchronizable);
-
MessageFolder(const picojson::value& json);
-
- virtual bool isMatchingAttribute(const std::string& attribute_name,
- const common::AttributeMatchFlag match_flag,
- tizen::AnyPtr match_value) const override;
-
- virtual bool isMatchingAttributeRange(const std::string& attribute_name,
- tizen::AnyPtr initial_value,
- tizen::AnyPtr end_value) const override;
-
picojson::object attributes;
};