ril.h

来自「Android的Radio Interface Layer (RIL)提供了电话」· C头文件 代码 · 共 2,325 行 · 第 1/4 页

H
2,325
字号
/** * RIL_REQUEST_LAST_CALL_FAIL_CAUSE * * Requests the failure cause code for the most recently terminated call * * "data" is NULL * "response" is a "int *" * ((int *)response)[0] is an integer cause code defined in TS 24.008 *   Annex H or close approximation * * If the implementation does not have access to the exact cause codes, * then it should return one of the values listed in RIL_LastCallFailCause, * as the UI layer needs to distinguish these cases for tone generation or * error notification. * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE * * See also: RIL_REQUEST_LAST_PDP_FAIL_CAUSE */#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18/** * RIL_REQUEST_SIGNAL_STRENGTH * * Requests current signal strength and bit error rate * * Must succeed if radio is on. * * "data" is NULL * "response" is an "int *" * ((int *)response)[0] is received signal strength (0-31, 99) * ((int *)response)[1] is bit error rate (0-7, 99) *  as defined in TS 27.007 8.5 *  Other values (eg -1) are not legal * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE */#define RIL_REQUEST_SIGNAL_STRENGTH 19/** * RIL_REQUEST_REGISTRATION_STATE * * Request current registration state * * "data" is NULL * "response" is a "char **" * ((const char **)response)[0] is registration state 0-5 from TS 27.007 7.2 * ((const char **)response)[1] is LAC if registered or NULL if not * ((const char **)response)[2] is CID if registered or NULL if not * * LAC and CID are in hexadecimal format. * valid LAC are 0x0000 - 0xffff * valid CID are 0x00000000 - 0xffffffff *  * Please note that registration state 4 ("unknown") is treated  * as "out of service" in the Android telephony system * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE */#define RIL_REQUEST_REGISTRATION_STATE 20/** * RIL_REQUEST_GPRS_REGISTRATION_STATE * * Request current GPRS registration state * * "data" is NULL * "response" is a "char **" * ((const char **)response)[0] is registration state 0-5 from TS 27.007 7.2 * ((const char **)response)[1] is LAC if registered or NULL if not * ((const char **)response)[2] is CID if registered or NULL if not * ((const char **)response)[3] indicates the available radio technology, where: *      0 == unknown *      1 == GPRS only *      2 == EDGE *      3 == UMTS * * LAC and CID are in hexadecimal format. * valid LAC are 0x0000 - 0xffff * valid CID are 0x00000000 - 0xffffffff *  * Please note that registration state 4 ("unknown") is treated  * as "out of service" in the Android telephony system * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE */#define RIL_REQUEST_GPRS_REGISTRATION_STATE 21/** * RIL_REQUEST_OPERATOR * * Request current operator ONS or EONS * * "data" is NULL * "response" is a "const char **" * ((const char **)response)[0] is long alpha ONS or EONS  *                                  or NULL if unregistered * * ((const char **)response)[1] is short alpha ONS or EONS  *                                  or NULL if unregistered * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC) *                                  or NULL if unregistered *                                   * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE */#define RIL_REQUEST_OPERATOR 22/** * RIL_REQUEST_RADIO_POWER * * Toggle radio on and off (for "airplane" mode) * "data" is int * * ((int *)data)[0] is > 0 for "Radio On" * ((int *)data)[0] is == 0 for "Radio Off" * * "response" is NULL * * Turn radio on if "on" > 0 * Turn radio off if "on" == 0 * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE */#define RIL_REQUEST_RADIO_POWER 23/** * RIL_REQUEST_DTMF * * Send a DTMF tone * * If the implementation is currently playing a tone requested via * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone * should be played instead * * "data" is a char * * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,# * ((char *)data)[1] is a single character with one of 3 values: *    'S' -- tone should be played for a short time *    'L' -- tone should be played for a long time * "response" is NULL *  * FIXME should this block/mute microphone? * How does this interact with local DTMF feedback? * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE * * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START * */#define RIL_REQUEST_DTMF 24/** * RIL_REQUEST_SEND_SMS *  * Send an SMS message * * "data" is const char ** * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed *      by a length byte (as expected by TS 27.005) or NULL for default SMSC * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string *      less the SMSC address *      TP-Layer-Length is be "strlen(((const char **)data)[1])/2" * * "response" is a const RIL_SMS_Response * * * Based on the return error, caller decides to resend if sending sms * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)  * and GENERIC_FAILURE means no retry (i.e. error cause is 500) * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  SMS_SEND_FAIL_RETRY *  GENERIC_FAILURE * * FIXME how do we specify TP-Message-Reference if we need to resend? */#define RIL_REQUEST_SEND_SMS 25/** * RIL_REQUEST_SEND_SMS_EXPECT_MORE *  * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS, * except that more messages are expected to be sent soon. If possible, * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command) * * "data" is const char ** * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed *      by a length byte (as expected by TS 27.005) or NULL for default SMSC * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string *      less the SMSC address *      TP-Layer-Length is be "strlen(((const char **)data)[1])/2" * * "response" is a const RIL_SMS_Response * * * Based on the return error, caller decides to resend if sending sms * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)  * and GENERIC_FAILURE means no retry (i.e. error cause is 500) * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  SMS_SEND_FAIL_RETRY *  GENERIC_FAILURE * */#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26/** * RIL_REQUEST_SETUP_DEFAULT_PDP * * Configure and activate PDP context (CID 1) for default IP connection  * * Android Telephony layer will start up pppd process on specified * tty when this request responded to. * * "data" is a const char ** * ((const char **)data)[0] is the APN to connect to * ((const char **)data)[1] is the username, or NULL * ((const char **)data)[2] is the password, or NULL * * "response" is a char ** * ((char **)response)[0] indicating PDP CID, which is generated by RIL * ((char **)response)[1] indicating the network interface name * ((char **)response)[2] indicating the IP address for this interface * * FIXME may need way to configure QoS settings * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE * * See also: RIL_REQUEST_DEACTIVATE_DEFAULT_PDP */#define RIL_REQUEST_SETUP_DEFAULT_PDP 27/** * RIL_REQUEST_SIM_IO * * Request SIM I/O operation. * This is similar to the TS 27.007 "restricted SIM" operation * where it assumes all of the EF selection will be done by the * callee. * * "data" is a const RIL_SIM_IO * * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL, * or may specify a PIN2 for operations that require a PIN2 (eg * updating FDN records) * * "response" is a const RIL_SIM_IO_Response * * * Arguments and responses that are unused for certain * values of "command" should be ignored or set to NULL * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE *  SIM_PIN2 *  SIM_PUK2 */#define RIL_REQUEST_SIM_IO 28/** * RIL_REQUEST_SEND_USSD * * Send a USSD message * * If a USSD session already exists, the message should be sent in the * context of that session. Otherwise, a new session should be created. * * The network reply should be reported via RIL_UNSOL_ON_USSD * * Only one USSD session may exist at a time, and the session is assumed * to exist until: *   a) The android system invokes RIL_REQUEST_CANCEL_USSD *   b) The implementation sends a RIL_UNSOL_ON_USSD with a type code *      of "0" (USSD-Notify/no further action) or "2" (session terminated) * * "data" is a const char * containing the USSD request in UTF-8 format * "response" is NULL * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE * * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD */#define RIL_REQUEST_SEND_USSD 29/** * RIL_REQUEST_CANCEL_USSD *  * Cancel the current USSD session if one exists * * "data" is null * "response" is NULL * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE  */#define RIL_REQUEST_CANCEL_USSD 30/**   * RIL_REQUEST_GET_CLIR * * Gets current CLIR status * "data" is NULL * "response" is int * * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7 * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE */#define RIL_REQUEST_GET_CLIR 31/** * RIL_REQUEST_SET_CLIR * * "data" is int * * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 * * "response" is NULL * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE */#define RIL_REQUEST_SET_CLIR 32/** * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS * * "data" is const RIL_CallForwardInfo * * * "response" is const RIL_CallForwardInfo ** * "response" points to an array of RIL_CallForwardInfo *'s, one for * each distinct registered phone number. * * For example, if data is forwarded to +18005551212 and voice is forwarded * to +18005559999, then two separate RIL_CallForwardInfo's should be returned *  * If, however, both data and voice are forwarded to +18005551212, then * a single RIL_CallForwardInfo can be returned with the service class * set to "data + voice = 3") * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE */#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33/** * RIL_REQUEST_SET_CALL_FORWARD * * Configure call forward rule * * "data" is const RIL_CallForwardInfo * * "response" is NULL *   * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE */#define RIL_REQUEST_SET_CALL_FORWARD 34/** * RIL_REQUEST_QUERY_CALL_WAITING * * Query current call waiting state * * "data" is const int * * ((const int *)data)[0] is the TS 27.007 service class to query. * "response" is a const int * * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled" * * If ((const int *)response)[0] is = 1, then ((const int *)response)[1] * must follow, with the TS 27.007 service class bit vector of services * for which call waiting is enabled. * * For example, if ((const int *)response)[0]  is 1 and  * ((const int *)response)[1] is 3, then call waiting is enabled for data * and voice and disabled for everything else * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE */#define RIL_REQUEST_QUERY_CALL_WAITING 35/** * RIL_REQUEST_SET_CALL_WAITING * * Configure current call waiting state * * "data" is const int * * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled" * ((const int *)data)[1] is the TS 27.007 service class bit vector of *                           services to modify * "response" is NULL * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE */#define RIL_REQUEST_SET_CALL_WAITING 36/** * RIL_REQUEST_SMS_ACKNOWLEDGE * * Acknowledge successful or failed receipt of SMS previously indicated * via RIL_UNSOL_RESPONSE_NEW_SMS  * * "data" is int * * ((int *)data)[0] is "1" on successful receipt  *                  (basically, AT+CNMA=1 from TS 27.005 * ((int *)data)[0] is "0" on failed receipt  *                  (basically, AT+CNMA=2 from TS 27.005) * * "response" is NULL * * FIXME would like request that specified RP-ACK/RP-ERROR PDU * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE */#define RIL_REQUEST_SMS_ACKNOWLEDGE  37/** * RIL_REQUEST_GET_IMEI * * Get the device IMEI, including check digit * * Valid when RadioState is not RADIO_STATE_UNAVAILABLE * * "data" is NULL * "response" is a const char * containing the IMEI * * Valid errors: *  SUCCESS  *  RADIO_NOT_AVAILABLE (radio resetting) *  GENERIC_FAILURE */#define RIL_REQUEST_GET_IMEI 38/** * RIL_REQUEST_GET_IMEISV * * Get the device IMEISV, which should be two decimal digits * * Valid when RadioState is not RADIO_STATE_UNAVAILABLE * * "data" is NULL * "response" is a const char * containing the IMEISV * * Valid errors: *  SUCCESS  *  RADIO_NOT_AVAILABLE (radio resetting) *  GENERIC_FAILURE */#define RIL_REQUEST_GET_IMEISV 39/** * RIL_REQUEST_ANSWER * * Answer incoming call * * Will not be called for WAITING calls. * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case * instead * * "data" is NULL * "response" is NULL * * Valid errors: *  SUCCESS  *  RADIO_NOT_AVAILABLE (radio resetting) *  GENERIC_FAILURE */#define RIL_REQUEST_ANSWER 40/** * RIL_REQUEST_DEACTIVATE_DEFAULT_PDP * * Deactivate PDP context created by RIL_REQUEST_SETUP_DEFAULT_PDP * * "data" is const char ** * ((char**)data)[0] indicating PDP CID * "response" is NULL * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE * * See also: RIL_REQUEST_SETUP_DEFAULT_PDP */#define RIL_REQUEST_DEACTIVATE_DEFAULT_PDP 41/** * RIL_REQUEST_QUERY_FACILITY_LOCK * * Query the status of a facility lock state * * "data" is const char ** * ((const char **)data)[0] is the facility string code from TS 27.007 7.4   *                      (eg "AO" for BAOC, "SC" for SIM lock) * ((const char **)data)[1] is the password, or "" if not required * ((const char **)data)[2] is the TS 27.007 service class bit vector of *                           services to query * * "response" is an int * * ((const int *)response) 0 is the TS 27.007 service class bit vector of *                           services for which the specified barring facility  *                           is active. "0" means "disabled for all" *  * * Valid errors: *  SUCCESS *  RADIO_NOT_AVAILABLE *  GENERIC_FAILURE * */#define RIL_REQUEST_QUERY_FACILITY_LOCK 42/** * RIL_REQUEST_SET_FACILITY_LOCK * * Enable/disable one facility lock * * "data" is const char ** * * ((const char **)data)[0] = facility string code from TS 27.007 7.4 * (eg "AO" for BAOC)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?