diff options
author | Alexandr Galiuzov <agaliuzov@luxoft.com> | 2015-04-28 13:09:18 -0700 |
---|---|---|
committer | Dmitriy Klimenko <dklimenko@luxoft.com> | 2015-04-30 20:17:18 -0700 |
commit | 9ccee5b9946fb245dd0e42850068725e126bc0fe (patch) | |
tree | 3b42fdfbf6a0823bdfa429f509fe68f1d8f8c981 /src/components/transport_manager/src | |
parent | c7f93c4b8bd0fdbffe28aaf86969506468b7be3a (diff) | |
download | sdl_core-9ccee5b9946fb245dd0e42850068725e126bc0fe.tar.gz |
APPLINK-12266: OnAppRegistered: SDL must provide the transport type information; Build fix
Diffstat (limited to 'src/components/transport_manager/src')
4 files changed, 14 insertions, 9 deletions
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc b/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc index 4d02e60896..966c0f9b76 100644 --- a/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc +++ b/src/components/transport_manager/src/bluetooth/bluetooth_transport_adapter.cc @@ -65,7 +65,7 @@ BluetoothTransportAdapter::BluetoothTransportAdapter() } DeviceType BluetoothTransportAdapter::GetDeviceType() const { - return "sdl-bluetooth"; + return BLUETOOTH; } void BluetoothTransportAdapter::Store() const { diff --git a/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc b/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc index ade69cba69..21a3506da4 100644 --- a/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc +++ b/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc @@ -71,7 +71,7 @@ TcpTransportAdapter::~TcpTransportAdapter() { } DeviceType TcpTransportAdapter::GetDeviceType() const { - return "sdl-tcp"; + return TCP; } void TcpTransportAdapter::Store() const { diff --git a/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc b/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc index d45143a900..170cb7b734 100644 --- a/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc +++ b/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc @@ -43,6 +43,16 @@ namespace transport_manager { namespace transport_adapter { CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager") +namespace { +DeviceTypes devicesType = { + std::make_pair(AOA, std::string("USB")), + std::make_pair(PASA_AOA, std::string("USB")), + std::make_pair(MME, std::string("USB")), + std::make_pair(BLUETOOTH, std::string("BLUETOOTH")), + std::make_pair(PASA_BLUETOOTH, std::string("BLUETOOTH")), + std::make_pair(TCP, std::string("WIFI")) +}; +} TransportAdapterImpl::TransportAdapterImpl( DeviceScanner* device_scanner, @@ -757,12 +767,7 @@ std::string TransportAdapterImpl::DeviceName(const DeviceUID& device_id) const { } std::string TransportAdapterImpl::GetConnectionType() const { - const std::string deviceType = GetDeviceType(); - std::string result("USB_serial_number"); - if ("sdl-tcp" == deviceType || "sdl-bluetooth" == deviceType) { - result.assign("BTMAC"); - } - return result; + return devicesType[GetDeviceType()]; } #ifdef TIME_TESTER diff --git a/src/components/transport_manager/src/usb/usb_aoa_adapter.cc b/src/components/transport_manager/src/usb/usb_aoa_adapter.cc index b3ebb104dc..6363fb7bf9 100644 --- a/src/components/transport_manager/src/usb/usb_aoa_adapter.cc +++ b/src/components/transport_manager/src/usb/usb_aoa_adapter.cc @@ -56,7 +56,7 @@ UsbAoaAdapter::UsbAoaAdapter() UsbAoaAdapter::~UsbAoaAdapter() {} DeviceType UsbAoaAdapter::GetDeviceType() const { - return "sdl-usb-aoa"; + return PASA_AOA; } bool UsbAoaAdapter::IsInitialised() const { |