message: Handle getSystemCapability Request
diff: @@ -27,14 +27,51 @@ void GetSystemCapabilityRequest::Run() {
  return;
  }
  smart_objects::SmartObject response_params(smart_objects::SmartType_Map);
  + //response_params[strings::system_capability][strings::system_capability_type] = (mobile_apis::SystemCapabilityType::PHONE_CALL);
  + mobile_apis::SystemCapabilityType::eType response_type = static_cast<mobile_apis::SystemCapabilityType::eType>((*message_)[strings::msg_params][strings::system_capability_type].asInt());
  + response_params[strings::system_capability][strings::system_capability_type] = response_type;
  - response_params[strings::system_capability][strings::system_capability_type] = mobile_apis::SystemCapabilityType::PHONE_CALL;
  - LOG4CXX_INFO(logger_ ,"Sanity " << response_params[strings::system_capability_type].asInt());
  + const HMICapabilities& hmi_capabilities =
  + application_manager_.hmi_capabilities();
  +
  + switch (response_type) {
  + case mobile_apis::SystemCapabilityType::NAVIGATION: {
  + if (hmi_capabilities.navigation_capability()) {
  + response_params[strings::system_capability][strings::navigation_capability] =
  + *hmi_capabilities.navigation_capability();
  + } else {
  + SendResponse(false, mobile_apis::Result::DATA_NOT_AVAILABLE);
  + return;
  + }
  + break;
  + }
  + case mobile_apis::SystemCapabilityType::PHONE_CALL: {
  + if (hmi_capabilities.phone_capability()) {
  + response_params[strings::system_capability][strings::phone_capability] =
  + *hmi_capabilities.phone_capability();
  + } else {
  + SendResponse(false, mobile_apis::Result::DATA_NOT_AVAILABLE);
  + return;
  + }
  + break;
  + }
  + case mobile_apis::SystemCapabilityType::VIDEO_STREAMING:
  + SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
  + return;
  + break;
  + case mobile_apis::SystemCapabilityType::AUDIO_STREAMING:
  + SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
  + return;
  + break;
  + default: // Return unsupported resource
  + SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
  + break;
  + }
  SendResponse(true, mobile_apis::Result::SUCCESS, NULL, &response_params);
  }
  void GetSystemCapabilityRequest::on_event(const event_engine::Event& event){
  - LOG4CXX_INFO(logger_, "GetSystemCapabilityRequest onEVENTs");
  + LOG4CXX_INFO(logger_, "GetSystemCapabilityRequest on_event");
  }
  } // namespace commands
  