Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / sync / internal_api / base_node.cc
index ac04768..57dbb22 100644 (file)
@@ -290,6 +290,16 @@ ModelType BaseNode::GetModelType() const {
   return GetEntry()->GetModelType();
 }
 
+const syncer::AttachmentIdList BaseNode::GetAttachmentIds() const {
+  AttachmentIdList result;
+  const sync_pb::AttachmentMetadata& metadata =
+      GetEntry()->GetAttachmentMetadata();
+  for (int i = 0; i < metadata.record_size(); ++i) {
+    result.push_back(AttachmentId::CreateFromProto(metadata.record(i).id()));
+  }
+  return result;
+}
+
 void BaseNode::SetUnencryptedSpecifics(
     const sync_pb::EntitySpecifics& specifics) {
   ModelType type = GetModelTypeFromSpecifics(specifics);