summaryrefslogtreecommitdiff
path: root/src/components/include/connection_handler/connection_handler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/include/connection_handler/connection_handler.h')
-rw-r--r--src/components/include/connection_handler/connection_handler.h52
1 files changed, 39 insertions, 13 deletions
diff --git a/src/components/include/connection_handler/connection_handler.h b/src/components/include/connection_handler/connection_handler.h
index a50760b547..eb92336b4f 100644
--- a/src/components/include/connection_handler/connection_handler.h
+++ b/src/components/include/connection_handler/connection_handler.h
@@ -33,14 +33,14 @@
#ifndef SRC_COMPONENTS_INCLUDE_CONNECTION_HANDLER_CONNECTION_HANDLER_H_
#define SRC_COMPONENTS_INCLUDE_CONNECTION_HANDLER_CONNECTION_HANDLER_H_
+#include "connection_handler/connection.h"
#include "connection_handler/connection_handler_settings.h"
-#include "transport_manager/transport_manager_listener.h"
-#include "protocol_handler/session_observer.h"
#include "connection_handler/device.h"
-#include "connection_handler/connection.h"
#include "connection_handler/devices_discovery_starter.h"
-#include "utils/macro.h"
+#include "protocol_handler/session_observer.h"
+#include "transport_manager/transport_manager_listener.h"
#include "utils/data_accessor.h"
+#include "utils/macro.h"
/**
* \namespace connection_handler
@@ -80,6 +80,16 @@ class ConnectionHandler {
connection_handler::DeviceHandle device_handle) = 0;
/**
+ * @brief Retrieves the connection status of a given device
+ *
+ * @param device_handle Handle of device to query
+ *
+ * @return The connection status of the given device
+ */
+ virtual transport_manager::ConnectionStatus GetConnectionStatus(
+ const DeviceHandle& device_handle) const = 0;
+
+ /**
* @brief RunAppOnDevice allows to run specific application on the certain
*device.
*
@@ -93,6 +103,13 @@ class ConnectionHandler {
virtual void ConnectToAllDevices() = 0;
+ virtual void AddCloudAppDevice(
+ const std::string& policy_app_id,
+ const transport_manager::transport_adapter::CloudAppProperties&
+ cloud_properties) = 0;
+
+ virtual void RemoveCloudAppDevice(const DeviceHandle device_id) = 0;
+
/**
* @brief Close the connection revoked by Policy
* @param connection_key pair of connection and session id
@@ -112,6 +129,15 @@ class ConnectionHandler {
virtual uint32_t GetConnectionSessionsCount(uint32_t connection_key) = 0;
/**
+ * @brief Get cloud app id by connection id
+ * @param connection_id unique connection id
+ * @return the policy app id of the cloud app if the connection is tied to a
+ * cloud app, an empty string otherwise.
+ */
+ virtual std::string GetCloudAppID(
+ const transport_manager::ConnectionUID connection_id) const = 0;
+
+ /**
* Gets device id by mac address
* @param mac_address
* @return true if successfully
@@ -132,12 +158,12 @@ class ConnectionHandler {
CloseSessionReason close_reason) = 0;
/**
- * @brief SendEndService allows to end up specific service.
- *
- * @param key application identifier whose service should be closed.
- *
- * @param service_type the service that should be closed.
- */
+ * @brief SendEndService allows to end up specific service.
+ *
+ * @param key application identifier whose service should be closed.
+ *
+ * @param service_type the service that should be closed.
+ */
virtual void SendEndService(uint32_t key, uint8_t service_type) = 0;
/**
@@ -162,9 +188,9 @@ class ConnectionHandler {
uint32_t timeout) = 0;
/**
- * \brief Keep connection associated with the key from being closed by
- * heartbeat monitor
- */
+ * \brief Keep connection associated with the key from being closed by
+ * heartbeat monitor
+ */
virtual void KeepConnectionAlive(uint32_t connection_key,
uint8_t session_id) = 0;