diff options
author | Jacob Keeler <jacob.keeler@livioradio.com> | 2016-09-20 11:44:51 -0400 |
---|---|---|
committer | Jacob Keeler <jacob.keeler@livioradio.com> | 2016-09-20 14:37:25 -0400 |
commit | 039581419749dbdd32590804e8b14a77fcaf9636 (patch) | |
tree | ced927fc4bef4686f7373a5f45dd692bd9fc9de0 /src/components/include/transport_manager/transport_adapter | |
parent | 1b96b7c02d2e338b846a7314c6fa0bdaa31f7c5e (diff) | |
parent | aff7f09a4ec07becfb64dc78992580061d3342ff (diff) | |
download | sdl_core-039581419749dbdd32590804e8b14a77fcaf9636.tar.gz |
Merge branch 'master'
Diffstat (limited to 'src/components/include/transport_manager/transport_adapter')
3 files changed, 35 insertions, 39 deletions
diff --git a/src/components/include/transport_manager/transport_adapter/device.h b/src/components/include/transport_manager/transport_adapter/device.h index e7bca5a46b..a1dd7b9bcf 100644 --- a/src/components/include/transport_manager/transport_adapter/device.h +++ b/src/components/include/transport_manager/transport_adapter/device.h @@ -54,9 +54,9 @@ class Device { * @param unique_device_id device unique identifier. **/ Device(const std::string& name, const DeviceUID& unique_device_id) - : name_(name), - unique_device_id_(unique_device_id), - keep_on_disconnect_(false) {} + : name_(name) + , unique_device_id_(unique_device_id) + , keep_on_disconnect_(false) {} /** * @brief Destructor. **/ @@ -76,7 +76,7 @@ class Device { virtual ApplicationList GetApplicationList() const = 0; - virtual void Stop() { } + virtual void Stop() {} inline const DeviceUID& unique_device_id() const { return unique_device_id_; @@ -116,12 +116,13 @@ class Device { DeviceUID unique_device_id_; /** - * @brief If true, device will remain in list even if all its connections finished. + * @brief If true, device will remain in list even if all its connections + *finished. **/ bool keep_on_disconnect_; }; typedef utils::SharedPtr<Device> DeviceSptr; -typedef std::vector<DeviceSptr> DeviceVector; +typedef std::vector<DeviceSptr> DeviceVector; } // namespace transport_adapter } // namespace transport_manager #endif // SRC_COMPONENTS_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_ADAPTER_DEVICE_H_ diff --git a/src/components/include/transport_manager/transport_adapter/transport_adapter.h b/src/components/include/transport_manager/transport_adapter/transport_adapter.h index 9a820f4cf9..3ff1aa6eee 100644 --- a/src/components/include/transport_manager/transport_adapter/transport_adapter.h +++ b/src/components/include/transport_manager/transport_adapter/transport_adapter.h @@ -50,24 +50,16 @@ namespace transport_manager { -class TMMetricObserver; +class TMTelemetryObserver; namespace transport_adapter { class TransportAdapterListener; // TODO(EZamakhov): cahnge to DeviceUID -//typedef std::string DeviceType; - -enum DeviceType { - AOA, - PASA_AOA, - BLUETOOTH, - PASA_BLUETOOTH, - MME, - TCP, - UNKNOWN -}; +// typedef std::string DeviceType; + +enum DeviceType { AOA, PASA_AOA, BLUETOOTH, PASA_BLUETOOTH, MME, TCP, UNKNOWN }; typedef std::map<DeviceType, std::string> DeviceTypes; @@ -87,14 +79,7 @@ class TransportAdapter { /** * @enum Available types of errors. */ - enum Error { - OK, - FAIL, - NOT_SUPPORTED, - ALREADY_EXISTS, - BAD_STATE, - BAD_PARAM - }; + enum Error { OK, FAIL, NOT_SUPPORTED, ALREADY_EXISTS, BAD_STATE, BAD_PARAM }; public: /** @@ -211,6 +196,15 @@ class TransportAdapter { virtual Error StopClientListening() = 0; /** + * @brief Remove marked as FINALISING connection from accounting. + * + * @param device_handle Device unique identifier. + * @param app_handle Handle of application. + */ + virtual void RemoveFinalizedConnection( + const DeviceUID& device_handle, const ApplicationHandle& app_handle) = 0; + + /** * @brief Disconnect from specified session. * * @param device_handle Handle of device to Disconnect from. @@ -260,8 +254,8 @@ class TransportAdapter { * * @return Container(vector) that holds application unique identifiers. */ - virtual ApplicationList GetApplicationList(const DeviceUID& device_handle) - const = 0; + virtual ApplicationList GetApplicationList( + const DeviceUID& device_handle) const = 0; /** * @brief Return name of device. @@ -272,14 +266,14 @@ class TransportAdapter { */ virtual std::string DeviceName(const DeviceUID& device_id) const = 0; -#ifdef TIME_TESTER +#ifdef TELEMETRY_MONITOR /** * @brief Return Time metric observer * * @param return pointer to Time metric observer */ - virtual TMMetricObserver* GetTimeMetricObserver() = 0; -#endif // TIME_TESTER + virtual TMTelemetryObserver* GetTelemetryObserver() = 0; +#endif // TELEMETRY_MONITOR }; } // namespace transport_adapter } // namespace transport_manager diff --git a/src/components/include/transport_manager/transport_adapter/transport_adapter_event.h b/src/components/include/transport_manager/transport_adapter/transport_adapter_event.h index 525a69fbb7..7879a136b2 100644 --- a/src/components/include/transport_manager/transport_adapter/transport_adapter_event.h +++ b/src/components/include/transport_manager/transport_adapter/transport_adapter_event.h @@ -41,6 +41,7 @@ namespace transport_manager { class TransportAdapterEvent { public: + TransportAdapterEvent() {} /** * @brief Constructor. * @@ -55,14 +56,14 @@ class TransportAdapterEvent { transport_adapter::TransportAdapter* adapter, const DeviceUID& device_handle, const ApplicationHandle& application_id, - ::protocol_handler::RawMessagePtr data, BaseErrorPtr error) - : event_type(type), - application_id(application_id), - device_uid(device_handle), - transport_adapter(adapter), - event_data(data), - event_error(error) { - } + ::protocol_handler::RawMessagePtr data, + BaseErrorPtr error) + : event_type(type) + , application_id(application_id) + , device_uid(device_handle) + , transport_adapter(adapter) + , event_data(data) + , event_error(error) {} /** * @brief Value that describe event type. */ |