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
*/
-typedef enum
-{
+typedef enum {
TETHERING_DISABLED_BY_USB_DISCONNECTION = 0, /**< Disabled due to usb disconnection */
TETHERING_DISABLED_BY_FLIGHT_MODE, /**< Disabled due to flight mode */
TETHERING_DISABLED_BY_LOW_BATTERY, /**< Disabled due to low battery */
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;
/**
*/
typedef enum {
TETHERING_ADDRESS_FAMILY_IPV4 = 0, /**< IPV4 Address type */
+ TETHERING_ADDRESS_FAMILY_IPV6 = 1, /**< IPV6 Address type (Since 4.0) */
} tethering_address_family_e;
/**
int tethering_disable(tethering_h tethering, tethering_type_e type);
/**
+ * @brief Enables the IPv6 tethering, asynchronously.
+ * @since_tizen 4.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/tethering.admin
+ * @remarks It supports Wi-Fi tethering and BT tethering only.
+ * @param[in] tethering The tethering handle
+ * @param[in] type The tethering type
+ * @return 0 on success, otherwise negative error value
+ * @retval #TETHERING_ERROR_NONE Successful
+ * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
+ * @post tethering_enabled_cb() will be invoked.
+ * @see tethering_is_enabled()
+ * @see tethering_ipv6_disable()
+ */
+int tethering_ipv6_enable(tethering_h tethering, tethering_type_e type);
+
+/**
+ * @brief Disables the IPv6 tethering, asynchronously.
+ * @since_tizen 4.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/tethering.admin
+ * @remarks It supports Wi-Fi tethering and BT tethering only.
+ * @param[in] tethering The tethering handle
+ * @param[in] type The tethering type
+ * @return 0 on success, otherwise negative error value
+ * @retval #TETHERING_ERROR_NONE Successful
+ * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
+ * @post tethering_disabled_cb() will be invoked.
+ * @see tethering_is_enabled()
+ * @see tethering_ipv6_enable()
+ */
+int tethering_ipv6_disable(tethering_h tethering, tethering_type_e type);
+
+/**
* @brief Checks whether the tethering is enabled or not.
* @since_tizen 2.3
* @privlevel platform
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
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
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
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
*/
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);
/**
* @}
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
*/
int tethering_client_get_time(tethering_client_h client, time_t *timestamp);
+
/**
* @}
*/