blob: 8ae1752342dca8a947f615b113711b14f8e96835 [file] [log] [blame]
Chris Wren1ada10d2013-09-13 18:01:38 -04001/*
2 * Copyright (C) 2013 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package launcher_backup;
18
19option java_package = "com.android.launcher3.backup";
20option java_outer_classname = "BackupProtos";
21
22message Key {
23 enum Type {
24 FAVORITE = 1;
25 SCREEN = 2;
Chris Wren22e130d2013-09-23 18:25:57 -040026 ICON = 3;
Chris Wrenfd13c712013-09-27 15:45:19 -040027 WIDGET = 4;
Chris Wren1ada10d2013-09-13 18:01:38 -040028 }
29 required Type type = 1;
30 optional string name = 2; // keep this short
31 optional int64 id = 3;
32 optional int64 checksum = 4;
33}
34
35message CheckedMessage {
36 required bytes payload = 1;
37 required int64 checksum = 2;
38}
39
Sunny Goyal33d44382014-10-16 09:24:19 -070040message DeviceProfieData {
41 required float desktop_rows = 1;
42 required float desktop_cols = 2;
43 required float hotseat_count = 3;
44 required int32 allapps_rank = 4;
45}
46
Chris Wren1ada10d2013-09-13 18:01:38 -040047message Journal {
48 required int32 app_version = 1;
Sunny Goyal33d44382014-10-16 09:24:19 -070049
50 // Time when the backup was created
Chris Wren1ada10d2013-09-13 18:01:38 -040051 required int64 t = 2;
Sunny Goyal33d44382014-10-16 09:24:19 -070052
53 // Total bytes written during the last backup
54 // OBSOLETE: A state may contain entries which are already present in the backup
55 // and were not written in the last backup
Chris Wren1ada10d2013-09-13 18:01:38 -040056 optional int64 bytes = 3;
Sunny Goyal33d44382014-10-16 09:24:19 -070057
58 // Total entries written during the last backup
59 // OBSOLETE: A state may contain entries which are already present in the backup
60 // and were not written in the last backup
Chris Wren1ada10d2013-09-13 18:01:38 -040061 optional int32 rows = 4;
Sunny Goyal33d44382014-10-16 09:24:19 -070062
63 // Valid keys for this state
Chris Wren1ada10d2013-09-13 18:01:38 -040064 repeated Key key = 5;
Sunny Goyal33d44382014-10-16 09:24:19 -070065
66 // Backup format version.
67 optional int32 backup_version = 6 [default = 1];
68
69 optional DeviceProfieData profile = 7;
Chris Wren1ada10d2013-09-13 18:01:38 -040070}
71
72message Favorite {
73 required int64 id = 1;
74 required int32 itemType = 2;
75 optional string title = 3;
76 optional int32 container = 4;
77 optional int32 screen = 5;
78 optional int32 cellX = 6;
79 optional int32 cellY = 7;
80 optional int32 spanX = 8;
81 optional int32 spanY = 9;
82 optional int32 displayMode = 10;
83 optional int32 appWidgetId = 11;
84 optional string appWidgetProvider = 12;
85 optional string intent = 13;
86 optional string uri = 14;
87 optional int32 iconType = 15;
88 optional string iconPackage = 16;
89 optional string iconResource = 17;
90 optional bytes icon = 18;
91 }
92
93message Screen {
94 required int64 id = 1;
95 optional int32 rank = 2;
96 }
97
98message Resource {
Chris Wrenfd13c712013-09-27 15:45:19 -040099 required int32 dpi = 1;
100 required bytes data = 2;
101 }
102
103message Widget {
104 required string provider = 1;
105 optional string label = 2;
106 optional bool configure = 3;
107 optional Resource icon = 4;
108 optional Resource preview = 5;
Chris Wren1ada10d2013-09-13 18:01:38 -0400109 }