1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Protocol buffer definitions for Drive backend of Syncable FileSystem.
9 option optimize_for = LITE_RUNTIME;
11 package sync_file_system.drive_backend;
14 FILE_KIND_UNSUPPORTED = 0;
20 TRACKER_KIND_REGULAR = 0;
21 TRACKER_KIND_APP_ROOT = 1;
22 TRACKER_KIND_DISABLED_APP_ROOT = 2;
25 message ServiceMetadata {
26 optional int64 largest_change_id = 1;
27 optional int64 sync_root_tracker_id = 2;
29 // The sequence number of FileTrackers. Must be positive.
30 optional int64 next_tracker_id = 3;
33 // Holds details of file/folder metadata.
35 repeated string parent_folder_ids = 1;
37 optional string title = 2;
38 optional FileKind file_kind = 3;
39 optional string md5 = 4;
40 optional string etag = 5;
42 // Creation time and modification time of the resource.
43 // Serialized by Time::ToInternalValue.
44 optional int64 creation_time = 6;
45 optional int64 modification_time = 7;
47 optional bool missing = 8;
48 optional int64 change_id = 9;
51 // Represents a server-side file.
52 message FileMetadata {
53 // File ID of the remote file/folder which the FileMetadata represents.
54 required string file_id = 1;
56 optional FileDetails details = 2;
59 // Represents synced local file.
61 // A unique sequence number to identify the tracker. Must be positive.
62 required int64 tracker_id = 1;
64 // Points the parent tracker in the tracker tree. 0 if there's no parent.
65 required int64 parent_tracker_id = 2;
67 required string file_id = 3;
69 optional string app_id = 4;
70 optional TrackerKind tracker_kind = 5;
72 // Available on an active tracker.
73 // Represents detailed file information on last remote-to-local sync.
74 optional FileDetails synced_details = 6;
76 // True if the file is changed since the last update for this file.
77 optional bool dirty = 7;
79 // True if the FileTracker is active.
80 // Remote file modification should only be applied to active trackers.
81 // Active FileTracker must have a unique title under its parent.
82 optional bool active = 8;
84 // Valid only for folders.
85 // True if the folder contents have not yet been fetched.
86 optional bool needs_folder_listing = 9;