// Copyright 2010 Google Inc. All Rights Reserved.
// Author: wink@google.com (Wink Saville)

package ril_proto;

option java_package='com.android.internal.telephony.ril_proto';
option java_outer_classname='RilCmds';

enum RadioState {
    RADIOSTATE_OFF                      = 0; /* Radio explictly powered off (eg CFUN=0) */
    RADIOSTATE_UNAVAILABLE              = 1; /* Radio unavailable (eg, resetting or not booted) */
    RADIOSTATE_SIM_NOT_READY            = 2; /* Radio is on, but the SIM interface is not ready */
    RADIOSTATE_SIM_LOCKED_OR_ABSENT     = 3; /* SIM PIN locked, PUK required, network
                                                personalization locked, or SIM absent */
    RADIOSTATE_SIM_READY                = 4; /* Radio is on and SIM interface is available */
    RADIOSTATE_RUIM_NOT_READY           = 5; /* Radio is on, but the RUIM interface is not ready */
    RADIOSTATE_RUIM_READY               = 6; /* Radio is on and the RUIM interface is available */
    RADIOSTATE_RUIM_LOCKED_OR_ABSENT    = 7; /* RUIM PIN locked, PUK required, network
                                                personalization locked, or RUIM absent */
    RADIOSTATE_NV_NOT_READY             = 8; /* Radio is on, but the NV interface is not available */
    RADIOSTATE_NV_READY                 = 9; /* Radio is on and the NV interface is available */
}

enum RilCardState {
    CARDSTATE_ABSENT   = 0;
    CARDSTATE_PRESENT  = 1;
    CARDSTATE_ERROR    = 2;
}

enum RilPersoSubstate {
    PERSOSUBSTATE_UNKNOWN                   = 0; /* initial state */
    PERSOSUBSTATE_IN_PROGRESS               = 1; /* in between each lock transition */
    PERSOSUBSTATE_READY                     = 2; /* when either SIM or RUIM Perso is finished
                                                    since each app can only have 1 active perso
                                                    involved */
    PERSOSUBSTATE_SIM_NETWORK               = 3;
    PERSOSUBSTATE_SIM_NETWORK_SUBSET        = 4;
    PERSOSUBSTATE_SIM_CORPORATE             = 5;
    PERSOSUBSTATE_SIM_SERVICE_PROVIDER      = 6;
    PERSOSUBSTATE_SIM_SIM                   = 7;
    PERSOSUBSTATE_SIM_NETWORK_PUK           = 8; /* The corresponding perso lock is blocked */
    PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK    = 9;
    PERSOSUBSTATE_SIM_CORPORATE_PUK         = 10;
    PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK  = 11;
    PERSOSUBSTATE_SIM_SIM_PUK               = 12;
    PERSOSUBSTATE_RUIM_NETWORK1             = 13;
    PERSOSUBSTATE_RUIM_NETWORK2             = 14;
    PERSOSUBSTATE_RUIM_HRPD                 = 15;
    PERSOSUBSTATE_RUIM_CORPORATE            = 16;
    PERSOSUBSTATE_RUIM_SERVICE_PROVIDER     = 17;
    PERSOSUBSTATE_RUIM_RUIM                 = 18;
    PERSOSUBSTATE_RUIM_NETWORK1_PUK         = 19; /* The corresponding perso lock is blocked */
    PERSOSUBSTATE_RUIM_NETWORK2_PUK         = 20;
    PERSOSUBSTATE_RUIM_HRPD_PUK             = 21;
    PERSOSUBSTATE_RUIM_CORPORATE_PUK        = 22;
    PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23;
    PERSOSUBSTATE_RUIM_RUIM_PUK             = 24;
}

enum RilAppState {
    APPSTATE_UNKNOWN               = 0;
    APPSTATE_DETECTED              = 1;
    APPSTATE_PIN                   = 2; /* If PIN1 or UPin is required */
    APPSTATE_PUK                   = 3; /* If PUK1 or Puk for UPin is required */
    APPSTATE_SUBSCRIPTION_PERSO    = 4; /* perso_substate should be look at
                                           when app_state is assigned to this value */
    APPSTATE_READY                 = 5;
}

enum RilPinState {
    PINSTATE_UNKNOWN              = 0;
    PINSTATE_ENABLED_NOT_VERIFIED = 1;
    PINSTATE_ENABLED_VERIFIED     = 2;
    PINSTATE_DISABLED             = 3;
    PINSTATE_ENABLED_BLOCKED      = 4;
    PINSTATE_ENABLED_PERM_BLOCKED = 5;
}

enum RilAppType {
  APPTYPE_UNKNOWN = 0;
  APPTYPE_SIM     = 1;
  APPTYPE_USIM    = 2;
  APPTYPE_RUIM    = 3;
  APPTYPE_CSIM    = 4;
}

message RilAppStatus {
  optional RilAppType      app_type         = 1;
  optional RilAppState     app_state        = 2;
  optional RilPersoSubstate perso_substate  = 3; /* applicable only if app_state ==
                                                    APPSTATE_SUBSCRIPTION_PERSO */
  optional string          aid              = 4; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
                                                    0x30, 0x30, 0x30 */
  optional string          app_label        = 5; /* null terminated string */
  optional int32           pin1_replaced    = 6; /* applicable to USIM and CSIM */
  optional RilPinState     pin1             = 7;
  optional RilPinState     pin2             = 8;
}


message RilCardStatus {
  optional RilCardState card_state                      = 1; /* current state */
  optional RilPinState  universal_pin_state             = 2; /* applicable to USIM and CSIM: PINSTATE_xxx */
  optional int32        gsm_umts_subscription_app_index = 3; /* value < CARD_MAX_APPS */
  optional int32        cdma_subscription_app_index     = 4; /* value < CARD_MAX_APPS */
  optional int32        ims_subscription_app_index      = 5; /* value < CARD_MAX_APPS */
  optional int32        num_applications                = 6; /* value <= CARD_MAX_APPS */
  repeated RilAppStatus applications                    = 7; /* CARD_MAX_APPS == 8 */
}

/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
enum RilUusType {
    RILUUSTYPE1_IMPLICIT        = 0;
    RILUUSTYPE1_REQUIRED        = 1;
    RILUUSTYPE1_NOT_REQUIRED    = 2;
    RILUUSTYPE2_REQUIRED        = 3;
    RILUUSTYPE2_NOT_REQUIRED    = 4;
    RILUUSTYPE3_REQUIRED        = 5;
    RILUUSTYPE3_NOT_REQUIRED    = 6;
};

/* User-to-User Signaling Information data coding schemes. Possible values for
 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
enum RilUusDcs {
    RILUUSDCS_USP               = 0;   /* User specified protocol */
    RILUUSDCS_OSIHLP            = 1;   /* OSI higher layer protocol */
    RILUUSDCS_X244              = 2;   /* X.244 */
    RILUUSDCS_RMCF              = 3;   /* Reserved for system mangement
                                          convergence function */
    RILUUSDCS_IA5c              = 4;   /* IA5 characters */
}

/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
 * This data is passed in RIL_ExtensionRecord and rec contains this
 * structure when type is RIL_UUS_INFO_EXT_REC */
message RilUusInfo {
  optional RilUusType uus_type  = 1; /* UUS Type */
  optional RilUusDcs uus_dcs    = 2; /* UUS Data Coding Scheme */
  optional int32 uus_length     = 3; /* Length of UUS Data */
  optional string uus_data      = 4; /* UUS Data */
}

enum RilCallState {
    CALLSTATE_ACTIVE     = 0;
    CALLSTATE_HOLDING    = 1;
    CALLSTATE_DIALING    = 2;   /* MO call only */
    CALLSTATE_ALERTING   = 3;   /* MO call only */
    CALLSTATE_INCOMING   = 4;   /* MT call only */
    CALLSTATE_WAITING    = 5;   /* MT call only */
}

message RilCall {
    optional RilCallState    state               = 1;  /* State of the call */
    optional int32           index               = 2;  /* Connection Index for use with,
                                                          eg, AT+CHLD */
    optional int32           toa                 = 3;  /* type of address, eg 145 = intl */
    optional bool            is_mpty             = 4;  /* true if is mpty call */
    optional bool            is_mt               = 5;  /* true if call is mobile terminated */
    optional int32           als                 = 6;  /* ALS line indicator if available
                                                          (0 = line 1) */
    optional bool            is_voice            = 7;  /* true if this is is a voice call */
    optional bool            is_voice_privacy    = 8;  /* true if CDMA voice privacy mode
                                                          is active */
    optional string          number              = 9;  /* Remote party number */
    optional int32           number_presentation = 10; /* 0=Allowed, 1=Restricted,
                                                          2=Not Specified/Unknown 3=Payphone */
    optional string          name                = 11; /* Remote party name */
    optional int32           name_presentation   = 12; /* 0=Allowed, 1=Restricted,
                                                          2=Not Specified/Unknown 3=Payphone */
    optional RilUusInfo      uus_info            = 13; /* NULL or Pointer to User-User Signaling
                                                          Information */
}

message RILGWSignalStrength {
    optional int32 signal_strength = 1;   /* Valid values are (0-31, 99) as defined
                                             in TS 27.007 8.5 */
    optional int32 bit_error_rate  = 2;   /* bit error rate (0-7, 99) as defined
                                             in TS 27.007 8.5 */
}

message RILCDMASignalStrength {
    optional int32 dbm  = 1; /* Valid values are positive integers. This value is the actual RSSI
                                value multiplied by -1. Example: If the actual RSSI is -75, then
                                this response value will be 75.  */
    optional int32 ecio = 2; /* Valid values are positive integers. This value is the actual Ec/Io
                                multiplied by -10.  Example: If the actual Ec/Io is -12.5 dB, then
                                this response value will be 125. */
}

message RILEVDOSignalStrength {
    optional int32 dbm  = 1; /* Valid values are positive integers. This value is the actual RSSI
                                value multiplied by -1.  Example: If the actual RSSI is -75, then
                                this response value will be 75.  */
    optional int32 ecio = 2; /* Valid values are positive integers. This value is the actual
                                Ec/Io multiplied by -10.  Example: If the actual Ec/Io is -12.5 dB,
                                then this response value will be 125. */
    optional int32 signal_noise_ratio = 3; /* Valid values are 0-8.
                                        8 is the highest signal to noise ratio. */
}

message RILLTESignalStrength {
    optional int32 signal_strength = 1; /* Valid values are (0-31, 99)
                                         *  as defined in TS 27.007 8.5 */
    optional int32 rsrp = 2;            /* The current Reference Signal Receive Power in dBm
                                         * multipled by -1. Range: 44 to 140 dBm,
                                         * TODO: doc reference */
    optional int32 rsrq = 3;            /* The current Reference Signal Receive Quality in dB
                                         * multiplied by -1. Range: 20 to 3 dB.
                                         * TODO: doc reference */
    optional int32 rssnr = 4;           /* TODO: Need documentation and doc reference */
    optional int32 cqi = 5;             /* TODO: Need documentation and doc reference */
}

// Response is an array of strings.
//
// If a strings(i) is "*magic-null*" then that value will be returned as null.
message RspStrings{
  repeated string strings                   = 1;
}

// Response is an array of integers
message RspIntegers{
  repeated int32 integers                   = 1;
}

//  1 RIL_REQUEST_GET_SIM_STATUS
message RspGetSimStatus {
  required RilCardStatus card_status        = 1;
}

//  2 RIL_REQUEST_ENTER_SIM_PIN
message ReqEnterSimPin {
  required string pin                       = 1;
}
//    RIL_REQUEST_ENTER_SIM_PIN response
message RspEnterSimPin {
  required int32 retries_remaining          = 1;
}

//  9 RIL_GET_CURRENT_CALLS response
message RspGetCurrentCalls {
  repeated RilCall calls                    = 1;
}

//  10 RIL_REQUEST_DIAL
message ReqDial {
  optional string     address  = 1;
  optional int32      clir     = 2;
                             /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
                              * clir == 0 on "use subscription default value"
                              * clir == 1 on "CLIR invocation" (restrict CLI presentation)
                              * clir == 2 on "CLIR suppression" (allow CLI presentation)
                              */
  optional RilUusInfo uus_info = 3;    /* NULL or Pointer to User-User Signaling Information */
}

// 12 RIL_REQUEST_HANG_UP
message ReqHangUp {
  required int32 connection_index           = 1;
}

// 18 response for RIL_REQUEST_LAST_CALL_FAIL_CAUSE
message RspLastCallFailCause {
  required int32 last_call_fail_cause       = 1;
}

// 19 RIL_REQUEST_SIGNAL_STRENGTH response
message RspSignalStrength {
    optional RILGWSignalStrength   gw_signalstrength   = 1;
    optional RILCDMASignalStrength cdma_signalstrength = 2;
    optional RILEVDOSignalStrength evdo_signalstrength = 3;
    optional RILLTESignalStrength lte_signalstrength = 4;
}

// 22 RIL_REQUEST_OPERATOR response
message RspOperator{
  optional string long_alpha_ons            = 1; // The long alpha ons or eons
  optional string short_alpha_ons           = 2; // The short alpha ons or eons
  optional string mcc_mnc                   = 3; // The 5 or 6 digit mcc + mnc
}

// 52 RIL_REQUEST_SEPARATE_CONNECTION
message ReqSeparateConnection{
  required int32 index                      = 1; // Connection index to separate
                                                 // from multiparty call
}

// 53 RIL_REQUEST_SET_MUTE
message ReqSetMute{
  required bool state                       = 1; // true to "enable mute", false to "disable mute"
}

// 61 RIL_REQUEST_SCREEN_STATE
message ReqScreenState {
  required bool state                       = 1; // true screen is on, false screen is off
}

