• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2020 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
17syntax = "proto2";
18
19option java_package = "com.android.timezone.location.tools.proto";
20option java_multiple_files = false;
21
22package com.android.timezone.location.tools.proto;
23
24// The format need to write a TZ S2 data file.
25message TimeZones {
26    // All the time zone ID sets referenced by index from the ranges.
27    repeated TimeZoneIdSet timeZoneIdSets = 1;
28
29    // S2 cell ranges with the same time zone IDs. Must be ordered by (unsigned)
30    // S2 start cell ID, no overlaps, gaps permitted.
31    repeated S2Range ranges = 2;
32}
33
34// Sets of time zone IDs.
35message TimeZoneIdSet {
36
37    // A set of IANA TZDB time zone IDs, e.g. {"Europe/London", "Europe/Paris"}
38    repeated string timeZoneIds = 1;
39}
40
41// An S2 cell range with the same time zone ID(s).
42message S2Range {
43
44    // The start S2 cell ID (inclusive).
45    required uint64 startCellId = 1;
46
47    // The end S2 cell ID (exclusive).
48    required uint64 endCellId = 2;
49
50    // The index of the TimeZoneIdSet (TimeZones.timeZoneIdSets) associated with
51    // the range.
52    required uint32 timeZoneIdSetIndex = 3;
53}
54