• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2019 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto2";
16
17package icing.lib;
18
19import "icing/proto/status.proto";
20
21option java_package = "com.google.android.icing.proto";
22option java_multiple_files = true;
23option objc_class_prefix = "ICNG";
24
25// The type of persistence guarantee that PersistToDisk should provide.
26// Next tag: 3
27message PersistType {
28  enum Code {
29    // Default. Should never be used.
30    UNKNOWN = 0;
31
32    // Only persist the ground truth. A successful PersistToDisk(LITE) should
33    // ensure that no data is lost the next time Icing initializes. This
34    // should be called after each batch of mutations.
35    LITE = 1;
36
37    // Persists all data in internal Icing components. A successful
38    // PersistToDisk(FULL) should not only ensure no data loss like
39    // PersistToDisk(LITE), but also prevent the need to recover internal data
40    // structures the next time Icing initializes. This should be called at
41    // some point before the app terminates.
42    FULL = 2;
43  }
44  optional Code code = 1;
45}
46
47// Result of a call to IcingSearchEngine.Persist
48// Next tag: 2
49message PersistToDiskResultProto {
50  // Status code can be one of:
51  //   OK
52  //   FAILED_PRECONDITION
53  //   INTERNAL
54  //
55  // See status.proto for more details.
56  optional StatusProto status = 1;
57}
58