// Copyright 2026 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

edition = "2023";

package cast_receiver;

option optimize_for = LITE_RUNTIME;

option features.field_presence = IMPLICIT;
option java_multiple_files = true;
option java_package = "com.google.pixel.exo.proto";
option java_outer_classname = "ActionInvocationProto";

// Next index: 4
message FallbackAction {
  // The user id representing the user that the application should be launched
  // as. On Android, this is the ID returned by UserHandle.getIdentifier().
  int32 user_id = 1;

  oneof data {
    // The package name of the application to be launched.
    string package_name = 2;

    // The URI of the intent to be launched.
    string uri = 3;
  }
}

// Next index: 7
message ActionInvocation {
  // The ID of the notification as generated by
  // StatusBarNotification.getKey().hashCode().
  int64 notification_id = 1;

  // This is a sequence number, which is generated by the order of the action
  // list for each notification. Besides, -1 is reserved action id for
  // "DISMISS" action and -2 is reserved "SELECT" action and -3 for "ANSWER".
  int64 action_id = 2;

  // Data payload associated with the action. Interpretation of this field
  // depends on the action being referred to by the action_id.
  string data = 3;

  // Fallback action to invoke if the notification is selected but no longer
  // valid.
  FallbackAction fallback_action = 4;

  // The hashcode of the StatusBarNotification for detecting if the notification
  // has been updated before the user clicks on it.
  string notification_hash = 5;

  // An unique launch ID is used to identify the operation.
  int64 launch_id = 6;
}
