This repository was archived by the owner on Dec 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathuser_metadata.proto
More file actions
81 lines (65 loc) · 2.91 KB
/
Copy pathuser_metadata.proto
File metadata and controls
81 lines (65 loc) · 2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
* Copyright 2019 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto2";
package goosci;
option java_package = "com.google.android.apps.forscience.whistlepunk.metadata";
option java_outer_classname = "GoosciUserMetadata";
option objc_class_prefix = "GSJ";
option optimize_for = LITE_RUNTIME;
import "third_party/sciencejournal/ios/Protos/device_spec.proto";
import "third_party/sciencejournal/ios/Protos/version.proto";
/*
* Represents metadata shared across the whole Science Journal app for one user.
* Added in V2.
*/
message UserMetadata {
// Experiment state that is per-user, such as whether the experiment is archived.
repeated ExperimentOverview experiments = 1;
// Deprecated, use fileVersion below
optional int32 version = 2 [default = 1, deprecated=true];
// Deprecated, use fileVersion below
optional int32 minorVersion = 3 [default = 1, deprecated=true];
// "My Devices" are added to when a user connects to an external sensor, and are shown in a
// special section of the Manage Sensors screen. See device_spec.proto for details.
repeated DeviceSpec myDevices = 4;
// Identifies the intended format version of this file, and the app that wrote it.
// See version.proto for details.
optional FileVersion fileVersion = 5;
}
/*
* Data about an experiment that is specific to a device.
* Some data, like title and imagePath, is duplicated here in order to make the Experiment List
* load faster: this way we don't need to parse every available experiment.
*/
message ExperimentOverview {
// Our local lookup Id for this experiment.
optional string experimentId = 1;
// The user-entered title of this experiment.
optional string title = 2;
// The path to an image used for this experiment, if applicable.
optional string imagePath = 3;
// The time when this experiment was last used.
optional int64 lastUsedTimeMs = 4;
// The number of trials in this experiment.
optional int32 trialCount = 5;
// Whether this experiment is archived.
optional bool isArchived = 6;
// Index into the Experiment Colors array. This allows the experiment to have a consistent
// color overlay if its imagePath is not yet set.
// See values/experiment_colors.xml.
optional int32 colorIndex = 7 [default=0];
// Information about DriveFileID and sync state can be added here as needed.
}