// Copyright 2013 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. // // Protocol buffer definitions for Drive backend of Syncable FileSystem. syntax = "proto2"; option optimize_for = LITE_RUNTIME; package sync_file_system.drive_backend; enum FileKind { KIND_UNSUPPORTED = 0; KIND_FILE = 1; KIND_FOLDER = 2; } message ServiceMetadata { optional int64 largest_change_id = 1; optional string sync_root_folder_id = 2; } message DriveFileMetadata { // File ID of the remote file/folder which the DriveFileMetadata tracks. required string file_id = 1; required string parent_folder_id = 2; optional string app_id = 3; optional bool is_app_root = 4; // Holds details of file/folder metadata. message Details { repeated string parent_folder_id = 1; optional string title = 2; optional FileKind kind = 3; optional string md5 = 4; optional string etag = 5; // Creation time and modification time of the resource. // Serialized by Time::ToInternalValue. optional int64 creation_time = 6; optional int64 modification_time = 7; optional bool deleted = 8; optional int64 change_id = 9; } // |synced_details| holds the file details snapshot when the file was // fetched through remote-to-local update. // This should contain same value as remote_details if |dirty| is false. optional Details synced_details = 5; // |remote_details| holds the latest file details that may not yet be // applied to local metadata. // This should be updated by each listed ChangeResource. optional Details remote_details = 6; // True if the file is changed since the last update for this file. optional bool dirty = 7; // True if the DriveFileMetadata is active. // Remote file content update should only be applied for active // DriveFileMetadata. // Active DriveFileMetadata must have a unique title under its parent. optional bool active = 8; // Valid only for folders. // True indicates the folder contents has not yet been fetched. optional bool needs_folder_listing = 9; }