backup.proto 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  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. package launcher_backup;
  17. option java_package = "com.android.launcher3.backup";
  18. option java_outer_classname = "BackupProtos";
  19. message Key {
  20. enum Type {
  21. FAVORITE = 1;
  22. SCREEN = 2;
  23. ICON = 3;
  24. WIDGET = 4;
  25. }
  26. required Type type = 1;
  27. optional string name = 2; // keep this short
  28. optional int64 id = 3;
  29. optional int64 checksum = 4;
  30. }
  31. message CheckedMessage {
  32. required bytes payload = 1;
  33. required int64 checksum = 2;
  34. }
  35. message DeviceProfieData {
  36. required float desktop_rows = 1;
  37. required float desktop_cols = 2;
  38. required float hotseat_count = 3;
  39. required int32 allapps_rank = 4;
  40. }
  41. message Journal {
  42. required int32 app_version = 1;
  43. // Time when the backup was created
  44. required int64 t = 2;
  45. // Total bytes written during the last backup
  46. // OBSOLETE: A state may contain entries which are already present in the backup
  47. // and were not written in the last backup
  48. optional int64 bytes = 3;
  49. // Total entries written during the last backup
  50. // OBSOLETE: A state may contain entries which are already present in the backup
  51. // and were not written in the last backup
  52. optional int32 rows = 4;
  53. // Valid keys for this state
  54. repeated Key key = 5;
  55. // Backup format version.
  56. optional int32 backup_version = 6 [default = 1];
  57. optional DeviceProfieData profile = 7;
  58. }
  59. message Favorite {
  60. required int64 id = 1;
  61. required int32 itemType = 2;
  62. optional string title = 3;
  63. optional int32 container = 4;
  64. optional int32 screen = 5;
  65. optional int32 cellX = 6;
  66. optional int32 cellY = 7;
  67. optional int32 spanX = 8;
  68. optional int32 spanY = 9;
  69. optional int32 displayMode = 10;
  70. optional int32 appWidgetId = 11;
  71. optional string appWidgetProvider = 12;
  72. optional string intent = 13;
  73. optional string uri = 14;
  74. optional int32 iconType = 15;
  75. optional string iconPackage = 16;
  76. optional string iconResource = 17;
  77. optional bytes icon = 18;
  78. }
  79. message Screen {
  80. required int64 id = 1;
  81. optional int32 rank = 2;
  82. }
  83. message Resource {
  84. required int32 dpi = 1;
  85. required bytes data = 2;
  86. }
  87. message Widget {
  88. required string provider = 1;
  89. optional string label = 2;
  90. optional bool configure = 3;
  91. optional Resource icon = 4;
  92. optional Resource preview = 5;
  93. }