Home | History | Annotate | Download | only in protos
      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 
     17  package launcher_backup;
     18 
     19 option java_package = "com.android.launcher3.backup";
     20 option java_outer_classname = "BackupProtos";
     21 
     22 message Key {
     23   enum Type {
     24     FAVORITE = 1;
     25     SCREEN = 2;
     26     ICON = 3;
     27     WIDGET = 4;
     28   }
     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 
     35 message CheckedMessage {
     36   required bytes payload = 1;
     37   required int64 checksum = 2;
     38 }
     39 
     40 message 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 
     47 message Journal {
     48   required int32 app_version = 1;
     49 
     50   // Time when the backup was created
     51   required int64 t = 2;
     52 
     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
     56   optional int64 bytes = 3;
     57 
     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
     61   optional int32 rows = 4;
     62 
     63   // Valid keys for this state
     64   repeated Key key = 5;
     65 
     66   // Backup format version.
     67   optional int32 backup_version = 6 [default = 1];
     68 
     69   optional DeviceProfieData profile = 7;
     70 }
     71 
     72 message 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 
     93 message Screen {
     94   required int64 id = 1;
     95   optional int32 rank = 2;
     96  }
     97 
     98 message Resource {
     99   required int32 dpi = 1;
    100   required bytes data = 2;
    101  }
    102 
    103 message 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;
    109  }
    110