/*
 * Copyright (C) 2019 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.
 */

package android.hardware.cas@1.2;

import android.hardware.cas@1.0;
import android.hardware.cas@1.1;

enum Status : @1.0::Status {
    /**
     * ERROR_CAS_NEED_ACTIVATION is used to trigger device activation process.
     */
    ERROR_CAS_NEED_ACTIVATION,
    /**
     * ERROR_CAS_NEED_PAIRING is used to trigger pairing process.
     */
    ERROR_CAS_NEED_PAIRING,
    /**
     * ERROR_CAS_NO_CARD is used to report no smart card for descrambling.
     */
    ERROR_CAS_NO_CARD,
    /**
     * ERROR_CAS_CARD_MUTE is used to report smart card is muted for
     * descrambling.
     */
    ERROR_CAS_CARD_MUTE,
    /**
     *  ERROR_CAS_CARD_INVALID is used to report smart card isn't valid.
     */
    ERROR_CAS_CARD_INVALID,
    /**
     *  ERROR_CAS_BLACKOUT is used to report geographical blackout.
     */
    ERROR_CAS_BLACKOUT,
    /**
     * ERROR_CAS_REBOOTING is used to report CAS is during rebooting.
     */
    ERROR_CAS_REBOOTING,
};

/**
 * The intented usage for the session.
 */
enum SessionIntent : uint32_t {
    /**
     * Live Stream.
     */
    LIVE,
    /**
     * Playback Recorded Stream.
     */
    PLAYBACK,
    /**
     * Record Live Stream.
     */
    RECORD,
    /**
     * View the content with Time Shift capability
     */
    TIMESHIFT,
};

/**
 * The Scrambling Mode.
 */
enum ScramblingMode : uint32_t {
    RESERVED = 0,
    /**
     * DVB (Digital Video Broadcasting) CSA1 (Common Scrambling Algorithm 1) is
     * the default mode and shall be used when the scrambling descriptor
     * is not present in the program map section. DVB scrambling mode is
     * specified in ETSI EN 300 468 specification.
     */
    DVB_CSA1,
    DVB_CSA2,
    /**
     * DVB-CSA3 in standard mode.
     */
    DVB_CSA3_STANDARD,
    /**
     * DVB-CSA3 in minimally enhanced mode.
     */
    DVB_CSA3_MINIMAL,
    /**
     * DVB-CSA3 in fully enhanced mode.
     */
    DVB_CSA3_ENHANCE,
    /**
     * DVB-CISSA version 1.
     */
    DVB_CISSA_V1,
    /**
     * ATIS-0800006 IIF Default Scrambling Algorithm (IDSA).
     */
    DVB_IDSA,
    /**
     * a symmetric key algorithm.
     */
    MULTI2,
    /**
     * Advanced Encryption System (AES) 128-bit Encryption mode.
     */
    AES128,
    /**
     * Advanced Encryption System (AES) Electronic Code Book (ECB) mode.
     */
    AES_ECB,
    /**
     * Advanced Encryption System (AES) Society of Cable Telecommunications
     * Engineers (SCTE) 52 mode.
     */
    AES_SCTE52,
    /**
     * Triple Data Encryption Algorithm (TDES) Electronic Code Book (ECB) mode.
     */
    TDES_ECB,
    /**
     * Triple Data Encryption Algorithm (TDES) Society of Cable Telecommunications
     * Engineers (SCTE) 52 mode.
     */
    TDES_SCTE52,
 };

/**
 * The Event Type for status change.
 */
enum StatusEvent : uint8_t {
    /**
     * The status of CAS plugin was changed due to physical module insertion or
     * removal. Client must call enumeratePlugins to update plugins' status.
     */
    PLUGIN_PHYSICAL_MODULE_CHANGED,
    /**
     * The status of supported session number was changed due to physical module
     * insertion or removal. Client must update session resource according to
     * latest StatusMessage from the StatusEvent. The plugin supports unlimited
     * sesssion by default.
     */
    PLUGIN_SESSION_NUMBER_CHANGED,
};
