// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto2";

package android.bluetooth.rootcanal.model.devices.ScriptedBeaconBleAdProto;

option optimize_for = LITE_RUNTIME;

message BleAdvertisement {
  optional bytes payload = 1;
  optional bytes mac_address = 2;
  optional uint32 delay_before_send_ms = 3;
}

message BleAdvertisementList {
  repeated BleAdvertisement advertisements = 1;
}

message PlaybackEvent {
  // These events should occur in order, starting from INITIALIZED
  enum PlaybackEventType {
    UNKNOWN = 0;
    INITIALIZED = 1;
    SCANNED_ONCE = 2;
    WAITING_FOR_FILE = 3;
    WAITING_FOR_FILE_TO_BE_READABLE = 4;
    PARSING_FILE = 5;
    PLAYBACK_STARTED = 6;
    PLAYBACK_ENDED = 7;
    // Error conditions
    FILE_PARSING_FAILED = 8;
  }
  optional PlaybackEventType type = 1;
  optional uint64 secs_since_epoch = 2;
}