blob: 986e29fced4f6e87a4b9c2ea23970781a7a20dc3 [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Sync protocol for attachments.
// Update proto_{value,enum}_conversions{.h,.cc,_unittest.cc} if you change any
// fields in this file.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
option retain_unknown_fields = true;
package sync_pb;
// Identifies an attachment.
message AttachmentIdProto {
// Uniquely identifies the attachment. Two attachments with the same unique_id
// are considered equivalent.
optional string unique_id = 1;
// Size of the attachment data in bytes.
optional uint64 size_bytes = 2;
// Crc32c of the attachment data.
optional uint32 crc32c = 3;
}
// Metadata for a single attachment.
message AttachmentMetadataRecord {
optional AttachmentIdProto id = 1;
// Indicates we know this attachment exists on the server.
optional bool is_on_server = 2;
}
// A collection of attachment metadata. This proto is part of EntryKernel's "on
// disk" representation. Private to sync.
message AttachmentMetadata {
// One record per attachment.
repeated AttachmentMetadataRecord record = 1;
}