/*
 * 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.os.statsd.privatespace;

option java_outer_classname = "PrivateSpaceProtoEnums";
option java_multiple_files = true;

// Result of the move content transfer.
enum TransferResult {
  TRANSFER_RESULT_UNKNOWN = 0;
  // All files successfully transferred
  TRANSFER_RESULT_SUCCESS = 1;
  // The whole transfer failed, no files transferred.
  TRANSFER_RESULT_FAILURE = 2;
  // Transfer started but not all files successfully transferred.
  // Look into individual files' errors.
  TRANSFER_RESULT_PARTIAL_SUCCESS = 3;
}

// Types of the operation chosen with the dialog
enum OperationType {
  OPERATION_UNKNOWN = 0;
  // move button clicked
  OPERATION_MOVE = 1;
  // copy button clicked
  OPERATION_COPY = 2;
  // cancel button clicked
  OPERATION_CANCEL_BY_USER = 3;
  // dialog dismissed
  OPERATION_DIALOG_DISMISSED = 4;
}

// Errors for the file transfer operation
enum TransferErrorCode {
  TRANSFER_ERROR_UNKNOWN = 0;

  // Errors that fail the whole transfer, all files expected to have the same
  // error.
  TRANSFER_ERROR_ANOTHER_TRANSFER_IN_PROGRESS = 1;
  TRANSFER_ERROR_ABOVE_FILE_SIZE_LIMITS = 2;
  TRANSFER_ERROR_TOO_MANY_FILES_SELECTED = 3;
  TRANSFER_ERROR_ABOVE_AVAILABLE_DEVICE_STORAGE = 4;
  TRANSFER_ERROR_NOT_ENOUGH_SPACE = 5;

  // Errors while transferring a single file
  TRANSFER_ERROR_CALCULATE_FILE_SIZE = 101;
  TRANSFER_ERROR_GET_METADATA = 102;
  TRANSFER_ERROR_CREATE_NEW_MEDIA_ENTRY = 103;
  TRANSFER_ERROR_GET_FILE_NAME = 104;
  TRANSFER_ERROR_QUERY_URI = 105;
  TRANSFER_ERROR_OPEN_OUTPUT_STREAM = 106;
  TRANSFER_ERROR_OPEN_INPUT_STREAM = 107;
  TRANSFER_ERROR_COPY_FILE = 108;
  TRANSFER_ERROR_REMOVE_ORIGINAL_FILE = 109;
  // TODO add errors for ioexception and other common exceptions?
}

// Buckets for the file sizes.
// 0-1KB, 1-10KB, 10-100KB, 100-500KB, 500KB-1MB, 1MB-10MB, 10MB-100MB,
// 100MB-500MB, 500MB-1GB, 1GB-2GB, >2GB
enum FileSizeBucket {
  FILE_SIZE_UNKNOWN = 0;
  FILE_SIZE_0_TO_1_KB = 1;
  FILE_SIZE_1_TO_10_KB = 2;
  FILE_SIZE_10_TO_100_KB = 3;
  FILE_SIZE_100_TO_500_KB = 4;
  FILE_SIZE_500_KB_TO_1_MB = 5;
  FILE_SIZE_1_TO_10_MB = 6;
  FILE_SIZE_10_TO_100_MB = 7;
  FILE_SIZE_100_TO_500_MB = 8;
  FILE_SIZE_500_MB_TO_1_GB = 9;
  FILE_SIZE_1_TO_2_GB = 10;
  FILE_SIZE_MORE_THAN_2_GB = 11;
}

// MIME types categories.
enum MimeTypeCategory {
  MIME_TYPE_CATEGORY_UNKNOWN = 0;
  MIME_TYPE_CATEGORY_IMAGE = 1;
  MIME_TYPE_CATEGORY_VIDEO = 2;
  MIME_TYPE_CATEGORY_AUDIO = 3;
  MIME_TYPE_CATEGORY_APPLICATION = 4;
  MIME_TYPE_CATEGORY_PDF = 5;
  MIME_TYPE_CATEGORY_TEXT = 6;
  MIME_TYPE_CATEGORY_GENERIC_OCTET_STREAM = 7;
  MIME_TYPE_CATEGORY_OTHERS = 8;
}

// Types of user interaction with the move content notification.
enum NotificationEventType {
  NOTIFICATION_EVENT_TYPE_UNKNOWN = 0;
  NOTIFICATION_EVENT_TYPE_SHOW_FILES_CLICK = 1;
}

// Shortcut types
enum AddButtonShortcutClick {
  ADD_BUTTON_CLICK_UNKNOWN = 0;
  ADD_BUTTON_CLICK_OPEN_MARKET_APP_SHORTCUT = 1;
  ADD_BUTTON_CLICK_MOVE_FILES_SHORTCUT = 2;
}