OSDN Git Service

Add RIL_REQUEST_SET_MUTE
authorXia Wang <xiaw@google.com>
Tue, 7 Sep 2010 22:02:17 +0000 (15:02 -0700)
committerXia Wang <xiaw@google.com>
Thu, 9 Sep 2010 18:16:26 +0000 (11:16 -0700)
Make the change in simulated_icc: pass the correct scope for function call
Remove extra space for function declaration in simulated_radio.

Change-Id: I408bec6e6866b60e18b8317ff83639c8418184f4

mock-ril/src/cpp/requests.cpp
mock-ril/src/generated/cpp/ril.pb.cpp
mock-ril/src/generated/cpp/ril.pb.h
mock-ril/src/generated/desc/ril.desc
mock-ril/src/generated/java/com/android/internal/telephony/ril_proto/RilCmds.java
mock-ril/src/generated/python/ril_pb2.py
mock-ril/src/js/mock_ril.js
mock-ril/src/js/simulated_icc.js
mock-ril/src/js/simulated_radio.js
mock-ril/src/proto/ril.proto

index 990d138..b28809d 100644 (file)
@@ -175,6 +175,34 @@ int ReqHangUp(Buffer **pBuffer,
 }
 
 /**
+ * request for RIL_REQUEST_SET_MUTE      // 53
+ */
+int ReqSetMute(Buffer **pBuffer,
+               const void *data, const size_t datalen, const RIL_Token t) {
+    int status;
+    Buffer *buffer;
+    v8::HandleScope handle_scope;
+
+    DBG("ReqSetMute E");
+    if (datalen < sizeof(int)) {
+        LOGE("ReqSetMute: data to small err size < sizeof int");
+        status = STATUS_BAD_DATA;
+    } else {
+        ril_proto::ReqSetMute *req = new ril_proto::ReqSetMute();
+        DBG("ReqSetMute: state=%d", ((int *)data)[0]);
+        req->set_state(((int *)data)[0]);
+        DBG("ReqSetMute: req->ByetSize=%d", req->ByteSize());
+        buffer = Buffer::New(req->ByteSize());
+        req->SerializeToArray(buffer->data(), buffer->length());
+        delete req;
+        *pBuffer = buffer;
+        status = STATUS_OK;
+    }
+    DBG("ReqSetMute X status=%d", status);
+    return status;
+}
+
+/**
  * request for RIL_REQUEST_SCREEN_STATE  // 61
  */
 int ReqScreenState(Buffer **pBuffer,
@@ -182,7 +210,6 @@ int ReqScreenState(Buffer **pBuffer,
     int status;
     Buffer *buffer;
     v8::HandleScope handle_scope;
-    v8::TryCatch try_catch;
 
     DBG("ReqScreenState E data=%p datalen=%d t=%p",
          data, datalen, t);
@@ -193,9 +220,6 @@ int ReqScreenState(Buffer **pBuffer,
         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");
@@ -368,6 +392,7 @@ int requestsInit(v8::Handle<v8::Context> context, RilRequestWorkerQueue **rwq) {
     rilReqConversionMap[RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE] = ReqWithNoData; // 45
     rilReqConversionMap[RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC] = ReqWithNoData; // 46
     rilReqConversionMap[RIL_REQUEST_BASEBAND_VERSION] = ReqWithNoData; // 51
+    rilReqConversionMap[RIL_REQUEST_SET_MUTE] = ReqSetMute; // 53
     rilReqConversionMap[RIL_REQUEST_SCREEN_STATE] = ReqScreenState; // 61
 
     *rwq = new RilRequestWorkerQueue(context);
index 8bfe506..9d2806e 100644 (file)
@@ -65,6 +65,9 @@ const ::google::protobuf::internal::GeneratedMessageReflection*
 const ::google::protobuf::Descriptor* RspOperator_descriptor_ = NULL;
 const ::google::protobuf::internal::GeneratedMessageReflection*
   RspOperator_reflection_ = NULL;
+const ::google::protobuf::Descriptor* ReqSetMute_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+  ReqSetMute_reflection_ = NULL;
 const ::google::protobuf::Descriptor* ReqScreenState_descriptor_ = NULL;
 const ::google::protobuf::internal::GeneratedMessageReflection*
   ReqScreenState_reflection_ = NULL;
@@ -379,7 +382,22 @@ void protobuf_AssignDesc_ril_2eproto() {
       ::google::protobuf::DescriptorPool::generated_pool(),
       ::google::protobuf::MessageFactory::generated_factory(),
       sizeof(RspOperator));
-  ReqScreenState_descriptor_ = file->message_type(17);
+  ReqSetMute_descriptor_ = file->message_type(17);
+  static const int ReqSetMute_offsets_[1] = {
+    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReqSetMute, state_),
+  };
+  ReqSetMute_reflection_ =
+    new ::google::protobuf::internal::GeneratedMessageReflection(
+      ReqSetMute_descriptor_,
+      ReqSetMute::default_instance_,
+      ReqSetMute_offsets_,
+      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReqSetMute, _has_bits_[0]),
+      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReqSetMute, _unknown_fields_),
+      -1,
+      ::google::protobuf::DescriptorPool::generated_pool(),
+      ::google::protobuf::MessageFactory::generated_factory(),
+      sizeof(ReqSetMute));
+  ReqScreenState_descriptor_ = file->message_type(18);
   static const int ReqScreenState_offsets_[1] = {
     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReqScreenState, state_),
   };
@@ -450,6 +468,8 @@ void protobuf_RegisterTypes(const ::std::string&) {
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
     RspOperator_descriptor_, &RspOperator::default_instance());
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+    ReqSetMute_descriptor_, &ReqSetMute::default_instance());
+  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
     ReqScreenState_descriptor_, &ReqScreenState::default_instance());
 }
 
@@ -490,6 +510,8 @@ void protobuf_ShutdownFile_ril_2eproto() {
   delete RspSignalStrength_reflection_;
   delete RspOperator::default_instance_;
   delete RspOperator_reflection_;
+  delete ReqSetMute::default_instance_;
+  delete ReqSetMute_reflection_;
   delete ReqScreenState::default_instance_;
   delete ReqScreenState_reflection_;
 }
@@ -548,64 +570,64 @@ void protobuf_AddDesc_ril_2eproto() {
     "\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);
+    "\"\033\n\nReqSetMute\022\r\n\005state\030\001 \002(\010\"\037\n\016ReqScre"
+    "enState\022\r\n\005state\030\001 \002(\010*\257\002\n\nRadioState\022\022\n"
+    "\016RADIOSTATE_OFF\020\000\022\032\n\026RADIOSTATE_UNAVAILA"
+    "BLE\020\001\022\034\n\030RADIOSTATE_SIM_NOT_READY\020\002\022#\n\037R"
+    "ADIOSTATE_SIM_LOCKED_OR_ABSENT\020\003\022\030\n\024RADI"
+    "OSTATE_SIM_READY\020\004\022\035\n\031RADIOSTATE_RUIM_NO"
+    "T_READY\020\005\022\031\n\025RADIOSTATE_RUIM_READY\020\006\022$\n "
+    "RADIOSTATE_RUIM_LOCKED_OR_ABSENT\020\007\022\033\n\027RA"
+    "DIOSTATE_NV_NOT_READY\020\010\022\027\n\023RADIOSTATE_NV"
+    "_READY\020\t*P\n\014RilCardState\022\024\n\020CARDSTATE_AB"
+    "SENT\020\000\022\025\n\021CARDSTATE_PRESENT\020\001\022\023\n\017CARDSTA"
+    "TE_ERROR\020\002*\361\006\n\020RilPersoSubstate\022\031\n\025PERSO"
+    "SUBSTATE_UNKNOWN\020\000\022\035\n\031PERSOSUBSTATE_IN_P"
+    "ROGRESS\020\001\022\027\n\023PERSOSUBSTATE_READY\020\002\022\035\n\031PE"
+    "RSOSUBSTATE_SIM_NETWORK\020\003\022$\n PERSOSUBSTA"
+    "TE_SIM_NETWORK_SUBSET\020\004\022\037\n\033PERSOSUBSTATE"
+    "_SIM_CORPORATE\020\005\022&\n\"PERSOSUBSTATE_SIM_SE"
+    "RVICE_PROVIDER\020\006\022\031\n\025PERSOSUBSTATE_SIM_SI"
+    "M\020\007\022!\n\035PERSOSUBSTATE_SIM_NETWORK_PUK\020\010\022("
+    "\n$PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK\020\t"
+    "\022#\n\037PERSOSUBSTATE_SIM_CORPORATE_PUK\020\n\022*\n"
+    "&PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK\020"
+    "\013\022\035\n\031PERSOSUBSTATE_SIM_SIM_PUK\020\014\022\037\n\033PERS"
+    "OSUBSTATE_RUIM_NETWORK1\020\r\022\037\n\033PERSOSUBSTA"
+    "TE_RUIM_NETWORK2\020\016\022\033\n\027PERSOSUBSTATE_RUIM"
+    "_HRPD\020\017\022 \n\034PERSOSUBSTATE_RUIM_CORPORATE\020"
+    "\020\022\'\n#PERSOSUBSTATE_RUIM_SERVICE_PROVIDER"
+    "\020\021\022\033\n\027PERSOSUBSTATE_RUIM_RUIM\020\022\022#\n\037PERSO"
+    "SUBSTATE_RUIM_NETWORK1_PUK\020\023\022#\n\037PERSOSUB"
+    "STATE_RUIM_NETWORK2_PUK\020\024\022\037\n\033PERSOSUBSTA"
+    "TE_RUIM_HRPD_PUK\020\025\022$\n PERSOSUBSTATE_RUIM"
+    "_CORPORATE_PUK\020\026\022+\n\'PERSOSUBSTATE_RUIM_S"
+    "ERVICE_PROVIDER_PUK\020\027\022\037\n\033PERSOSUBSTATE_R"
+    "UIM_RUIM_PUK\020\030*\223\001\n\013RilAppState\022\024\n\020APPSTA"
+    "TE_UNKNOWN\020\000\022\025\n\021APPSTATE_DETECTED\020\001\022\020\n\014A"
+    "PPSTATE_PIN\020\002\022\020\n\014APPSTATE_PUK\020\003\022\037\n\033APPST"
+    "ATE_SUBSCRIPTION_PERSO\020\004\022\022\n\016APPSTATE_REA"
+    "DY\020\005*\275\001\n\013RilPinState\022\024\n\020PINSTATE_UNKNOWN"
+    "\020\000\022!\n\035PINSTATE_ENABLED_NOT_VERIFIED\020\001\022\035\n"
+    "\031PINSTATE_ENABLED_VERIFIED\020\002\022\025\n\021PINSTATE"
+    "_DISABLED\020\003\022\034\n\030PINSTATE_ENABLED_BLOCKED\020"
+    "\004\022!\n\035PINSTATE_ENABLED_PERM_BLOCKED\020\005*h\n\n"
+    "RilAppType\022\023\n\017APPTYPE_UNKNOWN\020\000\022\017\n\013APPTY"
+    "PE_SIM\020\001\022\020\n\014APPTYPE_USIM\020\002\022\020\n\014APPTYPE_RU"
+    "IM\020\003\022\020\n\014APPTYPE_CSIM\020\004*\316\001\n\nRilUusType\022\030\n"
+    "\024RILUUSTYPE1_IMPLICIT\020\000\022\030\n\024RILUUSTYPE1_R"
+    "EQUIRED\020\001\022\034\n\030RILUUSTYPE1_NOT_REQUIRED\020\002\022"
+    "\030\n\024RILUUSTYPE2_REQUIRED\020\003\022\034\n\030RILUUSTYPE2"
+    "_NOT_REQUIRED\020\004\022\030\n\024RILUUSTYPE3_REQUIRED\020"
+    "\005\022\034\n\030RILUUSTYPE3_NOT_REQUIRED\020\006*p\n\tRilUu"
+    "sDcs\022\021\n\rRILUUSDCS_USP\020\000\022\024\n\020RILUUSDCS_OSI"
+    "HLP\020\001\022\022\n\016RILUUSDCS_X244\020\002\022\022\n\016RILUUSDCS_R"
+    "MCF\020\003\022\022\n\016RILUUSDCS_IA5c\020\004*\231\001\n\014RilCallSta"
+    "te\022\024\n\020CALLSTATE_ACTIVE\020\000\022\025\n\021CALLSTATE_HO"
+    "LDING\020\001\022\025\n\021CALLSTATE_DIALING\020\002\022\026\n\022CALLST"
+    "ATE_ALERTING\020\003\022\026\n\022CALLSTATE_INCOMING\020\004\022\025"
+    "\n\021CALLSTATE_WAITING\020\005B3\n(com.android.int"
+    "ernal.telephony.ril_protoB\007RilCmds", 4194);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "ril.proto", &protobuf_RegisterTypes);
   RilAppStatus::default_instance_ = new RilAppStatus();
@@ -625,6 +647,7 @@ void protobuf_AddDesc_ril_2eproto() {
   ReqHangUp::default_instance_ = new ReqHangUp();
   RspSignalStrength::default_instance_ = new RspSignalStrength();
   RspOperator::default_instance_ = new RspOperator();
+  ReqSetMute::default_instance_ = new ReqSetMute();
   ReqScreenState::default_instance_ = new ReqScreenState();
   RilAppStatus::default_instance_->InitAsDefaultInstance();
   RilCardStatus::default_instance_->InitAsDefaultInstance();
@@ -643,6 +666,7 @@ void protobuf_AddDesc_ril_2eproto() {
   ReqHangUp::default_instance_->InitAsDefaultInstance();
   RspSignalStrength::default_instance_->InitAsDefaultInstance();
   RspOperator::default_instance_->InitAsDefaultInstance();
+  ReqSetMute::default_instance_->InitAsDefaultInstance();
   ReqScreenState::default_instance_->InitAsDefaultInstance();
   ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_ril_2eproto);
 }
@@ -6110,6 +6134,212 @@ void RspOperator::Swap(RspOperator* other) {
 // ===================================================================
 
 #ifndef _MSC_VER
+const int ReqSetMute::kStateFieldNumber;
+#endif  // !_MSC_VER
+
+ReqSetMute::ReqSetMute()
+  : ::google::protobuf::Message() {
+  SharedCtor();
+}
+
+void ReqSetMute::InitAsDefaultInstance() {
+}
+
+ReqSetMute::ReqSetMute(const ReqSetMute& from)
+  : ::google::protobuf::Message() {
+  SharedCtor();
+  MergeFrom(from);
+}
+
+void ReqSetMute::SharedCtor() {
+  _cached_size_ = 0;
+  state_ = false;
+  ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+ReqSetMute::~ReqSetMute() {
+  SharedDtor();
+}
+
+void ReqSetMute::SharedDtor() {
+  if (this != default_instance_) {
+  }
+}
+
+void ReqSetMute::SetCachedSize(int size) const {
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* ReqSetMute::descriptor() {
+  protobuf_AssignDescriptorsOnce();
+  return ReqSetMute_descriptor_;
+}
+
+const ReqSetMute& ReqSetMute::default_instance() {
+  if (default_instance_ == NULL) protobuf_AddDesc_ril_2eproto();  return *default_instance_;
+}
+
+ReqSetMute* ReqSetMute::default_instance_ = NULL;
+
+ReqSetMute* ReqSetMute::New() const {
+  return new ReqSetMute;
+}
+
+void ReqSetMute::Clear() {
+  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    state_ = false;
+  }
+  ::memset(_has_bits_, 0, sizeof(_has_bits_));
+  mutable_unknown_fields()->Clear();
+}
+
+bool ReqSetMute::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)) {
+      // required bool state = 1;
+      case 1: {
+        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+                 input, &state_)));
+          _set_bit(0);
+        } 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 ReqSetMute::SerializeWithCachedSizes(
+    ::google::protobuf::io::CodedOutputStream* output) const {
+  // required bool state = 1;
+  if (_has_bit(0)) {
+    ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->state(), output);
+  }
+  
+  if (!unknown_fields().empty()) {
+    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+        unknown_fields(), output);
+  }
+}
+
+::google::protobuf::uint8* ReqSetMute::SerializeWithCachedSizesToArray(
+    ::google::protobuf::uint8* target) const {
+  // required bool state = 1;
+  if (_has_bit(0)) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->state(), target);
+  }
+  
+  if (!unknown_fields().empty()) {
+    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+        unknown_fields(), target);
+  }
+  return target;
+}
+
+int ReqSetMute::ByteSize() const {
+  int total_size = 0;
+  
+  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    // required bool state = 1;
+    if (has_state()) {
+      total_size += 1 + 1;
+    }
+    
+  }
+  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 ReqSetMute::MergeFrom(const ::google::protobuf::Message& from) {
+  GOOGLE_CHECK_NE(&from, this);
+  const ReqSetMute* source =
+    ::google::protobuf::internal::dynamic_cast_if_available<const ReqSetMute*>(
+      &from);
+  if (source == NULL) {
+    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+  } else {
+    MergeFrom(*source);
+  }
+}
+
+void ReqSetMute::MergeFrom(const ReqSetMute& from) {
+  GOOGLE_CHECK_NE(&from, this);
+  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    if (from._has_bit(0)) {
+      set_state(from.state());
+    }
+  }
+  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void ReqSetMute::CopyFrom(const ::google::protobuf::Message& from) {
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+void ReqSetMute::CopyFrom(const ReqSetMute& from) {
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+bool ReqSetMute::IsInitialized() const {
+  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
+  
+  return true;
+}
+
+void ReqSetMute::Swap(ReqSetMute* other) {
+  if (other != this) {
+    std::swap(state_, other->state_);
+    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 ReqSetMute::GetMetadata() const {
+  protobuf_AssignDescriptorsOnce();
+  ::google::protobuf::Metadata metadata;
+  metadata.descriptor = ReqSetMute_descriptor_;
+  metadata.reflection = ReqSetMute_reflection_;
+  return metadata;
+}
+
+
+// ===================================================================
+
+#ifndef _MSC_VER
 const int ReqScreenState::kStateFieldNumber;
 #endif  // !_MSC_VER
 
index 3d7c7e6..5813661 100644 (file)
@@ -49,6 +49,7 @@ class ReqDial;
 class ReqHangUp;
 class RspSignalStrength;
 class RspOperator;
+class ReqSetMute;
 class ReqScreenState;
 
 enum RadioState {
@@ -2152,6 +2153,95 @@ class RspOperator : public ::google::protobuf::Message {
 };
 // -------------------------------------------------------------------
 
+class ReqSetMute : public ::google::protobuf::Message {
+ public:
+  ReqSetMute();
+  virtual ~ReqSetMute();
+  
+  ReqSetMute(const ReqSetMute& from);
+  
+  inline ReqSetMute& operator=(const ReqSetMute& 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 ReqSetMute& default_instance();
+  
+  void Swap(ReqSetMute* other);
+  
+  // implements Message ----------------------------------------------
+  
+  ReqSetMute* New() const;
+  void CopyFrom(const ::google::protobuf::Message& from);
+  void MergeFrom(const ::google::protobuf::Message& from);
+  void CopyFrom(const ReqSetMute& from);
+  void MergeFrom(const ReqSetMute& 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 -------------------------------------------------------
+  
+  // required bool state = 1;
+  inline bool has_state() const;
+  inline void clear_state();
+  static const int kStateFieldNumber = 1;
+  inline bool state() const;
+  inline void set_state(bool value);
+  
+  // @@protoc_insertion_point(class_scope:ril_proto.ReqSetMute)
+ private:
+  ::google::protobuf::UnknownFieldSet _unknown_fields_;
+  mutable int _cached_size_;
+  
+  bool state_;
+  friend void  protobuf_AddDesc_ril_2eproto();
+  friend void protobuf_AssignDesc_ril_2eproto();
+  friend void protobuf_ShutdownFile_ril_2eproto();
+  
+  ::google::protobuf::uint32 _has_bits_[(1 + 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 ReqSetMute* default_instance_;
+};
+// -------------------------------------------------------------------
+
 class ReqScreenState : public ::google::protobuf::Message {
  public:
   ReqScreenState();
@@ -3507,6 +3597,26 @@ inline ::std::string* RspOperator::mutable_mcc_mnc() {
 
 // -------------------------------------------------------------------
 
+// ReqSetMute
+
+// required bool state = 1;
+inline bool ReqSetMute::has_state() const {
+  return _has_bit(0);
+}
+inline void ReqSetMute::clear_state() {
+  state_ = false;
+  _clear_bit(0);
+}
+inline bool ReqSetMute::state() const {
+  return state_;
+}
+inline void ReqSetMute::set_state(bool value) {
+  _set_bit(0);
+  state_ = value;
+}
+
+// -------------------------------------------------------------------
+
 // ReqScreenState
 
 // required bool state = 1;
index 8ab84b8..66d5814 100644 (file)
Binary files a/mock-ril/src/generated/desc/ril.desc and b/mock-ril/src/generated/desc/ril.desc differ
index 03556d7..ae339dd 100644 (file)
@@ -2838,6 +2838,99 @@ public final class RilCmds {
     
   }
   
+  public static final class ReqSetMute extends
+      com.google.protobuf.micro.MessageMicro {
+    public ReqSetMute() {}
+    
+    // required bool state = 1;
+    public static final int STATE_FIELD_NUMBER = 1;
+    private boolean hasState;
+    private boolean state_ = false;
+    public boolean getState() { return state_; }
+    public boolean hasState() { return hasState; }
+    public ReqSetMute setState(boolean value) {
+      hasState = true;
+      state_ = value;
+      return this;
+    }
+    public ReqSetMute clearState() {
+      hasState = false;
+      state_ = false;
+      return this;
+    }
+    
+    public final ReqSetMute clear() {
+      clearState();
+      cachedSize = -1;
+      return this;
+    }
+    
+    public final boolean isInitialized() {
+      if (!hasState) return false;
+      return true;
+    }
+    
+    public void writeTo(com.google.protobuf.micro.CodedOutputStreamMicro output)
+                        throws java.io.IOException {
+      if (hasState()) {
+        output.writeBool(1, getState());
+      }
+    }
+    
+    private int cachedSize = -1;
+    public int getCachedSize() {
+      if (cachedSize < 0) {
+        // getSerializedSize sets cachedSize
+        getSerializedSize();
+      }
+      return cachedSize;
+    }
+    
+    public int getSerializedSize() {
+      int size = 0;
+      if (hasState()) {
+        size += com.google.protobuf.micro.CodedOutputStreamMicro
+          .computeBoolSize(1, getState());
+      }
+      cachedSize = size;
+      return size;
+    }
+    
+    public ReqSetMute 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 8: {
+            setState(input.readBool());
+            break;
+          }
+        }
+      }
+    }
+    
+    public static ReqSetMute parseFrom(byte[] data)
+        throws com.google.protobuf.micro.InvalidProtocolBufferMicroException {
+      return (ReqSetMute) (new ReqSetMute().mergeFrom(data));
+    }
+    
+    public static ReqSetMute parseFrom(
+            com.google.protobuf.micro.CodedInputStreamMicro input)
+        throws java.io.IOException {
+      return (ReqSetMute) (new ReqSetMute().mergeFrom(input));
+    }
+    
+  }
+  
   public static final class ReqScreenState extends
       com.google.protobuf.micro.MessageMicro {
     public ReqScreenState() {}
index 9f31b18..95d3bf9 100644 (file)
@@ -10,7 +10,7 @@ from google.protobuf import descriptor_pb2
 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\"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')
+  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\"\x1b\n\nReqSetMute\x12\r\n\x05state\x18\x01 \x02(\x08\"\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',
@@ -61,8 +61,8 @@ _RADIOSTATE = descriptor.EnumDescriptor(
   ],
   containing_type=None,
   options=None,
-  serialized_start=1916,
-  serialized_end=2219,
+  serialized_start=1945,
+  serialized_end=2248,
 )
 
 
@@ -87,8 +87,8 @@ _RILCARDSTATE = descriptor.EnumDescriptor(
   ],
   containing_type=None,
   options=None,
-  serialized_start=2221,
-  serialized_end=2301,
+  serialized_start=2250,
+  serialized_end=2330,
 )
 
 
@@ -201,8 +201,8 @@ _RILPERSOSUBSTATE = descriptor.EnumDescriptor(
   ],
   containing_type=None,
   options=None,
-  serialized_start=2304,
-  serialized_end=3185,
+  serialized_start=2333,
+  serialized_end=3214,
 )
 
 
@@ -239,8 +239,8 @@ _RILAPPSTATE = descriptor.EnumDescriptor(
   ],
   containing_type=None,
   options=None,
-  serialized_start=3188,
-  serialized_end=3335,
+  serialized_start=3217,
+  serialized_end=3364,
 )
 
 
@@ -277,8 +277,8 @@ _RILPINSTATE = descriptor.EnumDescriptor(
   ],
   containing_type=None,
   options=None,
-  serialized_start=3338,
-  serialized_end=3527,
+  serialized_start=3367,
+  serialized_end=3556,
 )
 
 
@@ -311,8 +311,8 @@ _RILAPPTYPE = descriptor.EnumDescriptor(
   ],
   containing_type=None,
   options=None,
-  serialized_start=3529,
-  serialized_end=3633,
+  serialized_start=3558,
+  serialized_end=3662,
 )
 
 
@@ -353,8 +353,8 @@ _RILUUSTYPE = descriptor.EnumDescriptor(
   ],
   containing_type=None,
   options=None,
-  serialized_start=3636,
-  serialized_end=3842,
+  serialized_start=3665,
+  serialized_end=3871,
 )
 
 
@@ -387,8 +387,8 @@ _RILUUSDCS = descriptor.EnumDescriptor(
   ],
   containing_type=None,
   options=None,
-  serialized_start=3844,
-  serialized_end=3956,
+  serialized_start=3873,
+  serialized_end=3985,
 )
 
 
@@ -425,8 +425,8 @@ _RILCALLSTATE = descriptor.EnumDescriptor(
   ],
   containing_type=None,
   options=None,
-  serialized_start=3959,
-  serialized_end=4112,
+  serialized_start=3988,
+  serialized_end=4141,
 )
 
 
@@ -1241,6 +1241,34 @@ _RSPOPERATOR = descriptor.Descriptor(
 )
 
 
+_REQSETMUTE = descriptor.Descriptor(
+  name='ReqSetMute',
+  full_name='ril_proto.ReqSetMute',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    descriptor.FieldDescriptor(
+      name='state', full_name='ril_proto.ReqSetMute.state', index=0,
+      number=1, type=8, cpp_type=7, label=2,
+      has_default_value=False, default_value=False,
+      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=1882,
+  serialized_end=1909,
+)
+
+
 _REQSCREENSTATE = descriptor.Descriptor(
   name='ReqScreenState',
   full_name='ril_proto.ReqScreenState',
@@ -1264,8 +1292,8 @@ _REQSCREENSTATE = descriptor.Descriptor(
   options=None,
   is_extendable=False,
   extension_ranges=[],
-  serialized_start=1882,
-  serialized_end=1913,
+  serialized_start=1911,
+  serialized_end=1942,
 )
 
 
@@ -1390,6 +1418,12 @@ class RspOperator(message.Message):
   
   # @@protoc_insertion_point(class_scope:ril_proto.RspOperator)
 
+class ReqSetMute(message.Message):
+  __metaclass__ = reflection.GeneratedProtocolMessageType
+  DESCRIPTOR = _REQSETMUTE
+  
+  # @@protoc_insertion_point(class_scope:ril_proto.ReqSetMute)
+
 class ReqScreenState(message.Message):
   __metaclass__ = reflection.GeneratedProtocolMessageType
   DESCRIPTOR = _REQSCREENSTATE
index aeb5f51..ef949d9 100644 (file)
@@ -269,6 +269,10 @@ dispatchTable[RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC] = { // 46
 dispatchTable[RIL_REQUEST_BASEBAND_VERSION ] = { // 51
     'components' : [simulatedRadioWorker],
 };
+dispatchTable[RIL_REQUEST_SET_MUTE ] = { // 53
+    'components' : [simulatedRadioWorker],
+    'schemaName' : 'ReqSetMute',
+};
 dispatchTable[RIL_REQUEST_SCREEN_STATE] = { // 61
     'components' : [simulatedRadioWorker],
     'schemaName' : 'ReqScreenState',
index e1d6aa4..a8fdd77 100644 (file)
@@ -116,7 +116,7 @@ function Icc() {
             result.responseProtobuf = emptyProtobuf;
 
             try {
-                result = simDispatchTable[req.reqNum](req);
+                result = (this.simDispatchTable[req.reqNum]).call(this, req);
             } catch (err) {
                 print('Icc: Unknown reqNum=' + req.reqNum);
                 result.rilErrCode = RIL_E_REQUEST_NOT_SUPPORTED;
index 9dfe3cd..ad2a2d6 100644 (file)
@@ -95,6 +95,8 @@ function Radio() {
     var NETWORK_SELECTION_MODE_MANUAL = 1;
     var networkSelectionMode = NETWORK_SELECTION_MODE_AUTOMATIC;
 
+    var muteState = 0;   // disable mute
+
     // Number of active calls in calls
     var numberActiveCalls = 0;
 
@@ -140,7 +142,7 @@ function Radio() {
     /**
      * @return the RilCall at calls[index] or null if undefined.
      */
-    this.getCall = function (index) {
+    this.getCall = function(index) {
         var c = null;
         try {
             c = calls[index];
@@ -157,7 +159,7 @@ function Radio() {
      *
      * @return a RilCall or null if too many active calls.
      */
-    this.addCall = function (state, phoneNumber, callerName) {
+    this.addCall = function(state, phoneNumber, callerName) {
         print('Radio: addCall');
         var c = null;
         if (numberActiveCalls < maxNumberActiveCalls) {
@@ -175,7 +177,7 @@ function Radio() {
      * @param index into calls to remove.
      * @return the call removed or null if did not exist
      */
-    this.removeCall =  function (index) {
+    this.removeCall =  function(index) {
         var c = null;
         if ((numberActiveCalls > 0)
                  && (index < calls.length)
@@ -197,7 +199,7 @@ function Radio() {
      *
      * @param c is the RilCall to print
      */
-    this.printCall = function (c) {
+    this.printCall = function(c) {
         if ((c == null) || (typeof c == 'undefined')) {
             print('c[' + i + ']: undefined');
         } else {
@@ -212,7 +214,7 @@ function Radio() {
      *
      * @param callArray is an Array of RilCall's
      */
-    this.printCalls = function (callArray) {
+    this.printCalls = function(callArray) {
         if (typeof callArray == 'undefined') {
             callArray = calls;
         }
@@ -241,7 +243,7 @@ function Radio() {
      * @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,
+    this.setSignalStrength = function(rssi, bitErrorRate, cdmaDbm, cdmaEcio, evdoRssi,
                                       evdoEcio, evdoSnr) {
         print('setSignalStrength E');
 
@@ -313,17 +315,24 @@ function Radio() {
         }
         this.printCalls(calls);
 
-        // Update call state change in 2 seconds
-        simulatedRadioWorker.addDelayed(
+        // Set call state to dialing
+        simulatedRadioWorker.add(
+                        {'reqNum' : REQUEST_UNSOL_CALL_STATE_CHANGED,
+                         'callType' : OUTGOING,
+                         'callIndex' : newCall.index,
+                         'nextState' : CALLSTATE_DIALING});
+        // Update call state to alerting after 1 second
+        simulatedRadioWorker.add(
                         {'reqNum' : REQUEST_UNSOL_CALL_STATE_CHANGED,
                          'callType' : OUTGOING,
                          'callIndex' : newCall.index,
-                         'nextState' : CALLSTATE_ALERTING}, 2000);
+                         'nextState' : CALLSTATE_ALERTING}, 1000);
+       // Update call state to active after 2 seconds
         simulatedRadioWorker.addDelayed(
                         {'reqNum' : REQUEST_UNSOL_CALL_STATE_CHANGED,
                          'callType' : OUTGOING,
                          'callIndex': newCall.index,
-                         'nextState' : CALLSTATE_ACTIVE}, 5000);
+                         'nextState' : CALLSTATE_ACTIVE}, 2000);
         return result;
     }
 
@@ -446,7 +455,7 @@ function Radio() {
      *
      * @param req is the Request
      */
-    this.rilRequestBaseBandVersion = function (req) { // 51
+    this.rilRequestBaseBandVersion = function(req) { // 51
         print('Radio: rilRequestBaseBandVersion');
         var rsp = new Object();
         rsp.strings = Array();
@@ -458,11 +467,23 @@ function Radio() {
     }
 
     /**
+     * Handle RIL_REQUEST_SET_MUTE
+     */
+    this.rilRequestSetMute = function(req) { // 53
+        print('Radio: rilRequestSetMute: req.data.state=' + req.data.state);
+        muteState = req.data.state;
+        if (gRadioState == RADIOSTATE_UNAVAILABLE) {
+            result.rilErrCode = RIL_E_RADIO_NOT_AVAILABLE;
+        }
+        return result;
+    }
+
+    /**
      * Handle RIL_REQUEST_SCREEN_STATE
      *
      * @param req is the Request
      */
-    this.rilRequestScreenState = function (req) { // 61
+    this.rilRequestScreenState = function(req) { // 61
         print('Radio: rilRequestScreenState: req.data.state=' + req.data.state);
         screenState = req.data.state;
         return result;
@@ -593,6 +614,8 @@ function Radio() {
                 this.rilRequestSetNeworkSelectionAutomatic;
     this.radioDispatchTable[RIL_REQUEST_BASEBAND_VERSION] = // 51
                 this.rilRequestBaseBandVersion;
+    this.radioDispatchTable[RIL_REQUEST_SET_MUTE] = // 53
+                this.rilRequestSetMute;
     this.radioDispatchTable[RIL_REQUEST_SCREEN_STATE] = // 61
                 this.rilRequestScreenState;
 
index badc831..46aa66f 100644 (file)
@@ -260,6 +260,11 @@ message RspOperator{
   optional string mcc_mnc                   = 3; // the 5 or 6 digit mcc + mnc
 }
 
+// 53 RIL_REQUEST_SET_MUTE
+message ReqSetMute{
+  required bool state                       = 1; // true to "enable mute", false to "disable mute"
+}
+
 // 61 RIL_REQUEST_SCREEN_STATE
 message ReqScreenState {
   required bool state                       = 1; // true screen is on, false screen is off