void startMockRil(v8::Handle<v8::Context> context) {
v8::HandleScope handle_scope;
+ v8::TryCatch try_catch;
// Get handle to startMockRil and call it.
v8::Handle<v8::String> name = v8::String::New("startMockRil");
v8::Handle<v8::Function> start =
v8::Handle<v8::Function>::Cast(functionValue);
- start->Call(context->Global(), 0, NULL);
+ v8::Handle<v8::Value> result = start->Call(context->Global(), 0, NULL);
+ if (try_catch.HasCaught()) {
+ LOGE("startMockRil error");
+ ReportException(&try_catch);
+ LOGE("FATAL ERROR: Unsable to startMockRil.");
+ } else {
+ v8::String::Utf8Value result_string(result);
+ LOGE("startMockRil result=%s", ToCString(result_string));
+ }
+
}
return status;
}
+/**
+ * request for RIL_REQUEST_ENTER_SIM_PIN // 2
+ */
int ReqEnterSimPin(Buffer **pBuffer,
const void *data, const size_t datalen, const RIL_Token t) {
int status;
status = STATUS_BAD_DATA;
} else {
ril_proto::ReqEnterSimPin *req = new ril_proto::ReqEnterSimPin();
+ DBG("ReqEnterSimPin: pin = %s", ((const char **)data)[0]);
req->set_pin((((char **)data)[0]));
buffer = Buffer::New(req->ByteSize());
req->SerializeToArray(buffer->data(), buffer->length());
return status;
}
+/**
+ * request for RIL_REQUEST_DIAL // 10
+ */
+int ReqDial(Buffer **pBuffer,
+ const void *data, const size_t datalen, const RIL_Token t) {
+ int status;
+ Buffer *buffer;
+
+ DBG("ReqDial E");
+ DBG("data=%p datalen=%d t=%p", data, datalen, t);
+
+ if (datalen < sizeof(int)) {
+ LOGE("ReqHangUp: data to small err size < sizeof int");
+ status = STATUS_BAD_DATA;
+ } else {
+ ril_proto::ReqDial *req = new ril_proto::ReqDial();
+
+ // cast the data to RIL_Dial
+ RIL_Dial *rilDial = (RIL_Dial *)data;
+ DBG("ReqDial: rilDial->address =%s, rilDial->clir=%d", rilDial->address, rilDial->clir);
+
+ req->set_address(rilDial->address);
+ req->set_clir(rilDial->clir);
+ ril_proto::RilUusInfo *uusInfo = (ril_proto::RilUusInfo *)(&(req->uus_info()));
+
+ if (rilDial->uusInfo != NULL) {
+ DBG("ReqDial: print uusInfo:");
+ DBG("rilDial->uusInfo->uusType = %d, "
+ "rilDial->uusInfo->uusDcs =%d, "
+ "rilDial->uusInfo->uusLength=%d, "
+ "rilDial->uusInfo->uusData = %s",
+ rilDial->uusInfo->uusType,
+ rilDial->uusInfo->uusDcs,
+ rilDial->uusInfo->uusLength,
+ rilDial->uusInfo->uusData);
+
+ uusInfo->set_uus_type((ril_proto::RilUusType)rilDial->uusInfo->uusType);
+ uusInfo->set_uus_dcs((ril_proto::RilUusDcs)rilDial->uusInfo->uusDcs);
+ uusInfo->set_uus_length(rilDial->uusInfo->uusLength);
+ uusInfo->set_uus_data(rilDial->uusInfo->uusData);
+ } else {
+ DBG("uusInfo is NULL");
+ }
+
+ DBG("ReqDial: after set the request");
+ DBG("req->ByetSize=%d", req->ByteSize());
+ buffer = Buffer::New(req->ByteSize());
+ DBG("buffer size=%d", buffer->length());
+
+ req->SerializeToArray(buffer->data(), buffer->length());
+ delete req;
+ *pBuffer = buffer;
+ status = STATUS_OK;
+ DBG("ReqDial X, buffer->length()=%d", buffer->length());
+ }
+ DBG("ReqDial X status = %d", status);
+ return status;
+}
+
+/**
+ * request for RIL_REQUEST_HANGUP // 12
+ */
int ReqHangUp(Buffer **pBuffer,
const void *data, const size_t datalen, const RIL_Token t) {
int status;
status = STATUS_BAD_DATA;
} else {
ril_proto::ReqHangUp *req = new ril_proto::ReqHangUp();
+ DBG("ReqHangUp: connection_index=%d", ((int *)data)[0]);
req->set_connection_index(((int *)data)[0]);
buffer = Buffer::New(req->ByteSize());
req->SerializeToArray(buffer->data(), buffer->length());
return status;
}
+/**
+ * request for RIL_REQUEST_SCREEN_STATE // 61
+ */
int ReqScreenState(Buffer **pBuffer,
const void *data, const size_t datalen, const RIL_Token t) {
int status;
status = STATUS_BAD_DATA;
} else {
ril_proto::ReqScreenState *req = new ril_proto::ReqScreenState();
+ DBG("ReqScreenState: state=%d", ((int *)data)[0]);
req->set_state(((int *)data)[0]);
if (try_catch.HasCaught()) {
ReportException(&try_catch);
}
+ DBG("ReqScreenState: req->ByteSize()=%d", req->ByteSize());
buffer = Buffer::New(req->ByteSize());
DBG("ReqScreenState: serialize");
req->SerializeToArray(buffer->data(), buffer->length());
typedef std::map<int, ReqConversion> ReqConversionMap;
ReqConversionMap rilReqConversionMap;
-
int callOnRilRequest(v8::Handle<v8::Context> context, int cmd,
- const void *data, size_t datalen, RIL_Token t) {
+ const void *buffer, RIL_Token t) {
DBG("callOnRilRequest E: cmd=%d", cmd);
int status;
v8::Handle<v8::Value> v8RequestValue = v8::Number::New(cmd);
v8::Handle<v8::Value> v8TokenValue = v8::Number::New(int64_t(t));
- // Convert the data to a protobuf Buffer
- Buffer *buffer = NULL;
- ReqConversionMap::iterator itr;
- itr = rilReqConversionMap.find(cmd);
- if (itr != rilReqConversionMap.end()) {
- status = itr->second(&buffer, data, datalen, t);
+ // Invoke onRilRequest
+ const int argc = 3;
+ v8::Handle<v8::Value> argv[argc] = {
+ v8RequestValue, v8TokenValue, ((Buffer *)buffer)->handle_ };
+ v8::Handle<v8::Value> result =
+ onRilRequestFunction->Call(context->Global(), argc, argv);
+ if (try_catch.HasCaught()) {
+ LOGE("callOnRilRequest error");
+ ReportException(&try_catch);
+ status = STATUS_ERR;
} else {
- LOGE("callOnRilRequest X unknown request %d", cmd);
- status = STATUS_UNSUPPORTED_REQUEST;
- }
-
- if (status == STATUS_OK) {
- // Invoke onRilRequest
- const int argc = 3;
- v8::Handle<v8::Value> argv[argc] = {
- v8RequestValue, v8TokenValue, buffer->handle_ };
- v8::Handle<v8::Value> result =
- onRilRequestFunction->Call(context->Global(), argc, argv);
- if (try_catch.HasCaught()) {
- LOGE("callOnRilRequest error");
- ReportException(&try_catch);
- status = STATUS_ERR;
- } else {
- v8::String::Utf8Value result_string(result);
- DBG("callOnRilRequest result=%s", ToCString(result_string));
- status = STATUS_OK;
- }
- }
-
- if (status != STATUS_OK) {
- // An error report complete now
- RIL_Errno rilErrCode = (status == STATUS_UNSUPPORTED_REQUEST) ?
- RIL_E_REQUEST_NOT_SUPPORTED : RIL_E_GENERIC_FAILURE;
- s_rilenv->OnRequestComplete(t, rilErrCode, NULL, 0);
+ v8::String::Utf8Value result_string(result);
+ DBG("callOnRilRequest result=%s", ToCString(result_string));
+ status = STATUS_OK;
}
DBG("callOnRilRequest X: status=%d", status);
DBG("~RilRequestWorkerQueue X:");
}
+/**
+ * Add a request to the processing queue.
+ * Data is serialized to a protobuf before adding to the queue.
+ */
void RilRequestWorkerQueue::AddRequest (const int request,
const void *data, const size_t datalen, const RIL_Token token) {
- Request *req;
- pthread_mutex_lock(&free_list_mutex_);
- if (free_list_.size() == 0) {
- req = new Request(request, data, datalen, token);
- pthread_mutex_unlock(&free_list_mutex_);
+ DBG("RilRequestWorkerQueue:AddRequest E: Before adding the request");
+
+ v8::Locker locker;
+ v8::HandleScope handle_scope;
+ v8::Context::Scope context_scope(context_);
+
+ int status;
+
+ // Convert the data to a protobuf before inserting it into the request queue (serialize data)
+ Buffer *buffer = NULL;
+ ReqConversionMap::iterator itr;
+ itr = rilReqConversionMap.find(request);
+ if (itr != rilReqConversionMap.end()) {
+ status = itr->second(&buffer, data, datalen, token);
} else {
- req = free_list_.front();
- free_list_.pop();
- pthread_mutex_unlock(&free_list_mutex_);
- req->Set(request, data, datalen, token);
+ LOGE("RilRequestWorkerQueue:AddRequest: X unknown request %d", request);
+ status = STATUS_UNSUPPORTED_REQUEST;
+ }
+
+ if (status == STATUS_OK) {
+ // Add serialized request to the queue
+ Request *req;
+ pthread_mutex_lock(&free_list_mutex_);
+ DBG("RilRequestWorkerQueue:AddRequest: return ok, buffer = %p, buffer->length()=%d",
+ buffer, buffer->length());
+ if (free_list_.size() == 0) {
+ req = new Request(request, buffer, token);
+ pthread_mutex_unlock(&free_list_mutex_);
+ } else {
+ req = free_list_.front();
+ free_list_.pop();
+ pthread_mutex_unlock(&free_list_mutex_);
+ req->Set(request, buffer, token);
+ }
+ // add the request
+ Add(req);
+ } else {
+ DBG("RilRequestWorkerQueue:AddRequest: return from the serialization, status is not OK");
+ // An error report complete now
+ RIL_Errno rilErrCode = (status == STATUS_UNSUPPORTED_REQUEST) ?
+ RIL_E_REQUEST_NOT_SUPPORTED : RIL_E_GENERIC_FAILURE;
+ s_rilenv->OnRequestComplete(token, rilErrCode, NULL, 0);
}
- Add(req);
+
DBG("RilRequestWorkerQueue::AddRequest: X"
" request=%d data=%p datalen=%d token=%p",
request, data, datalen, token);
Request *req = (Request *)p;
DBG("RilRequestWorkerQueue::Process: E"
- " request=%d data=%p datalen=%d t=%p",
- req->request_, req->data_, req->datalen_, req->token_);
+ " request=%d buffer=%p, bufferlen=%d t=%p",
+ req->request_, req->buffer_, req->buffer_->length(), req->token_);
v8::Locker locker;
v8::HandleScope handle_scope;
v8::Context::Scope context_scope(context_);
callOnRilRequest(context_, req->request_,
- req->data_, req->datalen_, req->token_);
-
- DBG("RilRequestWorkerQueue::Process: X"
- " request=%d data=%p datalen=%d t=%p",
- req->request_, req->data_, req->datalen_, req->token_);
+ req->buffer_, req->token_);
pthread_mutex_lock(&free_list_mutex_);
free_list_.push(req);
rilReqConversionMap[RIL_REQUEST_GET_SIM_STATUS] = ReqWithNoData; // 1
rilReqConversionMap[RIL_REQUEST_ENTER_SIM_PIN] = ReqEnterSimPin; // 2
rilReqConversionMap[RIL_REQUEST_GET_CURRENT_CALLS] = ReqWithNoData; // 9
+ rilReqConversionMap[RIL_REQUEST_DIAL] = ReqDial; // 10
rilReqConversionMap[RIL_REQUEST_GET_IMSI] = ReqWithNoData; // 11
rilReqConversionMap[RIL_REQUEST_HANGUP] = ReqHangUp; // 12
rilReqConversionMap[RIL_REQUEST_SIGNAL_STRENGTH] = ReqWithNoData; // 19
return status;
}
+/**
+ * Subroutine to test a single RIL request
+ */
+void testRilRequest(v8::Handle<v8::Context> context, int request, const void *data,
+ const size_t datalen, const RIL_Token t) {
+ Buffer *buffer = NULL;
+ ReqConversionMap::iterator itr;
+ int status;
+
+ LOGD("testRilRequest: request=%d", request);
+
+ itr = rilReqConversionMap.find(request);
+ if (itr != rilReqConversionMap.end()) {
+ status = itr->second(&buffer, data, sizeof(data), (void *)0x12345677);
+ } else {
+ LOGE("testRequests X unknown request %d", request);
+ status = STATUS_UNSUPPORTED_REQUEST;
+ }
+ if (status == STATUS_OK) {
+ callOnRilRequest(context, request, buffer, (void *)0x12345677);
+ } else {
+ LOGE("testRilRequest X, serialize error");
+ }
+}
+
void testRequests(v8::Handle<v8::Context> context) {
LOGD("testRequests E: ********");
int status = ReadFile(fileName, &buffer);
if (status == 0) {
runJs(context, &try_catch, fileName, buffer);
+ Buffer *buffer = NULL;
+ ReqConversionMap::iterator itr;
+ int status;
+ int request;
+
if (!try_catch.HasCaught()) {
{
const int data[1] = { 1 };
- callOnRilRequest(context, RIL_REQUEST_SIGNAL_STRENGTH, data,
- sizeof(data), (void *)0x12345677);
+ testRilRequest(context, RIL_REQUEST_SIGNAL_STRENGTH, data, sizeof(data),
+ (void *)0x12345677);
}
{
const char *data[1] = { "winks-pin" };
- callOnRilRequest(context, RIL_REQUEST_ENTER_SIM_PIN, data,
- sizeof(data), (void *)0x12345678);
+ testRilRequest(context, RIL_REQUEST_ENTER_SIM_PIN, data, sizeof(data),
+ (void *)0x12345677);
}
{
const int data[1] = { 1 };
- callOnRilRequest(context, RIL_REQUEST_HANGUP, data,
- sizeof(data), (void *)0x12345679);
+ testRilRequest(context, RIL_REQUEST_HANGUP, data, sizeof(data),
+ (void *)0x12345677);
}
{
const int data[1] = { 1 };
- callOnRilRequest(context, RIL_REQUEST_SCREEN_STATE, data,
- sizeof(data), (void *)0x67458);
+ testRilRequest(context, RIL_REQUEST_SCREEN_STATE, data, sizeof(data),
+ (void *)0x12345677);
}
{
RilRequestWorkerQueue *rwq = new RilRequestWorkerQueue(context);
#include <v8.h>
#include "worker.h"
-
+#include "node_object_wrap.h"
/**
* A request
*/
struct Request {
int request_;
- char *data_;
- size_t datalen_;
- size_t maxlen_;
+ Buffer *buffer_;
RIL_Token token_;
- Request(const int request, const void *data,
- const size_t datalen, const RIL_Token token) :
+ Request(const int request, const Buffer *buffer, const RIL_Token token) :
request_(0),
- data_(NULL),
- datalen_(0),
- maxlen_(0),
+ buffer_(NULL),
token_(0) {
- Set(request, data, datalen, token);
+ Set(request, buffer, token);
}
~Request() {
- delete [] data_;
+ delete [] buffer_;
}
void Set(const int request,
- const void *data, const size_t datalen, const RIL_Token token) {
+ const Buffer *buffer, const RIL_Token token) {
request_ = request;
token_ = token;
- if (datalen > maxlen_) {
- // TODO: MAKE A POOL ?
- delete [] data_;
- data_ = new char[datalen];
- maxlen_ = datalen;
- }
- datalen_ = datalen;
- memmove(data_, data, datalen);
+ buffer_ = (Buffer *)buffer;
}
};
* Add a request to the Queue
*/
void AddRequest(const int request,
- const void *data, const size_t datalen, const RIL_Token t);
+ const void *data, const size_t datalen, const RIL_Token token);
/**
* Processes a request sending it to mock-ril.js
wqt_->Stop();
}
+/**
+ * Obtain a record from free_list if it is not empty, fill in the record with provided
+ * information: *p and delay_in_ms
+ */
struct WorkerQueue::Record *WorkerQueue::obtain_record(void *p, int delay_in_ms) {
struct Record *r;
if (free_list_.size() == 0) {
return r;
}
+/**
+ * release a record and insert into the front of the free_list
+ */
void WorkerQueue::release_record(struct Record *r) {
DBG("WorkerQueue::release_record r=%p", r);
free_list_.push_front(r);
}
+/**
+ * Add a record to processing queue q_
+ */
void WorkerQueue::Add(void *p) {
DBG("WorkerQueue::Add E:");
pthread_mutex_lock(&wqt_->mutex_);
}
};
- std::list<struct Record *> q_;
- std::list<struct Record *> free_list_;
+ std::list<struct Record *> q_; // list of records to be processed
+ std::list<struct Record *> free_list_; // list of records that have been released
std::priority_queue<struct Record *, std::vector<struct Record *>, record_compare> delayed_q_;
-
+ // list of records that are delayed
class WorkerQueueThread *wqt_;
protected:
const ::google::protobuf::Descriptor* RspGetCurrentCalls_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
RspGetCurrentCalls_reflection_ = NULL;
+const ::google::protobuf::Descriptor* ReqDial_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ ReqDial_reflection_ = NULL;
const ::google::protobuf::Descriptor* ReqHangUp_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
ReqHangUp_reflection_ = NULL;
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(RspGetCurrentCalls));
- ReqHangUp_descriptor_ = file->message_type(13);
+ ReqDial_descriptor_ = file->message_type(13);
+ static const int ReqDial_offsets_[3] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReqDial, address_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReqDial, clir_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReqDial, uus_info_),
+ };
+ ReqDial_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ ReqDial_descriptor_,
+ ReqDial::default_instance_,
+ ReqDial_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReqDial, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReqDial, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(ReqDial));
+ ReqHangUp_descriptor_ = file->message_type(14);
static const int ReqHangUp_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReqHangUp, connection_index_),
};
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(ReqHangUp));
- RspSignalStrength_descriptor_ = file->message_type(14);
+ RspSignalStrength_descriptor_ = file->message_type(15);
static const int RspSignalStrength_offsets_[3] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RspSignalStrength, gw_signalstrength_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RspSignalStrength, cdma_signalstrength_),
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(RspSignalStrength));
- RspOperator_descriptor_ = file->message_type(15);
+ RspOperator_descriptor_ = file->message_type(16);
static const int RspOperator_offsets_[3] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RspOperator, long_alpha_ons_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RspOperator, short_alpha_ons_),
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(RspOperator));
- ReqScreenState_descriptor_ = file->message_type(16);
+ ReqScreenState_descriptor_ = file->message_type(17);
static const int ReqScreenState_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReqScreenState, state_),
};
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
RspGetCurrentCalls_descriptor_, &RspGetCurrentCalls::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ ReqDial_descriptor_, &ReqDial::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
ReqHangUp_descriptor_, &ReqHangUp::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
RspSignalStrength_descriptor_, &RspSignalStrength::default_instance());
delete RspEnterSimPin_reflection_;
delete RspGetCurrentCalls::default_instance_;
delete RspGetCurrentCalls_reflection_;
+ delete ReqDial::default_instance_;
+ delete ReqDial_reflection_;
delete ReqHangUp::default_instance_;
delete ReqHangUp_reflection_;
delete RspSignalStrength::default_instance_;
"oto.RilCardStatus\"\035\n\016ReqEnterSimPin\022\013\n\003p"
"in\030\001 \002(\t\"+\n\016RspEnterSimPin\022\031\n\021retries_re"
"maining\030\001 \002(\005\"7\n\022RspGetCurrentCalls\022!\n\005c"
- "alls\030\001 \003(\0132\022.ril_proto.RilCall\"%\n\tReqHan"
- "gUp\022\030\n\020connection_index\030\001 \002(\005\"\314\001\n\021RspSig"
- "nalStrength\0229\n\021gw_signalstrength\030\001 \001(\0132\036"
- ".ril_proto.RILGWSignalStrength\022=\n\023cdma_s"
- "ignalstrength\030\002 \001(\0132 .ril_proto.RILCDMAS"
- "ignalStrength\022=\n\023evdo_signalstrength\030\003 \001"
- "(\0132 .ril_proto.RILEVDOSignalStrength\"O\n\013"
- "RspOperator\022\026\n\016long_alpha_ons\030\001 \001(\t\022\027\n\017s"
- "hort_alpha_ons\030\002 \001(\t\022\017\n\007mcc_mnc\030\003 \001(\t\"\037\n"
- "\016ReqScreenState\022\r\n\005state\030\001 \002(\010*\257\002\n\nRadio"
- "State\022\022\n\016RADIOSTATE_OFF\020\000\022\032\n\026RADIOSTATE_"
- "UNAVAILABLE\020\001\022\034\n\030RADIOSTATE_SIM_NOT_READ"
- "Y\020\002\022#\n\037RADIOSTATE_SIM_LOCKED_OR_ABSENT\020\003"
- "\022\030\n\024RADIOSTATE_SIM_READY\020\004\022\035\n\031RADIOSTATE"
- "_RUIM_NOT_READY\020\005\022\031\n\025RADIOSTATE_RUIM_REA"
- "DY\020\006\022$\n RADIOSTATE_RUIM_LOCKED_OR_ABSENT"
- "\020\007\022\033\n\027RADIOSTATE_NV_NOT_READY\020\010\022\027\n\023RADIO"
- "STATE_NV_READY\020\t*P\n\014RilCardState\022\024\n\020CARD"
- "STATE_ABSENT\020\000\022\025\n\021CARDSTATE_PRESENT\020\001\022\023\n"
- "\017CARDSTATE_ERROR\020\002*\361\006\n\020RilPersoSubstate\022"
- "\031\n\025PERSOSUBSTATE_UNKNOWN\020\000\022\035\n\031PERSOSUBST"
- "ATE_IN_PROGRESS\020\001\022\027\n\023PERSOSUBSTATE_READY"
- "\020\002\022\035\n\031PERSOSUBSTATE_SIM_NETWORK\020\003\022$\n PER"
- "SOSUBSTATE_SIM_NETWORK_SUBSET\020\004\022\037\n\033PERSO"
- "SUBSTATE_SIM_CORPORATE\020\005\022&\n\"PERSOSUBSTAT"
- "E_SIM_SERVICE_PROVIDER\020\006\022\031\n\025PERSOSUBSTAT"
- "E_SIM_SIM\020\007\022!\n\035PERSOSUBSTATE_SIM_NETWORK"
- "_PUK\020\010\022(\n$PERSOSUBSTATE_SIM_NETWORK_SUBS"
- "ET_PUK\020\t\022#\n\037PERSOSUBSTATE_SIM_CORPORATE_"
- "PUK\020\n\022*\n&PERSOSUBSTATE_SIM_SERVICE_PROVI"
- "DER_PUK\020\013\022\035\n\031PERSOSUBSTATE_SIM_SIM_PUK\020\014"
- "\022\037\n\033PERSOSUBSTATE_RUIM_NETWORK1\020\r\022\037\n\033PER"
- "SOSUBSTATE_RUIM_NETWORK2\020\016\022\033\n\027PERSOSUBST"
- "ATE_RUIM_HRPD\020\017\022 \n\034PERSOSUBSTATE_RUIM_CO"
- "RPORATE\020\020\022\'\n#PERSOSUBSTATE_RUIM_SERVICE_"
- "PROVIDER\020\021\022\033\n\027PERSOSUBSTATE_RUIM_RUIM\020\022\022"
- "#\n\037PERSOSUBSTATE_RUIM_NETWORK1_PUK\020\023\022#\n\037"
- "PERSOSUBSTATE_RUIM_NETWORK2_PUK\020\024\022\037\n\033PER"
- "SOSUBSTATE_RUIM_HRPD_PUK\020\025\022$\n PERSOSUBST"
- "ATE_RUIM_CORPORATE_PUK\020\026\022+\n\'PERSOSUBSTAT"
- "E_RUIM_SERVICE_PROVIDER_PUK\020\027\022\037\n\033PERSOSU"
- "BSTATE_RUIM_RUIM_PUK\020\030*\223\001\n\013RilAppState\022\024"
- "\n\020APPSTATE_UNKNOWN\020\000\022\025\n\021APPSTATE_DETECTE"
- "D\020\001\022\020\n\014APPSTATE_PIN\020\002\022\020\n\014APPSTATE_PUK\020\003\022"
- "\037\n\033APPSTATE_SUBSCRIPTION_PERSO\020\004\022\022\n\016APPS"
- "TATE_READY\020\005*\275\001\n\013RilPinState\022\024\n\020PINSTATE"
- "_UNKNOWN\020\000\022!\n\035PINSTATE_ENABLED_NOT_VERIF"
- "IED\020\001\022\035\n\031PINSTATE_ENABLED_VERIFIED\020\002\022\025\n\021"
- "PINSTATE_DISABLED\020\003\022\034\n\030PINSTATE_ENABLED_"
- "BLOCKED\020\004\022!\n\035PINSTATE_ENABLED_PERM_BLOCK"
- "ED\020\005*h\n\nRilAppType\022\023\n\017APPTYPE_UNKNOWN\020\000\022"
- "\017\n\013APPTYPE_SIM\020\001\022\020\n\014APPTYPE_USIM\020\002\022\020\n\014AP"
- "PTYPE_RUIM\020\003\022\020\n\014APPTYPE_CSIM\020\004*\316\001\n\nRilUu"
- "sType\022\030\n\024RILUUSTYPE1_IMPLICIT\020\000\022\030\n\024RILUU"
- "STYPE1_REQUIRED\020\001\022\034\n\030RILUUSTYPE1_NOT_REQ"
- "UIRED\020\002\022\030\n\024RILUUSTYPE2_REQUIRED\020\003\022\034\n\030RIL"
- "UUSTYPE2_NOT_REQUIRED\020\004\022\030\n\024RILUUSTYPE3_R"
- "EQUIRED\020\005\022\034\n\030RILUUSTYPE3_NOT_REQUIRED\020\006*"
- "p\n\tRilUusDcs\022\021\n\rRILUUSDCS_USP\020\000\022\024\n\020RILUU"
- "SDCS_OSIHLP\020\001\022\022\n\016RILUUSDCS_X244\020\002\022\022\n\016RIL"
- "UUSDCS_RMCF\020\003\022\022\n\016RILUUSDCS_IA5c\020\004*\231\001\n\014Ri"
- "lCallState\022\024\n\020CALLSTATE_ACTIVE\020\000\022\025\n\021CALL"
- "STATE_HOLDING\020\001\022\025\n\021CALLSTATE_DIALING\020\002\022\026"
- "\n\022CALLSTATE_ALERTING\020\003\022\026\n\022CALLSTATE_INCO"
- "MING\020\004\022\025\n\021CALLSTATE_WAITING\020\005B3\n(com.and"
- "roid.internal.telephony.ril_protoB\007RilCm"
- "ds", 4082);
+ "alls\030\001 \003(\0132\022.ril_proto.RilCall\"Q\n\007ReqDia"
+ "l\022\017\n\007address\030\001 \001(\t\022\014\n\004clir\030\002 \001(\005\022\'\n\010uus_"
+ "info\030\003 \001(\0132\025.ril_proto.RilUusInfo\"%\n\tReq"
+ "HangUp\022\030\n\020connection_index\030\001 \002(\005\"\314\001\n\021Rsp"
+ "SignalStrength\0229\n\021gw_signalstrength\030\001 \001("
+ "\0132\036.ril_proto.RILGWSignalStrength\022=\n\023cdm"
+ "a_signalstrength\030\002 \001(\0132 .ril_proto.RILCD"
+ "MASignalStrength\022=\n\023evdo_signalstrength\030"
+ "\003 \001(\0132 .ril_proto.RILEVDOSignalStrength\""
+ "O\n\013RspOperator\022\026\n\016long_alpha_ons\030\001 \001(\t\022\027"
+ "\n\017short_alpha_ons\030\002 \001(\t\022\017\n\007mcc_mnc\030\003 \001(\t"
+ "\"\037\n\016ReqScreenState\022\r\n\005state\030\001 \002(\010*\257\002\n\nRa"
+ "dioState\022\022\n\016RADIOSTATE_OFF\020\000\022\032\n\026RADIOSTA"
+ "TE_UNAVAILABLE\020\001\022\034\n\030RADIOSTATE_SIM_NOT_R"
+ "EADY\020\002\022#\n\037RADIOSTATE_SIM_LOCKED_OR_ABSEN"
+ "T\020\003\022\030\n\024RADIOSTATE_SIM_READY\020\004\022\035\n\031RADIOST"
+ "ATE_RUIM_NOT_READY\020\005\022\031\n\025RADIOSTATE_RUIM_"
+ "READY\020\006\022$\n RADIOSTATE_RUIM_LOCKED_OR_ABS"
+ "ENT\020\007\022\033\n\027RADIOSTATE_NV_NOT_READY\020\010\022\027\n\023RA"
+ "DIOSTATE_NV_READY\020\t*P\n\014RilCardState\022\024\n\020C"
+ "ARDSTATE_ABSENT\020\000\022\025\n\021CARDSTATE_PRESENT\020\001"
+ "\022\023\n\017CARDSTATE_ERROR\020\002*\361\006\n\020RilPersoSubsta"
+ "te\022\031\n\025PERSOSUBSTATE_UNKNOWN\020\000\022\035\n\031PERSOSU"
+ "BSTATE_IN_PROGRESS\020\001\022\027\n\023PERSOSUBSTATE_RE"
+ "ADY\020\002\022\035\n\031PERSOSUBSTATE_SIM_NETWORK\020\003\022$\n "
+ "PERSOSUBSTATE_SIM_NETWORK_SUBSET\020\004\022\037\n\033PE"
+ "RSOSUBSTATE_SIM_CORPORATE\020\005\022&\n\"PERSOSUBS"
+ "TATE_SIM_SERVICE_PROVIDER\020\006\022\031\n\025PERSOSUBS"
+ "TATE_SIM_SIM\020\007\022!\n\035PERSOSUBSTATE_SIM_NETW"
+ "ORK_PUK\020\010\022(\n$PERSOSUBSTATE_SIM_NETWORK_S"
+ "UBSET_PUK\020\t\022#\n\037PERSOSUBSTATE_SIM_CORPORA"
+ "TE_PUK\020\n\022*\n&PERSOSUBSTATE_SIM_SERVICE_PR"
+ "OVIDER_PUK\020\013\022\035\n\031PERSOSUBSTATE_SIM_SIM_PU"
+ "K\020\014\022\037\n\033PERSOSUBSTATE_RUIM_NETWORK1\020\r\022\037\n\033"
+ "PERSOSUBSTATE_RUIM_NETWORK2\020\016\022\033\n\027PERSOSU"
+ "BSTATE_RUIM_HRPD\020\017\022 \n\034PERSOSUBSTATE_RUIM"
+ "_CORPORATE\020\020\022\'\n#PERSOSUBSTATE_RUIM_SERVI"
+ "CE_PROVIDER\020\021\022\033\n\027PERSOSUBSTATE_RUIM_RUIM"
+ "\020\022\022#\n\037PERSOSUBSTATE_RUIM_NETWORK1_PUK\020\023\022"
+ "#\n\037PERSOSUBSTATE_RUIM_NETWORK2_PUK\020\024\022\037\n\033"
+ "PERSOSUBSTATE_RUIM_HRPD_PUK\020\025\022$\n PERSOSU"
+ "BSTATE_RUIM_CORPORATE_PUK\020\026\022+\n\'PERSOSUBS"
+ "TATE_RUIM_SERVICE_PROVIDER_PUK\020\027\022\037\n\033PERS"
+ "OSUBSTATE_RUIM_RUIM_PUK\020\030*\223\001\n\013RilAppStat"
+ "e\022\024\n\020APPSTATE_UNKNOWN\020\000\022\025\n\021APPSTATE_DETE"
+ "CTED\020\001\022\020\n\014APPSTATE_PIN\020\002\022\020\n\014APPSTATE_PUK"
+ "\020\003\022\037\n\033APPSTATE_SUBSCRIPTION_PERSO\020\004\022\022\n\016A"
+ "PPSTATE_READY\020\005*\275\001\n\013RilPinState\022\024\n\020PINST"
+ "ATE_UNKNOWN\020\000\022!\n\035PINSTATE_ENABLED_NOT_VE"
+ "RIFIED\020\001\022\035\n\031PINSTATE_ENABLED_VERIFIED\020\002\022"
+ "\025\n\021PINSTATE_DISABLED\020\003\022\034\n\030PINSTATE_ENABL"
+ "ED_BLOCKED\020\004\022!\n\035PINSTATE_ENABLED_PERM_BL"
+ "OCKED\020\005*h\n\nRilAppType\022\023\n\017APPTYPE_UNKNOWN"
+ "\020\000\022\017\n\013APPTYPE_SIM\020\001\022\020\n\014APPTYPE_USIM\020\002\022\020\n"
+ "\014APPTYPE_RUIM\020\003\022\020\n\014APPTYPE_CSIM\020\004*\316\001\n\nRi"
+ "lUusType\022\030\n\024RILUUSTYPE1_IMPLICIT\020\000\022\030\n\024RI"
+ "LUUSTYPE1_REQUIRED\020\001\022\034\n\030RILUUSTYPE1_NOT_"
+ "REQUIRED\020\002\022\030\n\024RILUUSTYPE2_REQUIRED\020\003\022\034\n\030"
+ "RILUUSTYPE2_NOT_REQUIRED\020\004\022\030\n\024RILUUSTYPE"
+ "3_REQUIRED\020\005\022\034\n\030RILUUSTYPE3_NOT_REQUIRED"
+ "\020\006*p\n\tRilUusDcs\022\021\n\rRILUUSDCS_USP\020\000\022\024\n\020RI"
+ "LUUSDCS_OSIHLP\020\001\022\022\n\016RILUUSDCS_X244\020\002\022\022\n\016"
+ "RILUUSDCS_RMCF\020\003\022\022\n\016RILUUSDCS_IA5c\020\004*\231\001\n"
+ "\014RilCallState\022\024\n\020CALLSTATE_ACTIVE\020\000\022\025\n\021C"
+ "ALLSTATE_HOLDING\020\001\022\025\n\021CALLSTATE_DIALING\020"
+ "\002\022\026\n\022CALLSTATE_ALERTING\020\003\022\026\n\022CALLSTATE_I"
+ "NCOMING\020\004\022\025\n\021CALLSTATE_WAITING\020\005B3\n(com."
+ "android.internal.telephony.ril_protoB\007Ri"
+ "lCmds", 4165);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"ril.proto", &protobuf_RegisterTypes);
RilAppStatus::default_instance_ = new RilAppStatus();
ReqEnterSimPin::default_instance_ = new ReqEnterSimPin();
RspEnterSimPin::default_instance_ = new RspEnterSimPin();
RspGetCurrentCalls::default_instance_ = new RspGetCurrentCalls();
+ ReqDial::default_instance_ = new ReqDial();
ReqHangUp::default_instance_ = new ReqHangUp();
RspSignalStrength::default_instance_ = new RspSignalStrength();
RspOperator::default_instance_ = new RspOperator();
ReqEnterSimPin::default_instance_->InitAsDefaultInstance();
RspEnterSimPin::default_instance_->InitAsDefaultInstance();
RspGetCurrentCalls::default_instance_->InitAsDefaultInstance();
+ ReqDial::default_instance_->InitAsDefaultInstance();
ReqHangUp::default_instance_->InitAsDefaultInstance();
RspSignalStrength::default_instance_->InitAsDefaultInstance();
RspOperator::default_instance_->InitAsDefaultInstance();
// ===================================================================
+const ::std::string ReqDial::_default_address_;
+#ifndef _MSC_VER
+const int ReqDial::kAddressFieldNumber;
+const int ReqDial::kClirFieldNumber;
+const int ReqDial::kUusInfoFieldNumber;
+#endif // !_MSC_VER
+
+ReqDial::ReqDial()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void ReqDial::InitAsDefaultInstance() {
+ uus_info_ = const_cast< ::ril_proto::RilUusInfo*>(&::ril_proto::RilUusInfo::default_instance());
+}
+
+ReqDial::ReqDial(const ReqDial& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void ReqDial::SharedCtor() {
+ _cached_size_ = 0;
+ address_ = const_cast< ::std::string*>(&_default_address_);
+ clir_ = 0;
+ uus_info_ = NULL;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+ReqDial::~ReqDial() {
+ SharedDtor();
+}
+
+void ReqDial::SharedDtor() {
+ if (address_ != &_default_address_) {
+ delete address_;
+ }
+ if (this != default_instance_) {
+ delete uus_info_;
+ }
+}
+
+void ReqDial::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* ReqDial::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return ReqDial_descriptor_;
+}
+
+const ReqDial& ReqDial::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_ril_2eproto(); return *default_instance_;
+}
+
+ReqDial* ReqDial::default_instance_ = NULL;
+
+ReqDial* ReqDial::New() const {
+ return new ReqDial;
+}
+
+void ReqDial::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (_has_bit(0)) {
+ if (address_ != &_default_address_) {
+ address_->clear();
+ }
+ }
+ clir_ = 0;
+ if (_has_bit(2)) {
+ if (uus_info_ != NULL) uus_info_->::ril_proto::RilUusInfo::Clear();
+ }
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool ReqDial::MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint32 tag;
+ while ((tag = input->ReadTag()) != 0) {
+ switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+ // optional string address = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_address()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->address().data(), this->address().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_clir;
+ break;
+ }
+
+ // optional int32 clir = 2;
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_clir:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &clir_)));
+ _set_bit(1);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(26)) goto parse_uus_info;
+ break;
+ }
+
+ // optional .ril_proto.RilUusInfo uus_info = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_uus_info:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_uus_info()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectAtEnd()) return true;
+ break;
+ }
+
+ default: {
+ handle_uninterpreted:
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
+ return true;
+ }
+ DO_(::google::protobuf::internal::WireFormat::SkipField(
+ input, tag, mutable_unknown_fields()));
+ break;
+ }
+ }
+ }
+ return true;
+#undef DO_
+}
+
+void ReqDial::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional string address = 1;
+ if (_has_bit(0)) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->address().data(), this->address().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 1, this->address(), output);
+ }
+
+ // optional int32 clir = 2;
+ if (_has_bit(1)) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->clir(), output);
+ }
+
+ // optional .ril_proto.RilUusInfo uus_info = 3;
+ if (_has_bit(2)) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 3, this->uus_info(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* ReqDial::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional string address = 1;
+ if (_has_bit(0)) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->address().data(), this->address().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 1, this->address(), target);
+ }
+
+ // optional int32 clir = 2;
+ if (_has_bit(1)) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->clir(), target);
+ }
+
+ // optional .ril_proto.RilUusInfo uus_info = 3;
+ if (_has_bit(2)) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 3, this->uus_info(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int ReqDial::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional string address = 1;
+ if (has_address()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->address());
+ }
+
+ // optional int32 clir = 2;
+ if (has_clir()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->clir());
+ }
+
+ // optional .ril_proto.RilUusInfo uus_info = 3;
+ if (has_uus_info()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->uus_info());
+ }
+
+ }
+ if (!unknown_fields().empty()) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ unknown_fields());
+ }
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = total_size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ return total_size;
+}
+
+void ReqDial::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const ReqDial* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const ReqDial*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void ReqDial::MergeFrom(const ReqDial& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from._has_bit(0)) {
+ set_address(from.address());
+ }
+ if (from._has_bit(1)) {
+ set_clir(from.clir());
+ }
+ if (from._has_bit(2)) {
+ mutable_uus_info()->::ril_proto::RilUusInfo::MergeFrom(from.uus_info());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void ReqDial::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void ReqDial::CopyFrom(const ReqDial& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool ReqDial::IsInitialized() const {
+
+ return true;
+}
+
+void ReqDial::Swap(ReqDial* other) {
+ if (other != this) {
+ std::swap(address_, other->address_);
+ std::swap(clir_, other->clir_);
+ std::swap(uus_info_, other->uus_info_);
+ std::swap(_has_bits_[0], other->_has_bits_[0]);
+ _unknown_fields_.Swap(&other->_unknown_fields_);
+ std::swap(_cached_size_, other->_cached_size_);
+ }
+}
+
+::google::protobuf::Metadata ReqDial::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = ReqDial_descriptor_;
+ metadata.reflection = ReqDial_reflection_;
+ return metadata;
+}
+
+
+// ===================================================================
+
#ifndef _MSC_VER
const int ReqHangUp::kConnectionIndexFieldNumber;
#endif // !_MSC_VER
class ReqEnterSimPin;
class RspEnterSimPin;
class RspGetCurrentCalls;
+class ReqDial;
class ReqHangUp;
class RspSignalStrength;
class RspOperator;
};
// -------------------------------------------------------------------
+class ReqDial : public ::google::protobuf::Message {
+ public:
+ ReqDial();
+ virtual ~ReqDial();
+
+ ReqDial(const ReqDial& from);
+
+ inline ReqDial& operator=(const ReqDial& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+ return _unknown_fields_;
+ }
+
+ inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+ return &_unknown_fields_;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const ReqDial& default_instance();
+
+ void Swap(ReqDial* other);
+
+ // implements Message ----------------------------------------------
+
+ ReqDial* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const ReqDial& from);
+ void MergeFrom(const ReqDial& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional string address = 1;
+ inline bool has_address() const;
+ inline void clear_address();
+ static const int kAddressFieldNumber = 1;
+ inline const ::std::string& address() const;
+ inline void set_address(const ::std::string& value);
+ inline void set_address(const char* value);
+ inline void set_address(const char* value, size_t size);
+ inline ::std::string* mutable_address();
+
+ // optional int32 clir = 2;
+ inline bool has_clir() const;
+ inline void clear_clir();
+ static const int kClirFieldNumber = 2;
+ inline ::google::protobuf::int32 clir() const;
+ inline void set_clir(::google::protobuf::int32 value);
+
+ // optional .ril_proto.RilUusInfo uus_info = 3;
+ inline bool has_uus_info() const;
+ inline void clear_uus_info();
+ static const int kUusInfoFieldNumber = 3;
+ inline const ::ril_proto::RilUusInfo& uus_info() const;
+ inline ::ril_proto::RilUusInfo* mutable_uus_info();
+
+ // @@protoc_insertion_point(class_scope:ril_proto.ReqDial)
+ private:
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+ mutable int _cached_size_;
+
+ ::std::string* address_;
+ static const ::std::string _default_address_;
+ ::google::protobuf::int32 clir_;
+ ::ril_proto::RilUusInfo* uus_info_;
+ friend void protobuf_AddDesc_ril_2eproto();
+ friend void protobuf_AssignDesc_ril_2eproto();
+ friend void protobuf_ShutdownFile_ril_2eproto();
+
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+
+ // WHY DOES & HAVE LOWER PRECEDENCE THAN != !?
+ inline bool _has_bit(int index) const {
+ return (_has_bits_[index / 32] & (1u << (index % 32))) != 0;
+ }
+ inline void _set_bit(int index) {
+ _has_bits_[index / 32] |= (1u << (index % 32));
+ }
+ inline void _clear_bit(int index) {
+ _has_bits_[index / 32] &= ~(1u << (index % 32));
+ }
+
+ void InitAsDefaultInstance();
+ static ReqDial* default_instance_;
+};
+// -------------------------------------------------------------------
+
class ReqHangUp : public ::google::protobuf::Message {
public:
ReqHangUp();
// -------------------------------------------------------------------
+// ReqDial
+
+// optional string address = 1;
+inline bool ReqDial::has_address() const {
+ return _has_bit(0);
+}
+inline void ReqDial::clear_address() {
+ if (address_ != &_default_address_) {
+ address_->clear();
+ }
+ _clear_bit(0);
+}
+inline const ::std::string& ReqDial::address() const {
+ return *address_;
+}
+inline void ReqDial::set_address(const ::std::string& value) {
+ _set_bit(0);
+ if (address_ == &_default_address_) {
+ address_ = new ::std::string;
+ }
+ address_->assign(value);
+}
+inline void ReqDial::set_address(const char* value) {
+ _set_bit(0);
+ if (address_ == &_default_address_) {
+ address_ = new ::std::string;
+ }
+ address_->assign(value);
+}
+inline void ReqDial::set_address(const char* value, size_t size) {
+ _set_bit(0);
+ if (address_ == &_default_address_) {
+ address_ = new ::std::string;
+ }
+ address_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* ReqDial::mutable_address() {
+ _set_bit(0);
+ if (address_ == &_default_address_) {
+ address_ = new ::std::string;
+ }
+ return address_;
+}
+
+// optional int32 clir = 2;
+inline bool ReqDial::has_clir() const {
+ return _has_bit(1);
+}
+inline void ReqDial::clear_clir() {
+ clir_ = 0;
+ _clear_bit(1);
+}
+inline ::google::protobuf::int32 ReqDial::clir() const {
+ return clir_;
+}
+inline void ReqDial::set_clir(::google::protobuf::int32 value) {
+ _set_bit(1);
+ clir_ = value;
+}
+
+// optional .ril_proto.RilUusInfo uus_info = 3;
+inline bool ReqDial::has_uus_info() const {
+ return _has_bit(2);
+}
+inline void ReqDial::clear_uus_info() {
+ if (uus_info_ != NULL) uus_info_->::ril_proto::RilUusInfo::Clear();
+ _clear_bit(2);
+}
+inline const ::ril_proto::RilUusInfo& ReqDial::uus_info() const {
+ return uus_info_ != NULL ? *uus_info_ : *default_instance_->uus_info_;
+}
+inline ::ril_proto::RilUusInfo* ReqDial::mutable_uus_info() {
+ _set_bit(2);
+ if (uus_info_ == NULL) uus_info_ = new ::ril_proto::RilUusInfo;
+ return uus_info_;
+}
+
+// -------------------------------------------------------------------
+
// ReqHangUp
// required int32 connection_index = 1;
}
+ public static final class ReqDial extends
+ com.google.protobuf.micro.MessageMicro {
+ public ReqDial() {}
+
+ // optional string address = 1;
+ public static final int ADDRESS_FIELD_NUMBER = 1;
+ private boolean hasAddress;
+ private java.lang.String address_ = "";
+ public java.lang.String getAddress() { return address_; }
+ public boolean hasAddress() { return hasAddress; }
+ public ReqDial setAddress(java.lang.String value) {
+ hasAddress = true;
+ address_ = value;
+ return this;
+ }
+ public ReqDial clearAddress() {
+ hasAddress = false;
+ address_ = "";
+ return this;
+ }
+
+ // optional int32 clir = 2;
+ public static final int CLIR_FIELD_NUMBER = 2;
+ private boolean hasClir;
+ private int clir_ = 0;
+ public int getClir() { return clir_; }
+ public boolean hasClir() { return hasClir; }
+ public ReqDial setClir(int value) {
+ hasClir = true;
+ clir_ = value;
+ return this;
+ }
+ public ReqDial clearClir() {
+ hasClir = false;
+ clir_ = 0;
+ return this;
+ }
+
+ // optional .ril_proto.RilUusInfo uus_info = 3;
+ public static final int UUS_INFO_FIELD_NUMBER = 3;
+ private boolean hasUusInfo;
+ private com.android.internal.telephony.ril_proto.RilCmds.RilUusInfo uusInfo_ = null;
+ public boolean hasUusInfo() { return hasUusInfo; }
+ public com.android.internal.telephony.ril_proto.RilCmds.RilUusInfo getUusInfo() { return uusInfo_; }
+ public ReqDial setUusInfo(com.android.internal.telephony.ril_proto.RilCmds.RilUusInfo value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ hasUusInfo = true;
+ uusInfo_ = value;
+ return this;
+ }
+ public ReqDial clearUusInfo() {
+ hasUusInfo = false;
+ uusInfo_ = null;
+ return this;
+ }
+
+ public final ReqDial clear() {
+ clearAddress();
+ clearClir();
+ clearUusInfo();
+ cachedSize = -1;
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.micro.CodedOutputStreamMicro output)
+ throws java.io.IOException {
+ if (hasAddress()) {
+ output.writeString(1, getAddress());
+ }
+ if (hasClir()) {
+ output.writeInt32(2, getClir());
+ }
+ if (hasUusInfo()) {
+ output.writeMessage(3, getUusInfo());
+ }
+ }
+
+ private int cachedSize = -1;
+ public int getCachedSize() {
+ if (cachedSize < 0) {
+ // getSerializedSize sets cachedSize
+ getSerializedSize();
+ }
+ return cachedSize;
+ }
+
+ public int getSerializedSize() {
+ int size = 0;
+ if (hasAddress()) {
+ size += com.google.protobuf.micro.CodedOutputStreamMicro
+ .computeStringSize(1, getAddress());
+ }
+ if (hasClir()) {
+ size += com.google.protobuf.micro.CodedOutputStreamMicro
+ .computeInt32Size(2, getClir());
+ }
+ if (hasUusInfo()) {
+ size += com.google.protobuf.micro.CodedOutputStreamMicro
+ .computeMessageSize(3, getUusInfo());
+ }
+ cachedSize = size;
+ return size;
+ }
+
+ public ReqDial mergeFrom(
+ com.google.protobuf.micro.CodedInputStreamMicro input)
+ throws java.io.IOException {
+ while (true) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ return this;
+ default: {
+ if (!parseUnknownField(input, tag)) {
+ return this;
+ }
+ break;
+ }
+ case 10: {
+ setAddress(input.readString());
+ break;
+ }
+ case 16: {
+ setClir(input.readInt32());
+ break;
+ }
+ case 26: {
+ com.android.internal.telephony.ril_proto.RilCmds.RilUusInfo value = new com.android.internal.telephony.ril_proto.RilCmds.RilUusInfo();
+ input.readMessage(value);
+ setUusInfo(value);
+ break;
+ }
+ }
+ }
+ }
+
+ public static ReqDial parseFrom(byte[] data)
+ throws com.google.protobuf.micro.InvalidProtocolBufferMicroException {
+ return (ReqDial) (new ReqDial().mergeFrom(data));
+ }
+
+ public static ReqDial parseFrom(
+ com.google.protobuf.micro.CodedInputStreamMicro input)
+ throws java.io.IOException {
+ return (ReqDial) (new ReqDial().mergeFrom(input));
+ }
+
+ }
+
public static final class ReqHangUp extends
com.google.protobuf.micro.MessageMicro {
public ReqHangUp() {}
DESCRIPTOR = descriptor.FileDescriptor(
name='ril.proto',
package='ril_proto',
- serialized_pb='\n\tril.proto\x12\tril_proto\"\x9a\x02\n\x0cRilAppStatus\x12\'\n\x08\x61pp_type\x18\x01 \x01(\x0e\x32\x15.ril_proto.RilAppType\x12)\n\tapp_state\x18\x02 \x01(\x0e\x32\x16.ril_proto.RilAppState\x12\x33\n\x0eperso_substate\x18\x03 \x01(\x0e\x32\x1b.ril_proto.RilPersoSubstate\x12\x0b\n\x03\x61id\x18\x04 \x01(\t\x12\x11\n\tapp_label\x18\x05 \x01(\t\x12\x15\n\rpin1_replaced\x18\x06 \x01(\x05\x12$\n\x04pin1\x18\x07 \x01(\x0e\x32\x16.ril_proto.RilPinState\x12$\n\x04pin2\x18\x08 \x01(\x0e\x32\x16.ril_proto.RilPinState\"\x88\x02\n\rRilCardStatus\x12+\n\ncard_state\x18\x01 \x01(\x0e\x32\x17.ril_proto.RilCardState\x12\x33\n\x13universal_pin_state\x18\x02 \x01(\x0e\x32\x16.ril_proto.RilPinState\x12\'\n\x1fgsm_umts_subscription_app_index\x18\x03 \x01(\x05\x12#\n\x1b\x63\x64ma_subscription_app_index\x18\x04 \x01(\x05\x12\x18\n\x10num_applications\x18\x05 \x01(\x05\x12-\n\x0c\x61pplications\x18\x06 \x03(\x0b\x32\x17.ril_proto.RilAppStatus\"\x82\x01\n\nRilUusInfo\x12\'\n\x08uus_type\x18\x01 \x01(\x0e\x32\x15.ril_proto.RilUusType\x12%\n\x07uus_dcs\x18\x02 \x01(\x0e\x32\x14.ril_proto.RilUusDcs\x12\x12\n\nuus_length\x18\x03 \x01(\x05\x12\x10\n\x08uus_data\x18\x04 \x01(\t\"\xa5\x02\n\x07RilCall\x12&\n\x05state\x18\x01 \x01(\x0e\x32\x17.ril_proto.RilCallState\x12\r\n\x05index\x18\x02 \x01(\x05\x12\x0b\n\x03toa\x18\x03 \x01(\x05\x12\x0f\n\x07is_mpty\x18\x04 \x01(\x08\x12\r\n\x05is_mt\x18\x05 \x01(\x08\x12\x0b\n\x03\x61ls\x18\x06 \x01(\x05\x12\x10\n\x08is_voice\x18\x07 \x01(\x08\x12\x18\n\x10is_voice_privacy\x18\x08 \x01(\x08\x12\x0e\n\x06number\x18\t \x01(\t\x12\x1b\n\x13number_presentation\x18\n \x01(\x05\x12\x0c\n\x04name\x18\x0b \x01(\t\x12\x19\n\x11name_presentation\x18\x0c \x01(\x05\x12\'\n\x08uus_info\x18\r \x01(\x0b\x32\x15.ril_proto.RilUusInfo\"F\n\x13RILGWSignalStrength\x12\x17\n\x0fsignal_strength\x18\x01 \x01(\x05\x12\x16\n\x0e\x62it_error_rate\x18\x02 \x01(\x05\"2\n\x15RILCDMASignalStrength\x12\x0b\n\x03\x64\x62m\x18\x01 \x01(\x05\x12\x0c\n\x04\x65\x63io\x18\x02 \x01(\x05\"N\n\x15RILEVDOSignalStrength\x12\x0b\n\x03\x64\x62m\x18\x01 \x01(\x05\x12\x0c\n\x04\x65\x63io\x18\x02 \x01(\x05\x12\x1a\n\x12signal_noise_ratio\x18\x03 \x01(\x05\"\x1d\n\nRspStrings\x12\x0f\n\x07strings\x18\x01 \x03(\t\"\x1f\n\x0bRspIntegers\x12\x10\n\x08integers\x18\x01 \x03(\x05\"@\n\x0fRspGetSimStatus\x12-\n\x0b\x63\x61rd_status\x18\x01 \x02(\x0b\x32\x18.ril_proto.RilCardStatus\"\x1d\n\x0eReqEnterSimPin\x12\x0b\n\x03pin\x18\x01 \x02(\t\"+\n\x0eRspEnterSimPin\x12\x19\n\x11retries_remaining\x18\x01 \x02(\x05\"7\n\x12RspGetCurrentCalls\x12!\n\x05\x63\x61lls\x18\x01 \x03(\x0b\x32\x12.ril_proto.RilCall\"%\n\tReqHangUp\x12\x18\n\x10\x63onnection_index\x18\x01 \x02(\x05\"\xcc\x01\n\x11RspSignalStrength\x12\x39\n\x11gw_signalstrength\x18\x01 \x01(\x0b\x32\x1e.ril_proto.RILGWSignalStrength\x12=\n\x13\x63\x64ma_signalstrength\x18\x02 \x01(\x0b\x32 .ril_proto.RILCDMASignalStrength\x12=\n\x13\x65vdo_signalstrength\x18\x03 \x01(\x0b\x32 .ril_proto.RILEVDOSignalStrength\"O\n\x0bRspOperator\x12\x16\n\x0elong_alpha_ons\x18\x01 \x01(\t\x12\x17\n\x0fshort_alpha_ons\x18\x02 \x01(\t\x12\x0f\n\x07mcc_mnc\x18\x03 \x01(\t\"\x1f\n\x0eReqScreenState\x12\r\n\x05state\x18\x01 \x02(\x08*\xaf\x02\n\nRadioState\x12\x12\n\x0eRADIOSTATE_OFF\x10\x00\x12\x1a\n\x16RADIOSTATE_UNAVAILABLE\x10\x01\x12\x1c\n\x18RADIOSTATE_SIM_NOT_READY\x10\x02\x12#\n\x1fRADIOSTATE_SIM_LOCKED_OR_ABSENT\x10\x03\x12\x18\n\x14RADIOSTATE_SIM_READY\x10\x04\x12\x1d\n\x19RADIOSTATE_RUIM_NOT_READY\x10\x05\x12\x19\n\x15RADIOSTATE_RUIM_READY\x10\x06\x12$\n RADIOSTATE_RUIM_LOCKED_OR_ABSENT\x10\x07\x12\x1b\n\x17RADIOSTATE_NV_NOT_READY\x10\x08\x12\x17\n\x13RADIOSTATE_NV_READY\x10\t*P\n\x0cRilCardState\x12\x14\n\x10\x43\x41RDSTATE_ABSENT\x10\x00\x12\x15\n\x11\x43\x41RDSTATE_PRESENT\x10\x01\x12\x13\n\x0f\x43\x41RDSTATE_ERROR\x10\x02*\xf1\x06\n\x10RilPersoSubstate\x12\x19\n\x15PERSOSUBSTATE_UNKNOWN\x10\x00\x12\x1d\n\x19PERSOSUBSTATE_IN_PROGRESS\x10\x01\x12\x17\n\x13PERSOSUBSTATE_READY\x10\x02\x12\x1d\n\x19PERSOSUBSTATE_SIM_NETWORK\x10\x03\x12$\n PERSOSUBSTATE_SIM_NETWORK_SUBSET\x10\x04\x12\x1f\n\x1bPERSOSUBSTATE_SIM_CORPORATE\x10\x05\x12&\n\"PERSOSUBSTATE_SIM_SERVICE_PROVIDER\x10\x06\x12\x19\n\x15PERSOSUBSTATE_SIM_SIM\x10\x07\x12!\n\x1dPERSOSUBSTATE_SIM_NETWORK_PUK\x10\x08\x12(\n$PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK\x10\t\x12#\n\x1fPERSOSUBSTATE_SIM_CORPORATE_PUK\x10\n\x12*\n&PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK\x10\x0b\x12\x1d\n\x19PERSOSUBSTATE_SIM_SIM_PUK\x10\x0c\x12\x1f\n\x1bPERSOSUBSTATE_RUIM_NETWORK1\x10\r\x12\x1f\n\x1bPERSOSUBSTATE_RUIM_NETWORK2\x10\x0e\x12\x1b\n\x17PERSOSUBSTATE_RUIM_HRPD\x10\x0f\x12 \n\x1cPERSOSUBSTATE_RUIM_CORPORATE\x10\x10\x12\'\n#PERSOSUBSTATE_RUIM_SERVICE_PROVIDER\x10\x11\x12\x1b\n\x17PERSOSUBSTATE_RUIM_RUIM\x10\x12\x12#\n\x1fPERSOSUBSTATE_RUIM_NETWORK1_PUK\x10\x13\x12#\n\x1fPERSOSUBSTATE_RUIM_NETWORK2_PUK\x10\x14\x12\x1f\n\x1bPERSOSUBSTATE_RUIM_HRPD_PUK\x10\x15\x12$\n PERSOSUBSTATE_RUIM_CORPORATE_PUK\x10\x16\x12+\n\'PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK\x10\x17\x12\x1f\n\x1bPERSOSUBSTATE_RUIM_RUIM_PUK\x10\x18*\x93\x01\n\x0bRilAppState\x12\x14\n\x10\x41PPSTATE_UNKNOWN\x10\x00\x12\x15\n\x11\x41PPSTATE_DETECTED\x10\x01\x12\x10\n\x0c\x41PPSTATE_PIN\x10\x02\x12\x10\n\x0c\x41PPSTATE_PUK\x10\x03\x12\x1f\n\x1b\x41PPSTATE_SUBSCRIPTION_PERSO\x10\x04\x12\x12\n\x0e\x41PPSTATE_READY\x10\x05*\xbd\x01\n\x0bRilPinState\x12\x14\n\x10PINSTATE_UNKNOWN\x10\x00\x12!\n\x1dPINSTATE_ENABLED_NOT_VERIFIED\x10\x01\x12\x1d\n\x19PINSTATE_ENABLED_VERIFIED\x10\x02\x12\x15\n\x11PINSTATE_DISABLED\x10\x03\x12\x1c\n\x18PINSTATE_ENABLED_BLOCKED\x10\x04\x12!\n\x1dPINSTATE_ENABLED_PERM_BLOCKED\x10\x05*h\n\nRilAppType\x12\x13\n\x0f\x41PPTYPE_UNKNOWN\x10\x00\x12\x0f\n\x0b\x41PPTYPE_SIM\x10\x01\x12\x10\n\x0c\x41PPTYPE_USIM\x10\x02\x12\x10\n\x0c\x41PPTYPE_RUIM\x10\x03\x12\x10\n\x0c\x41PPTYPE_CSIM\x10\x04*\xce\x01\n\nRilUusType\x12\x18\n\x14RILUUSTYPE1_IMPLICIT\x10\x00\x12\x18\n\x14RILUUSTYPE1_REQUIRED\x10\x01\x12\x1c\n\x18RILUUSTYPE1_NOT_REQUIRED\x10\x02\x12\x18\n\x14RILUUSTYPE2_REQUIRED\x10\x03\x12\x1c\n\x18RILUUSTYPE2_NOT_REQUIRED\x10\x04\x12\x18\n\x14RILUUSTYPE3_REQUIRED\x10\x05\x12\x1c\n\x18RILUUSTYPE3_NOT_REQUIRED\x10\x06*p\n\tRilUusDcs\x12\x11\n\rRILUUSDCS_USP\x10\x00\x12\x14\n\x10RILUUSDCS_OSIHLP\x10\x01\x12\x12\n\x0eRILUUSDCS_X244\x10\x02\x12\x12\n\x0eRILUUSDCS_RMCF\x10\x03\x12\x12\n\x0eRILUUSDCS_IA5c\x10\x04*\x99\x01\n\x0cRilCallState\x12\x14\n\x10\x43\x41LLSTATE_ACTIVE\x10\x00\x12\x15\n\x11\x43\x41LLSTATE_HOLDING\x10\x01\x12\x15\n\x11\x43\x41LLSTATE_DIALING\x10\x02\x12\x16\n\x12\x43\x41LLSTATE_ALERTING\x10\x03\x12\x16\n\x12\x43\x41LLSTATE_INCOMING\x10\x04\x12\x15\n\x11\x43\x41LLSTATE_WAITING\x10\x05\x42\x33\n(com.android.internal.telephony.ril_protoB\x07RilCmds')
+ serialized_pb='\n\tril.proto\x12\tril_proto\"\x9a\x02\n\x0cRilAppStatus\x12\'\n\x08\x61pp_type\x18\x01 \x01(\x0e\x32\x15.ril_proto.RilAppType\x12)\n\tapp_state\x18\x02 \x01(\x0e\x32\x16.ril_proto.RilAppState\x12\x33\n\x0eperso_substate\x18\x03 \x01(\x0e\x32\x1b.ril_proto.RilPersoSubstate\x12\x0b\n\x03\x61id\x18\x04 \x01(\t\x12\x11\n\tapp_label\x18\x05 \x01(\t\x12\x15\n\rpin1_replaced\x18\x06 \x01(\x05\x12$\n\x04pin1\x18\x07 \x01(\x0e\x32\x16.ril_proto.RilPinState\x12$\n\x04pin2\x18\x08 \x01(\x0e\x32\x16.ril_proto.RilPinState\"\x88\x02\n\rRilCardStatus\x12+\n\ncard_state\x18\x01 \x01(\x0e\x32\x17.ril_proto.RilCardState\x12\x33\n\x13universal_pin_state\x18\x02 \x01(\x0e\x32\x16.ril_proto.RilPinState\x12\'\n\x1fgsm_umts_subscription_app_index\x18\x03 \x01(\x05\x12#\n\x1b\x63\x64ma_subscription_app_index\x18\x04 \x01(\x05\x12\x18\n\x10num_applications\x18\x05 \x01(\x05\x12-\n\x0c\x61pplications\x18\x06 \x03(\x0b\x32\x17.ril_proto.RilAppStatus\"\x82\x01\n\nRilUusInfo\x12\'\n\x08uus_type\x18\x01 \x01(\x0e\x32\x15.ril_proto.RilUusType\x12%\n\x07uus_dcs\x18\x02 \x01(\x0e\x32\x14.ril_proto.RilUusDcs\x12\x12\n\nuus_length\x18\x03 \x01(\x05\x12\x10\n\x08uus_data\x18\x04 \x01(\t\"\xa5\x02\n\x07RilCall\x12&\n\x05state\x18\x01 \x01(\x0e\x32\x17.ril_proto.RilCallState\x12\r\n\x05index\x18\x02 \x01(\x05\x12\x0b\n\x03toa\x18\x03 \x01(\x05\x12\x0f\n\x07is_mpty\x18\x04 \x01(\x08\x12\r\n\x05is_mt\x18\x05 \x01(\x08\x12\x0b\n\x03\x61ls\x18\x06 \x01(\x05\x12\x10\n\x08is_voice\x18\x07 \x01(\x08\x12\x18\n\x10is_voice_privacy\x18\x08 \x01(\x08\x12\x0e\n\x06number\x18\t \x01(\t\x12\x1b\n\x13number_presentation\x18\n \x01(\x05\x12\x0c\n\x04name\x18\x0b \x01(\t\x12\x19\n\x11name_presentation\x18\x0c \x01(\x05\x12\'\n\x08uus_info\x18\r \x01(\x0b\x32\x15.ril_proto.RilUusInfo\"F\n\x13RILGWSignalStrength\x12\x17\n\x0fsignal_strength\x18\x01 \x01(\x05\x12\x16\n\x0e\x62it_error_rate\x18\x02 \x01(\x05\"2\n\x15RILCDMASignalStrength\x12\x0b\n\x03\x64\x62m\x18\x01 \x01(\x05\x12\x0c\n\x04\x65\x63io\x18\x02 \x01(\x05\"N\n\x15RILEVDOSignalStrength\x12\x0b\n\x03\x64\x62m\x18\x01 \x01(\x05\x12\x0c\n\x04\x65\x63io\x18\x02 \x01(\x05\x12\x1a\n\x12signal_noise_ratio\x18\x03 \x01(\x05\"\x1d\n\nRspStrings\x12\x0f\n\x07strings\x18\x01 \x03(\t\"\x1f\n\x0bRspIntegers\x12\x10\n\x08integers\x18\x01 \x03(\x05\"@\n\x0fRspGetSimStatus\x12-\n\x0b\x63\x61rd_status\x18\x01 \x02(\x0b\x32\x18.ril_proto.RilCardStatus\"\x1d\n\x0eReqEnterSimPin\x12\x0b\n\x03pin\x18\x01 \x02(\t\"+\n\x0eRspEnterSimPin\x12\x19\n\x11retries_remaining\x18\x01 \x02(\x05\"7\n\x12RspGetCurrentCalls\x12!\n\x05\x63\x61lls\x18\x01 \x03(\x0b\x32\x12.ril_proto.RilCall\"Q\n\x07ReqDial\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x0c\n\x04\x63lir\x18\x02 \x01(\x05\x12\'\n\x08uus_info\x18\x03 \x01(\x0b\x32\x15.ril_proto.RilUusInfo\"%\n\tReqHangUp\x12\x18\n\x10\x63onnection_index\x18\x01 \x02(\x05\"\xcc\x01\n\x11RspSignalStrength\x12\x39\n\x11gw_signalstrength\x18\x01 \x01(\x0b\x32\x1e.ril_proto.RILGWSignalStrength\x12=\n\x13\x63\x64ma_signalstrength\x18\x02 \x01(\x0b\x32 .ril_proto.RILCDMASignalStrength\x12=\n\x13\x65vdo_signalstrength\x18\x03 \x01(\x0b\x32 .ril_proto.RILEVDOSignalStrength\"O\n\x0bRspOperator\x12\x16\n\x0elong_alpha_ons\x18\x01 \x01(\t\x12\x17\n\x0fshort_alpha_ons\x18\x02 \x01(\t\x12\x0f\n\x07mcc_mnc\x18\x03 \x01(\t\"\x1f\n\x0eReqScreenState\x12\r\n\x05state\x18\x01 \x02(\x08*\xaf\x02\n\nRadioState\x12\x12\n\x0eRADIOSTATE_OFF\x10\x00\x12\x1a\n\x16RADIOSTATE_UNAVAILABLE\x10\x01\x12\x1c\n\x18RADIOSTATE_SIM_NOT_READY\x10\x02\x12#\n\x1fRADIOSTATE_SIM_LOCKED_OR_ABSENT\x10\x03\x12\x18\n\x14RADIOSTATE_SIM_READY\x10\x04\x12\x1d\n\x19RADIOSTATE_RUIM_NOT_READY\x10\x05\x12\x19\n\x15RADIOSTATE_RUIM_READY\x10\x06\x12$\n RADIOSTATE_RUIM_LOCKED_OR_ABSENT\x10\x07\x12\x1b\n\x17RADIOSTATE_NV_NOT_READY\x10\x08\x12\x17\n\x13RADIOSTATE_NV_READY\x10\t*P\n\x0cRilCardState\x12\x14\n\x10\x43\x41RDSTATE_ABSENT\x10\x00\x12\x15\n\x11\x43\x41RDSTATE_PRESENT\x10\x01\x12\x13\n\x0f\x43\x41RDSTATE_ERROR\x10\x02*\xf1\x06\n\x10RilPersoSubstate\x12\x19\n\x15PERSOSUBSTATE_UNKNOWN\x10\x00\x12\x1d\n\x19PERSOSUBSTATE_IN_PROGRESS\x10\x01\x12\x17\n\x13PERSOSUBSTATE_READY\x10\x02\x12\x1d\n\x19PERSOSUBSTATE_SIM_NETWORK\x10\x03\x12$\n PERSOSUBSTATE_SIM_NETWORK_SUBSET\x10\x04\x12\x1f\n\x1bPERSOSUBSTATE_SIM_CORPORATE\x10\x05\x12&\n\"PERSOSUBSTATE_SIM_SERVICE_PROVIDER\x10\x06\x12\x19\n\x15PERSOSUBSTATE_SIM_SIM\x10\x07\x12!\n\x1dPERSOSUBSTATE_SIM_NETWORK_PUK\x10\x08\x12(\n$PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK\x10\t\x12#\n\x1fPERSOSUBSTATE_SIM_CORPORATE_PUK\x10\n\x12*\n&PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK\x10\x0b\x12\x1d\n\x19PERSOSUBSTATE_SIM_SIM_PUK\x10\x0c\x12\x1f\n\x1bPERSOSUBSTATE_RUIM_NETWORK1\x10\r\x12\x1f\n\x1bPERSOSUBSTATE_RUIM_NETWORK2\x10\x0e\x12\x1b\n\x17PERSOSUBSTATE_RUIM_HRPD\x10\x0f\x12 \n\x1cPERSOSUBSTATE_RUIM_CORPORATE\x10\x10\x12\'\n#PERSOSUBSTATE_RUIM_SERVICE_PROVIDER\x10\x11\x12\x1b\n\x17PERSOSUBSTATE_RUIM_RUIM\x10\x12\x12#\n\x1fPERSOSUBSTATE_RUIM_NETWORK1_PUK\x10\x13\x12#\n\x1fPERSOSUBSTATE_RUIM_NETWORK2_PUK\x10\x14\x12\x1f\n\x1bPERSOSUBSTATE_RUIM_HRPD_PUK\x10\x15\x12$\n PERSOSUBSTATE_RUIM_CORPORATE_PUK\x10\x16\x12+\n\'PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK\x10\x17\x12\x1f\n\x1bPERSOSUBSTATE_RUIM_RUIM_PUK\x10\x18*\x93\x01\n\x0bRilAppState\x12\x14\n\x10\x41PPSTATE_UNKNOWN\x10\x00\x12\x15\n\x11\x41PPSTATE_DETECTED\x10\x01\x12\x10\n\x0c\x41PPSTATE_PIN\x10\x02\x12\x10\n\x0c\x41PPSTATE_PUK\x10\x03\x12\x1f\n\x1b\x41PPSTATE_SUBSCRIPTION_PERSO\x10\x04\x12\x12\n\x0e\x41PPSTATE_READY\x10\x05*\xbd\x01\n\x0bRilPinState\x12\x14\n\x10PINSTATE_UNKNOWN\x10\x00\x12!\n\x1dPINSTATE_ENABLED_NOT_VERIFIED\x10\x01\x12\x1d\n\x19PINSTATE_ENABLED_VERIFIED\x10\x02\x12\x15\n\x11PINSTATE_DISABLED\x10\x03\x12\x1c\n\x18PINSTATE_ENABLED_BLOCKED\x10\x04\x12!\n\x1dPINSTATE_ENABLED_PERM_BLOCKED\x10\x05*h\n\nRilAppType\x12\x13\n\x0f\x41PPTYPE_UNKNOWN\x10\x00\x12\x0f\n\x0b\x41PPTYPE_SIM\x10\x01\x12\x10\n\x0c\x41PPTYPE_USIM\x10\x02\x12\x10\n\x0c\x41PPTYPE_RUIM\x10\x03\x12\x10\n\x0c\x41PPTYPE_CSIM\x10\x04*\xce\x01\n\nRilUusType\x12\x18\n\x14RILUUSTYPE1_IMPLICIT\x10\x00\x12\x18\n\x14RILUUSTYPE1_REQUIRED\x10\x01\x12\x1c\n\x18RILUUSTYPE1_NOT_REQUIRED\x10\x02\x12\x18\n\x14RILUUSTYPE2_REQUIRED\x10\x03\x12\x1c\n\x18RILUUSTYPE2_NOT_REQUIRED\x10\x04\x12\x18\n\x14RILUUSTYPE3_REQUIRED\x10\x05\x12\x1c\n\x18RILUUSTYPE3_NOT_REQUIRED\x10\x06*p\n\tRilUusDcs\x12\x11\n\rRILUUSDCS_USP\x10\x00\x12\x14\n\x10RILUUSDCS_OSIHLP\x10\x01\x12\x12\n\x0eRILUUSDCS_X244\x10\x02\x12\x12\n\x0eRILUUSDCS_RMCF\x10\x03\x12\x12\n\x0eRILUUSDCS_IA5c\x10\x04*\x99\x01\n\x0cRilCallState\x12\x14\n\x10\x43\x41LLSTATE_ACTIVE\x10\x00\x12\x15\n\x11\x43\x41LLSTATE_HOLDING\x10\x01\x12\x15\n\x11\x43\x41LLSTATE_DIALING\x10\x02\x12\x16\n\x12\x43\x41LLSTATE_ALERTING\x10\x03\x12\x16\n\x12\x43\x41LLSTATE_INCOMING\x10\x04\x12\x15\n\x11\x43\x41LLSTATE_WAITING\x10\x05\x42\x33\n(com.android.internal.telephony.ril_protoB\x07RilCmds')
_RADIOSTATE = descriptor.EnumDescriptor(
name='RadioState',
],
containing_type=None,
options=None,
- serialized_start=1833,
- serialized_end=2136,
+ serialized_start=1916,
+ serialized_end=2219,
)
],
containing_type=None,
options=None,
- serialized_start=2138,
- serialized_end=2218,
+ serialized_start=2221,
+ serialized_end=2301,
)
],
containing_type=None,
options=None,
- serialized_start=2221,
- serialized_end=3102,
+ serialized_start=2304,
+ serialized_end=3185,
)
],
containing_type=None,
options=None,
- serialized_start=3105,
- serialized_end=3252,
+ serialized_start=3188,
+ serialized_end=3335,
)
],
containing_type=None,
options=None,
- serialized_start=3255,
- serialized_end=3444,
+ serialized_start=3338,
+ serialized_end=3527,
)
],
containing_type=None,
options=None,
- serialized_start=3446,
- serialized_end=3550,
+ serialized_start=3529,
+ serialized_end=3633,
)
],
containing_type=None,
options=None,
- serialized_start=3553,
- serialized_end=3759,
+ serialized_start=3636,
+ serialized_end=3842,
)
],
containing_type=None,
options=None,
- serialized_start=3761,
- serialized_end=3873,
+ serialized_start=3844,
+ serialized_end=3956,
)
],
containing_type=None,
options=None,
- serialized_start=3876,
- serialized_end=4029,
+ serialized_start=3959,
+ serialized_end=4112,
)
)
+_REQDIAL = descriptor.Descriptor(
+ name='ReqDial',
+ full_name='ril_proto.ReqDial',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ descriptor.FieldDescriptor(
+ name='address', full_name='ril_proto.ReqDial.address', index=0,
+ number=1, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=unicode("", "utf-8"),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ descriptor.FieldDescriptor(
+ name='clir', full_name='ril_proto.ReqDial.clir', index=1,
+ number=2, type=5, cpp_type=1, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ descriptor.FieldDescriptor(
+ name='uus_info', full_name='ril_proto.ReqDial.uus_info', index=2,
+ number=3, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ options=None,
+ is_extendable=False,
+ extension_ranges=[],
+ serialized_start=1472,
+ serialized_end=1553,
+)
+
+
_REQHANGUP = descriptor.Descriptor(
name='ReqHangUp',
full_name='ril_proto.ReqHangUp',
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=1472,
- serialized_end=1509,
+ serialized_start=1555,
+ serialized_end=1592,
)
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=1512,
- serialized_end=1716,
+ serialized_start=1595,
+ serialized_end=1799,
)
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=1718,
- serialized_end=1797,
+ serialized_start=1801,
+ serialized_end=1880,
)
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=1799,
- serialized_end=1830,
+ serialized_start=1882,
+ serialized_end=1913,
)
_RILCALL.fields_by_name['uus_info'].message_type = _RILUUSINFO
_RSPGETSIMSTATUS.fields_by_name['card_status'].message_type = _RILCARDSTATUS
_RSPGETCURRENTCALLS.fields_by_name['calls'].message_type = _RILCALL
+_REQDIAL.fields_by_name['uus_info'].message_type = _RILUUSINFO
_RSPSIGNALSTRENGTH.fields_by_name['gw_signalstrength'].message_type = _RILGWSIGNALSTRENGTH
_RSPSIGNALSTRENGTH.fields_by_name['cdma_signalstrength'].message_type = _RILCDMASIGNALSTRENGTH
_RSPSIGNALSTRENGTH.fields_by_name['evdo_signalstrength'].message_type = _RILEVDOSIGNALSTRENGTH
# @@protoc_insertion_point(class_scope:ril_proto.RspGetCurrentCalls)
+class ReqDial(message.Message):
+ __metaclass__ = reflection.GeneratedProtocolMessageType
+ DESCRIPTOR = _REQDIAL
+
+ # @@protoc_insertion_point(class_scope:ril_proto.ReqDial)
+
class ReqHangUp(message.Message):
__metaclass__ = reflection.GeneratedProtocolMessageType
DESCRIPTOR = _REQHANGUP
dispatchTable[RIL_REQUEST_GET_CURRENT_CALLS] = { // 9
'components' : [simulatedRadioWorker],
};
+dispatchTable[RIL_REQUEST_DIAL] = { // 10
+ 'components' : [simulatedRadioWorker],
+ 'schemaName' : 'ReqDial',
+};
dispatchTable[RIL_REQUEST_GET_IMSI] = { // 11
'components' : [simulatedIccWorker],
};
setRadioState(RADIOSTATE_SIM_READY);
// send the signal strength after 5 seconds, wait until mock ril is started
simulatedRadioWorker.addDelayed({
- 'reqNum' : REQUEST_UNSOL_SIGNAL_STRENGTH}, 5000);
+ 'reqNum' : REQUEST_UNSOL_SIGNAL_STRENGTH}, 5000);
print("startMockRil X:");
}
var RIL_E_ILLEGAL_SIM_OR_ME = 15; /* network selection failed due to */
/**
+ * RIL_CallState
+ */
+var CALLSTATE_ACTIVE = 0;
+var CALLSTATE_HOLDING = 1;
+var CALLSTATE_DIALING = 2; /* MO call only */
+var CALLSTATE_ALERTING = 3; /* MO call only */
+var CALLSTATE_INCOMING = 4; /* MT call only */
+var CALLSTATE_WAITING = 5; /* MT call only */
+
+/**
* RIL_RadioState
*/
var RADIOSTATE_OFF = 0; /* Radio explictly powered off (eg CFUN=0) */
*/
var REQUEST_DELAY_TEST = 2000
var REQUEST_UNSOL_SIGNAL_STRENGTH = 2001
+var REQUEST_UNSOL_CALL_STATE_CHANGED = 2002
+
+/**
+ * Other variables
+ */
+var OUTGOING = 0; /* outgoing call */
+var INCOMING = 1; /* incoming call */
* @return the RilCall at calls[index] or null if undefined.
*/
this.getCall = function(index) {
+ var c = null;
try {
c = calls[index];
if (typeof c == 'undefined') {
return c;
}
- /**
- * Add an active call.
+ /** Add an active call
*
* @return a RilCall or null if too many active calls.
*/
this.addCall = function(state, phoneNumber, callerName) {
- c = null;
+ print('Radio: addCall');
+ var c = null;
if (numberActiveCalls < maxNumberActiveCalls) {
numberActiveCalls += 1;
c = new RilCall(state, phoneNumber, callerName);
* @return the call removed or null if did not exist
*/
this.removeCall = function(index) {
+ var c = null;
if ((numberActiveCalls > 0)
&& (index < calls.length)
&& (typeof calls[index] != 'undefined')) {
/**
* set signal strength
+ *
+ * @param rssi and bitErrorRate are signal strength parameters for GSM
+ * cdmaDbm, cdmaEcio, evdoRssi, evdoEcio, evdoSnr are parameters for CDMA & EVDO
*/
this.setSignalStrength = function(rssi, bitErrorRate, cdmaDbm, cdmaEcio, evdoRssi,
evdoEcio, evdoSnr) {
if (rssi != 99) {
if ((rssi < 0) || (rssi > 31)) {
- throw ("not a valid signal strength");
+ throw ('not a valid signal strength');
}
}
// update signal strength
'RspSignalStrength'].serialize(rsp);
sendRilUnsolicitedResponse(RIL_UNSOL_SIGNAL_STRENGTH, response);
+
+ // send the unsolicited signal strength every 1 minute.
+ simulatedRadioWorker.addDelayed(
+ {'reqNum' : REQUEST_UNSOL_SIGNAL_STRENGTH}, 60000);
+ print('setSignalStrength X');
}
/**
*/
this.rilRequestGetCurrentCalls = function(req) { // 9
print('Radio: rilRequestGetCurrentCalls E');
- rsp = new Object();
+ var rsp = new Object();
// pack calls into rsp.calls
rsp.calls = new Array();
}
}
result.responseProtobuf = rilSchema[packageNameAndSeperator +
- 'RspGetCurrentCalls'].serialize(rsp);
+ 'RspGetCurrentCalls'].serialize(rsp);
return result;
}
*/
this.rilRequestHangUp = function(req) { // 12
print('Radio: rilRequestHangUp data.connection_index=' + req.data.connectionIndex);
- if (removeCall(req.data.connectionIndex) == null) {
+ if (this.removeCall(req.data.connectionIndex) == null) {
result.rilErrCode = RIL_E_GENERIC_FAILURE;
}
return result;
*/
this.rilRequestSignalStrength = function(req) { // 19
print('Radio: rilRequestSignalStrength E');
- rsp = new Object();
+ var rsp = new Object();
// pack the signal strength into RspSignalStrength
rsp.gwSignalstrength = gwSignalStrength;
this.rilRequestRegistrationState = function(req) { // 20
print('Radio: rilRequestRegistrationState');
- var rsp = Object();
+ var rsp = new Object();
rsp.strings = Array();
rsp.strings[0] = registrationState;
rsp.strings[1] = lac;
this.rilRequestGprsRegistrationState = function(req) { // 21
print('Radio: rilRequestGprsRegistrationState');
- var rsp = Object();
+ var rsp = new Object();
rsp.strings = Array();
rsp.strings[0] = registrationState;
rsp.strings[1] = lac;
this.rilRequestQueryNeworkSelectionMode = function(req) { // 45
print('Radio: rilRequestQueryNeworkSelectionMode');
- var rsp = Object();
+ var rsp = new Object();
rsp.integers = Array();
rsp.integers[0] = networkSelectionMode;
*/
this.rilRequestBaseBandVersion = function (req) { // 51
print('Radio: rilRequestBaseBandVersion');
- var rsp = Object();
+ var rsp = new Object();
rsp.strings = Array();
rsp.strings[0] = gBaseBandVersion;
/**
* Delay test
*/
- this.delayTestRequestHandler = function (req) { // 2000
+ this.delayTestRequestHandler = function(req) { // 2000
print('delayTestRequestHandler: req.hello=' + req.hello);
result.sendResponse = false;
return result;
* Method 2: Simulate signal strength randomly (within a certain range) and
* send the response periodically.
*/
- this.rilUnsolSignalStrength = function (req) { // 2001
+ this.rilUnsolSignalStrength = function(req) { // 2001
print('rilUnsolSignalStrength: req.reqNum=' + req.reqNum);
- rsp = new Object();
+ var rsp = new Object();
// pack the signal strength into RspSignalStrength
rsp.gwSignalstrength = gwSignalStrength;
try {
result = this.radioDispatchTable[req.reqNum](req);
} catch (err) {
+ print('err = ' + err);
print('Radio: Unknown reqNum=' + req.reqNum);
result.rilErrCode = RIL_E_REQUEST_NOT_SUPPORTED;
}
this.radioDispatchTable[RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE] = // 45
this.rilRequestQueryNeworkSelectionMode;
this.radioDispatchTable[RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC] = // 46
- this.rilRequestSetNeworkSelectionAutomatic;
+ this.rilRequestSetNeworkSelectionAutomatic;
this.radioDispatchTable[RIL_REQUEST_BASEBAND_VERSION] = // 51
this.rilRequestBaseBandVersion;
this.radioDispatchTable[RIL_REQUEST_SCREEN_STATE] = // 61
function testCalls() {
print('testCalls E:');
- c0 = simulatedRadio.addCall('CALLSTATE_ACTIVE', '18312342134', 'wink');
+ c0 = simulatedRadio.addCall(CALLSTATE_ACTIVE, '18312342134', 'wink');
simulatedRadio.printCalls();
- c1 = simulatedRadio.addCall('CALLSTATE_ACTIVE', '18312342135', 'me');
+ c1 = simulatedRadio.addCall(CALLSTATE_ACTIVE, '18312342135', 'me');
simulatedRadio.printCalls();
+ c2 = simulatedRadio.addCall(CALLSTATE_ACTIVE, '18312342135', 'x');
+ simulatedRadio.printCalls();
+ c3 = simulatedRadio.addCall(CALLSTATE_ACTIVE, '18312342135', 'y');
+ simulatedRadio.printCalls();
+
simulatedRadio.removeCall(c0.index);
simulatedRadio.printCalls();
+ simulatedRadio.removeCall(c1.index);
+ simulatedRadio.printCalls();
+ simulatedRadio.removeCall(c2.index);
+ simulatedRadio.printCalls();
result = simulatedRadio.rilRequestGetCurrentCalls();
newCalls = rilSchema[packageNameAndSeperator +
- 'RspGetCurrentCalls'].parse(result.responseProtobuf);
+ 'RspGetCurrentCalls'].parse(result.responseProtobuf);
simulatedRadio.printCalls(newCalls.calls);
// Set to false to test RIL_REQUEST_GET_CURRENT_CALLS as there will
- // be on call still ative on the first RIL_REQUEST_GET_CURRENT_CALLS
+ // be on call still active on the first RIL_REQUEST_GET_CURRENT_CALLS
// request.
if (false) {
simulatedRadio.removeCall(c1.index);
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;