Skip to content

Commit

Permalink
Merge tag 'android-4.4_r1' into cm-11.0
Browse files Browse the repository at this point in the history
Android 4.4 Release 1.0

Conflicts:
	include/telephony/ril.h
	libril/ril.cpp
	libril/ril_commands.h
	libril/ril_unsol_commands.h
  • Loading branch information
rmcc committed Nov 1, 2013
2 parents cb688f2 + a18b9d1 commit 40e57d7
Show file tree
Hide file tree
Showing 10 changed files with 682 additions and 17 deletions.
43 changes: 43 additions & 0 deletions include/telephony/record_stream.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (C) 2006 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.
*/

/*
* A simple utility for reading fixed records out of a stream fd
*/

#ifndef _LIBRIL_RECORD_STREAM_H
#define _LIBRIL_RECORD_STREAM_H

#ifdef __cplusplus
extern "C" {
#endif


typedef struct RecordStream RecordStream;

extern RecordStream *record_stream_new(int fd, size_t maxRecordLen);
extern void record_stream_free(RecordStream *p_rs);

extern int record_stream_get_next (RecordStream *p_rs, void ** p_outRecord,
size_t *p_outRecordLen);

#ifdef __cplusplus
}
#endif


#endif /*_LIBRIL_RECORD_STREAM_H*/

115 changes: 112 additions & 3 deletions include/telephony/ril.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <stdlib.h>
#include <stdint.h>
#include <telephony/ril_cdma_sms.h>
#ifndef FEATURE_UNIT_TEST
#include <sys/time.h>
#endif /* !FEATURE_UNIT_TEST */
Expand All @@ -27,7 +28,7 @@
extern "C" {
#endif

#define RIL_VERSION 8 /* Current version */
#define RIL_VERSION 9 /* Current version */
#ifdef LEGACY_RIL
#define RIL_VERSION_MIN 2 /* Minimum RIL_VERSION supported */
#else
Expand Down Expand Up @@ -125,7 +126,8 @@ typedef enum {
PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
PREF_NET_TYPE_LTE_ONLY = 11 /* LTE only */
PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
} RIL_PreferredNetworkType;

/* Source for cdma subscription */
Expand Down Expand Up @@ -239,6 +241,28 @@ typedef struct {
to point connections. */
} RIL_Data_Call_Response_v6;

typedef enum {
RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
} RIL_RadioTechnologyFamily;

typedef struct {
RIL_RadioTechnologyFamily tech;
unsigned char retry; /* 0 == not retry, nonzero == retry */
int messageRef; /* Valid field if retry is set to nonzero.
Contains messageRef from RIL_SMS_Response
corresponding to failed MO SMS.
*/

union {
/* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
RIL_CDMA_SMS_Message* cdmaMessage;

/* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
char** gsmMessage;
} message;
} RIL_IMS_SMS_Message;

typedef struct {
int messageRef; /* TP-Message-Reference for GSM,
and BearerData MessageId for CDMA
Expand Down Expand Up @@ -405,7 +429,7 @@ typedef enum {
PDP_FAIL_DATA_REGISTRATION_FAIL = -2,

/* reasons for data call drop - network/modem disconnect */
PDP_FAIL_SIGNAL_LOST = -3, /* no retry */
PDP_FAIL_SIGNAL_LOST = -3,
PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
with parameters appropriate for new technology */
PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
Expand Down Expand Up @@ -3490,6 +3514,64 @@ typedef struct {
*/
#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110

/**
* RIL_REQUEST_SET_INITIAL_ATTACH_APN
*
* Set an apn to initial attach network
* "response" is NULL
*
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
* SUBSCRIPTION_NOT_AVAILABLE
*/
#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111

/**
* RIL_REQUEST_IMS_REGISTRATION_STATE
*
* Request current IMS registration state
*
* "data" is NULL
*
* "response" is int *
* ((int *)response)[0] is registration state:
* 0 - Not registered
* 1 - Registered
* ((int *)response)[1] is bitmap of the supported services:
* & 0x1 - SMS supported
*
* If IMS is registered and supports SMS, then ((int *) response)[2]
* must follow with IMS SMS format:
*
* ((int *) response)[2] is of type const RIL_IMS_SMS_Format
*/
#define RIL_REQUEST_IMS_REGISTRATION_STATE 112

/**
* RIL_REQUEST_IMS_SEND_SMS
*
* Send a SMS message over IMS
*
* "data" is const RIL_IMS_SMS_Message *
*
* "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, and other errors means no retry.
* In case of retry, data is encoded based on Voice Technology available.
*
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* SMS_SEND_FAIL_RETRY
* FDN_CHECK_FAILURE
* GENERIC_FAILURE
*
*/
#define RIL_REQUEST_IMS_SEND_SMS 113

/***********************************************************************/


Expand Down Expand Up @@ -3980,6 +4062,25 @@ typedef struct {
*/
#define RIL_UNSOL_CELL_INFO_LIST 1036

/*
* RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
*
* Called when IMS registration state has changed
*
* "data" is int *
* ((int *)response)[0] is registration state:
* 0 - Not registered
* 1 - Registered
* ((int *)response)[1] is bitmap of the services supported:
* & 0x1 - SMS supported
*
* If IMS is registered and supports SMS, then ((int *) response)[2]
* must follow with IMS SMS format:
*
* ((int *) response)[2] is of type const RIL_IMS_SMS_Format
*/
#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037

/***********************************************************************/


Expand Down Expand Up @@ -4048,6 +4149,14 @@ typedef struct {
RIL_GetVersion getVersion;
} RIL_RadioFunctions;

typedef struct {
char *apn;
char *protocol;
int authtype;
char *username;
char *password;
} RIL_InitialAttachApn;

#ifdef RIL_SHLIB
struct RIL_Env {
/**
Expand Down
6 changes: 4 additions & 2 deletions libril/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ LOCAL_SHARED_LIBRARIES := \
libutils \
libbinder \
libcutils \
libhardware_legacy
libhardware_legacy \
librilutils

LOCAL_CFLAGS :=
ifdef BOARD_USE_NEW_LIBRIL_HTC
Expand Down Expand Up @@ -51,7 +52,8 @@ LOCAL_SRC_FILES:= \

LOCAL_STATIC_LIBRARIES := \
libutils_static \
libcutils
libcutils \
librilutils_static

LOCAL_CFLAGS :=

Expand Down
Loading

0 comments on commit 40e57d7

Please sign in to comment.