Fix the gcov build error
[platform/core/api/tethering.git] / include / tethering.h
index 7ac67b1..e6a3515 100644 (file)
@@ -65,8 +65,14 @@ typedef enum {
     TETHERING_TYPE_USB,  /**< USB type */
     TETHERING_TYPE_WIFI,  /**< Wi-Fi type */
     TETHERING_TYPE_BT,  /**< BT type */
+    TETHERING_TYPE_P2P,  /**< P2P type */
+    TETHERING_TYPE_MAX,  /**< Maximum */
 } tethering_type_e;
 
+typedef enum {
+    TETHERING_WIFI_BAND_2G = 0,
+    TETHERING_WIFI_BAND_5G,
+} tethering_band_e;
 /**
  * @brief Enumeration for the cause of disabling the tethering.
  * @since_tizen 2.3
@@ -101,6 +107,7 @@ typedef enum {
     TETHERING_WIFI_SECURITY_TYPE_NONE = 0,  /**< No Security type */
     TETHERING_WIFI_SECURITY_TYPE_WPA2_PSK,  /**< WPA2_PSK */
        TETHERING_WIFI_SECURITY_TYPE_WPS,  /**< WPA2_PSK */
+       TETHERING_WIFI_SECURITY_TYPE_SAE,  /**< SAE */
 } tethering_wifi_security_type_e;
 
 /**
@@ -426,6 +433,24 @@ int tethering_get_network_interface_name(tethering_h tethering, tethering_type_e
 int tethering_get_ip_address(tethering_h tethering, tethering_type_e type, tethering_address_family_e address_family, char **ip_address);
 
 /**
+ * @brief Sets the local IP address.
+ * @since_tizen 6.5
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/tethering.admin
+ * @param[in]  tethering  The tethering handle
+ * @param[in]  type  The tethering type
+ * @param[in]  address_family  The address family of IP address (currently, #TETHERING_ADDRESS_FAMILY_IPV4 is only supported)
+ * @param[out]  ip_address  The local IP address
+ * @return 0 on success, otherwise negative error value
+ * @retval  #TETHERING_ERROR_NONE  Successful
+ * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
+ * @see  tethering_enable()
+ */
+int tethering_set_ip_address(tethering_h tethering, tethering_type_e type, tethering_address_family_e address_family, const char *ip_address);
+
+/**
  * @brief Gets the Gateway address.
  * @since_tizen 2.3
  * @privlevel platform
@@ -507,6 +532,19 @@ int tethering_get_data_usage(tethering_h tethering, tethering_data_usage_cb call
 int tethering_foreach_connected_clients(tethering_h tethering, tethering_type_e type, tethering_connected_client_cb callback, void *user_data);
 
 /**
+ * @brief Gets the clients which are connected.
+ * @since_tizen 6.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/tethering.admin
+ * @param[in]  tethering  The tethering handle
+ * @param[in]  type  The tethering type
+ * @retval  #TETHERING_ERROR_NONE  Successful
+ * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
+ */
+int tethering_is_dualband_supported(tethering_h tethering, tethering_type_e type, bool *supported);
+
+/**
  * @brief Registers the callback function, which is called when tethering is enabled.
  * @since_tizen 2.3
  * @privlevel platform
@@ -913,7 +951,7 @@ int tethering_wifi_remove_allowed_mac_list(tethering_h tethering, const char *ma
 int tethering_wifi_get_allowed_mac_list(tethering_h tethering, void **allowed_mac_list);
 
 /**
- * @brief Adds the mac-address to the blocked(black list) client list.
+ * @brief Adds the mac-address to the blocked client list.
  * @details AP can disallow the client by adding clients mac-address to the blocked list.
  * @since_tizen 3.0
  * @privlevel platform
@@ -930,7 +968,7 @@ int tethering_wifi_get_allowed_mac_list(tethering_h tethering, void **allowed_ma
 int tethering_wifi_add_blocked_mac_list(tethering_h tethering, const char *mac);
 
 /**
- * @brief Removes the mac-address from the blocked(black list) client list.
+ * @brief Removes the mac-address from the blocked client list.
  * @details Removes the mac-address from the blocked client list.
  * @since_tizen 3.0
  * @privlevel platform
@@ -1384,6 +1422,46 @@ int tethering_wifi_push_wps_button(tethering_h tethering);
  */
 int tethering_wifi_set_wps_pin(tethering_h tethering, const char *wps_pin);
 
+/**
+ * @brief Checks whether wifi-sharing is supported or not.
+ * @since_tizen 6.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/tethering.admin
+ * @param[in]  tethering  The tethering handle
+ * @param[out] supported @c true if wifi-sharing is supported, \n @c false if wifi-sharing is unsupported
+ * @return  0 on success, otherwise a negative error value
+ * @retval  #TETHERING_ERROR_NONE  Successful
+ * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval  #TETHERING_ERROR_PERMISSION_DENIED  Permission denied
+ * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
+ */
+int tethering_wifi_is_sharing_supported(tethering_h tethering, bool *supported);
+
+/**
+ * @brief Sets the wifi-sharing flag.
+ * @since_tizen 6.0
+ * @privlevel platform
+ * @param[in] tethering  The tethering handle
+ * @param[in] sharing @c true if wifi-sharing is set, \n @c false if wifi-sharing is unset
+ * @return  0 on success, otherwise a negative error value
+ * @retval  #TETHERING_ERROR_NONE  Successful
+ * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval  #TETHERING_ERROR_NOT_SUPPORTED  API is not supported
+ */
+int tethering_wifi_set_sharing(tethering_h tethering, bool sharing);
+
+/**
+ * @brief Gets the wifi-sharing flag.
+ * @since_tizen 6.0
+ * @privlevel platform
+ * @param[in] tethering  The tethering handle
+ * @param[out] sharing @c true if wifi-sharing is set, \n @c otherwise false.
+ * @return  0 on success, otherwise a negative error value
+ * @retval  #TETHERING_ERROR_NONE  Successful
+ * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval  #TETHERING_ERROR_NOT_SUPPORTED  API is not supported
+ */
+int tethering_wifi_get_sharing(tethering_h tethering, bool *sharing);
 
 /**
  * @}
@@ -1440,6 +1518,22 @@ int tethering_client_destroy(tethering_client_h client);
 int tethering_client_get_tethering_type(tethering_client_h client, tethering_type_e *type);
 
 /**
+ * @brief  Gets the tethering band of client.
+ * @since_tizen 6.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/tethering.admin
+ * @param[in]  client  The handle of client
+ * @param[out]  band  The band of tethering
+ * @return  0 on success, otherwise a negative error value.
+ * @retval  #TETHERING_ERROR_NONE  Successful
+ * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @see  tethering_usb_get_connected_client()
+ * @see  tethering_connection_state_changed_cb()
+ */
+int tethering_client_get_tethering_band(tethering_client_h client, tethering_band_e *band);
+
+
+/**
  * @brief Gets the name of a client.
  * @since_tizen 2.3
  * @privlevel platform
@@ -1506,6 +1600,7 @@ int tethering_client_get_mac_address(tethering_client_h client, char **mac_addre
  */
 int tethering_client_get_time(tethering_client_h client, time_t *timestamp);
 
+
 /**
  * @}
  */