/*
 * Copyright (C) 2025 The Android Open Source Project
 *
 * 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
 *
 *      http://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.media.router;
option java_multiple_files = true;

enum Result {
  RESULT_UNSPECIFIED = 0;
  RESULT_SUCCESS = 1;
  RESULT_UNKNOWN_ERROR = 2;
  RESULT_REJECTED = 3;
  RESULT_NETWORK_ERROR = 4;
  RESULT_ROUTE_NOT_AVAILABLE = 5;
  RESULT_INVALID_COMMAND = 6;
  RESULT_UNIMPLEMENTED = 7;
  RESULT_FAILED_TO_REROUTE_SYSTEM_MEDIA = 8;
  RESULT_PERMISSION_DENIED = 9;
  RESULT_INVALID_ROUTE_ID = 10;
  RESULT_INVALID_SESSION_ID = 11;
  RESULT_DUPLICATE_SESSION_ID = 12;
  RESULT_PROVIDER_CALLBACK_ERROR = 13;
  RESULT_SYSTEM_SERVICE_ERROR = 14;
  RESULT_MEDIA_STREAM_CREATION_FAILED = 15;
  RESULT_MANAGER_RECORD_NOT_FOUND = 16;
  RESULT_ROUTER_RECORD_NOT_FOUND = 17;
}

enum EventType {
  EVENT_TYPE_UNSPECIFIED = 0;
  EVENT_TYPE_CREATE_SESSION = 1;
  EVENT_TYPE_CREATE_SYSTEM_ROUTING_SESSION = 2;
  EVENT_TYPE_RELEASE_SESSION = 3;
  EVENT_TYPE_SELECT_ROUTE = 4;
  EVENT_TYPE_DESELECT_ROUTE = 5;
  EVENT_TYPE_TRANSFER_TO_ROUTE = 6;
  EVENT_TYPE_SCANNING_STARTED = 7;
  EVENT_TYPE_SCANNING_STOPPED = 8;
}

/**
 * The entry points of media routing sessions.
 */
enum EntryPoint {
  // Unspecified default value.
  ENTRY_POINT_UNSPECIFIED = 0;
  // Denotes the entry point of a session started from the system output switcher.
  ENTRY_POINT_SYSTEM_OUTPUT_SWITCHER = 1;
  // Denotes the entry point of a session started from the Unified Media Object notification card.
  ENTRY_POINT_SYSTEM_MEDIA_CONTROLS = 2;
  // Denotes the entry point of a session started from an app managing its media routing.
  ENTRY_POINT_LOCAL_ROUTER = 3;
  // Denotes the entry point of a session started from an app managing the media routing of another app.
  ENTRY_POINT_PROXY_ROUTER = 4;
  // Denotes the entry point of a session started from the output switcher in TV.
  ENTRY_POINT_TV_OUTPUT_SWITCHER = 5;
}

/**
 * The transfer reason for a media session to transfer from one route to another.
 */
enum TransferReason {
 // Unspecified default value.
 TRANSFER_REASON_UNSPECIFIED = 0;
 // Indicated that the transfer happened by the default logic without the system's or user's request.
 // For example, an automatically connected BT device will have this as the transfer reason.
 TRANSFER_REASON_FALLBACK = 1;
 // Indicates that the transfer happened from within a privileged application.
 TRANSFER_REASON_SYSTEM_REQUEST = 2;
 // Indicates that the transfer happened from a non-privileged app.
 TRANSFER_REASON_APP = 3;
}
