2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_NETWORK_TETHERING_H__
18 #define __TIZEN_NETWORK_TETHERING_H__
32 * @addtogroup CAPI_NETWORK_TETHERING_MANAGER_MODULE
37 * @brief The tethering handle.
40 typedef void * tethering_h;
43 * @brief Enumeration for the tethering.
47 TETHERING_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
48 TETHERING_ERROR_NOT_PERMITTED = TIZEN_ERROR_NOT_PERMITTED, /**< Operation not permitted */
49 TETHERING_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
50 TETHERING_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
51 TETHERING_ERROR_RESOURCE_BUSY = TIZEN_ERROR_RESOURCE_BUSY, /**< Resource busy */
52 TETHERING_ERROR_NOT_ENABLED = TIZEN_ERROR_TETHERING | 0x0501, /**< Not enabled */
53 TETHERING_ERROR_OPERATION_FAILED = TIZEN_ERROR_TETHERING | 0x0502, /**< Operation failed */
54 TETHERING_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Invalid operation */
55 TETHERING_ERROR_NOT_SUPPORT_API = TIZEN_ERROR_NOT_SUPPORTED, /**< API is not supported */
56 TETHERING_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
60 * @brief Enumeration for the type of tethering.
64 TETHERING_TYPE_ALL = 0, /**< All type except for TETHERING_TYPE_RESERVED */
65 TETHERING_TYPE_USB, /**< USB type */
66 TETHERING_TYPE_WIFI, /**< Wi-Fi type */
67 TETHERING_TYPE_BT, /**< BT type */
68 TETHERING_TYPE_RESERVED, /**< Reserved type */
72 * @brief Enumeration for the cause of disabling the tethering.
77 TETHERING_DISABLED_BY_USB_DISCONNECTION = 0, /**< Disabled due to usb disconnection */
78 TETHERING_DISABLED_BY_FLIGHT_MODE, /**< Disabled due to flight mode */
79 TETHERING_DISABLED_BY_LOW_BATTERY, /**< Disabled due to low battery */
80 TETHERING_DISABLED_BY_NETWORK_CLOSE, /**< Disabled due to pdp network close */
81 TETHERING_DISABLED_BY_TIMEOUT, /**< Disabled due to timeout */
82 TETHERING_DISABLED_BY_OTHERS, /**< Disabled by other apps */
83 TETHERING_DISABLED_BY_REQUEST, /**< Disabled by your request */
84 TETHERING_DISABLED_BY_WIFI_ON, /**< Disabled due to Wi-Fi on */
85 TETHERING_DISABLED_BY_BT_OFF, /**< Disabled due to Bluetooth off */
86 } tethering_disabled_cause_e;
94 * @addtogroup CAPI_NETWORK_TETHERING_WIFI_MODULE
99 * @brief Enumeration for the Wi-Fi security.
103 TETHERING_WIFI_SECURITY_TYPE_NONE = 0, /**< No Security type */
104 TETHERING_WIFI_SECURITY_TYPE_WPA2_PSK, /**< WPA2_PSK */
105 } tethering_wifi_security_type_e;
108 * @brief Enumeration for the Wi-Fi mode
112 TETHERING_WIFI_MODE_TYPE_B = 0, /**< mode b */
113 TETHERING_WIFI_MODE_TYPE_G, /**< mode g */
114 TETHERING_WIFI_MODE_TYPE_A, /**< mode a */
115 TETHERING_WIFI_MODE_TYPE_AD, /**< mode ad */
116 } tethering_wifi_mode_type_e;
124 * @addtogroup CAPI_NETWORK_TETHERING_CLIENT_MODULE
129 * @brief The tethering client handle.
132 typedef void * tethering_client_h;
135 * @brief Enumeration for address family.
139 TETHERING_ADDRESS_FAMILY_IPV4 = 0, /**< IPV4 Address type */
140 } tethering_address_family_e;
148 * @addtogroup CAPI_NETWORK_TETHERING_MANAGER_MODULE
153 * @brief Called when the tethering is enabled.
155 * @param[in] result The result of enabling the tethering
156 * @param[in] type The tethering type
157 * @param[in] is_requested Indicates whether this change is requested
158 * @param[in] user_data The user data passed from tethering_set_enabled_cb()
159 * @pre If you register callback function using tethering_set_enabled_cb(), this will be invoked when the tethering is enabled.
160 * @see tethering_enable()
161 * @see tethering_unset_enabled_cb()
163 typedef void (*tethering_enabled_cb)(tethering_error_e result, tethering_type_e type, bool is_requested, void *user_data);
166 * @brief Called when the tethering is disabled.
168 * @param[in] result The result of disabling the tethering
169 * @param[in] type The tethering type
170 * @param[in] cause The cause of disabling
171 * @param[in] user_data The user data passed from tethering_set_disabled_cb()
172 * @pre If you register callback function using tethering_set_disabled_cb(), this will be invoked when the tethering is disabled.
173 * @see tethering_set_disabled_cb()
174 * @see tethering_unset_disabled_cb()
176 typedef void (*tethering_disabled_cb)(tethering_error_e result, tethering_type_e type, tethering_disabled_cause_e cause, void *user_data);
179 * @brief Called when the connection state is changed.
181 * @remarks @a client is valid only in this function. In order to use it outside this function, a user must copy the client with tethering_client_clone().
182 * @param[in] client The client of which connection state is changed
183 * @param[in] opened @c true when connection is opened, otherwise false
184 * @param[in] user_data The user data passed from tethering_set_connection_state_changed_cb()
185 * @pre If you register callback function using tethering_set_connection_state_changed_cb(), this will be invoked when the connection state is changed.
186 * @see tethering_set_connection_state_changed_cb()
187 * @see tethering_unset_connection_state_changed_cb()
189 typedef void (*tethering_connection_state_changed_cb)(tethering_client_h client, bool opened, void *user_data);
192 * @brief Called when you get the connected client repeatedly.
194 * @remarks @a client is valid only in this function. In order to use the client outside this function, a user must copy the client with tethering_client_clone().
195 * @param[in] client The connected client
196 * @param[in] user_data The user data passed from the request function
197 * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
198 * @pre tethering_foreach_connected_clients() will invoke this callback.
199 * @see tethering_foreach_connected_clients()
201 typedef bool(*tethering_connected_client_cb)(tethering_client_h client, void *user_data);
204 * @brief Called when you get the data usage.
206 * @param[in] result The result of getting the data usage
207 * @param[in] received_data The usage of received data
208 * @param[in] sent_data The usage of sent data
209 * @param[in] user_data The user data passed from the request function
210 * @pre tethering_get_data_usage() will invoked this callback.
212 typedef void (*tethering_data_usage_cb)(tethering_error_e result, unsigned long long received_data, unsigned long long sent_data, void *user_data);
215 * @brief Called when the security type of Wi-Fi tethering is changed.
217 * @param[in] changed_type The changed security type of Wi-Fi tethering
218 * @param[in] user_data The user data passed from the register function
219 * @see tethering_wifi_set_security_type_changed_cb()
220 * @see tethering_wifi_unset_security_type_changed_cb()
222 typedef void (*tethering_wifi_security_type_changed_cb)(tethering_wifi_security_type_e changed_type, void *user_data);
225 * @brief Called when the visibility of SSID is changed.
227 * @param[in] changed_visible The changed visibility of SSID
228 * @param[in] user_data The user data passed from the register function
229 * @see tethering_wifi_set_ssid_visibility_changed_cb()
230 * @see tethering_wifi_unset_ssid_visibility_changed_cb()
232 typedef void (*tethering_wifi_ssid_visibility_changed_cb)(bool changed_visible, void *user_data);
235 * @brief Called when the passphrase of Wi-Fi tethering is changed.
237 * @param[in] user_data The user data passed from the register function
238 * @see tethering_wifi_set_passphrase_changed_cb()
239 * @see tethering_wifi_unset_passphrase_changed_cb()
241 typedef void (*tethering_wifi_passphrase_changed_cb)(void *user_data);
244 * @brief Called when the settings are reloaded.
246 * @param[in] result The result of reloading the settings
247 * @param[in] user_data The user data passed from the request function
248 * @pre tethering_wifi_reload_settings() will invoke this callback.
250 typedef void (*tethering_wifi_settings_reloaded_cb)(tethering_error_e result, void *user_data);
253 * @brief Called when Wi-Fi AP settings are reloaded.
255 * @param[in] result The result of reloading the settings
256 * @param[in] user_data The user data passed from the request function
257 * @pre tethering_wifi_ap_reload_settings() will invoke this callback.
259 typedef void (*tethering_wifi_ap_settings_reloaded_cb)(tethering_error_e result, void *user_data);
262 * @brief Creates the handle for tethering.
264 * @privlevel platform
265 * @privilege %http://tizen.org/privilege/tethering.admin
266 * @remarks The @a tethering must be released using tethering_destroy().
267 * @param[out] tethering A handle of a new mobile ap handle on success
268 * @return 0 on success, otherwise a negative error value
269 * @retval #TETHERING_ERROR_NONE Successful
270 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
271 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
272 * @retval #TETHERING_ERROR_NOT_SUPPORT_API API is not supported
273 * @see tethering_destroy()
275 int tethering_create(tethering_h *tethering);
278 * @brief Destroys the handle for tethering.
280 * @privlevel platform
281 * @privilege %http://tizen.org/privilege/tethering.admin
282 * @param[in] tethering The tethering handle
283 * @return 0 on success, otherwise a negative error value
284 * @retval #TETHERING_ERROR_NONE Successful
285 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
286 * @see tethering_create()
288 int tethering_destroy(tethering_h tethering);
291 * @brief Enables the tethering, asynchronously.
293 * @privlevel platform
294 * @privilege %http://tizen.org/privilege/tethering.admin
295 * @param[in] tethering The tethering handle
296 * @param[in] type The tethering type
297 * @return 0 on success, otherwise negative error value
298 * @retval #TETHERING_ERROR_NONE Successful
299 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
300 * @post tethering_enabled_cb() will be invoked.
301 * @see tethering_is_enabled()
302 * @see tethering_disable()
304 int tethering_enable(tethering_h tethering, tethering_type_e type);
307 * @brief Disables the tethering, asynchronously.
309 * @privlevel platform
310 * @privilege %http://tizen.org/privilege/tethering.admin
311 * @param[in] tethering The tethering handle
312 * @param[in] type The tethering type
313 * @return 0 on success, otherwise negative error value
314 * @retval #TETHERING_ERROR_NONE Successful
315 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
316 * @post tethering_disabled_cb() will be invoked.
317 * @see tethering_is_enabled()
318 * @see tethering_enable()
320 int tethering_disable(tethering_h tethering, tethering_type_e type);
323 * @brief Checks whether the tethering is enabled or not.
325 * @privlevel platform
326 * @privilege %http://tizen.org/privilege/tethering.admin
327 * @param[in] tethering The tethering handle
328 * @param[in] type The tethering type
329 * @return @c true if tethering is enabled, \n @c false if tethering is disabled
331 bool tethering_is_enabled(tethering_h tethering, tethering_type_e type);
334 * @brief Gets the MAC address of local device as "FC:A1:3E:D6:B1:B1".
336 * @privlevel platform
337 * @privilege %http://tizen.org/privilege/tethering.admin
338 * @remarks @a mac_address must be released using free().
339 * @param[in] tethering The tethering handle
340 * @param[in] type The tethering type
341 * @param[out] mac_address The MAC address
342 * @return 0 on success, otherwise a negative error value
343 * @retval #TETHERING_ERROR_NONE Successful
344 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
345 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
346 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
347 * @retval #TETHERING_ERROR_NOT_ENABLED Not enabled
348 * @pre The tethering must be enabled.
349 * @see tethering_is_enabled()
350 * @see tethering_enable()
352 int tethering_get_mac_address(tethering_h tethering, tethering_type_e type, char **mac_address);
355 * @brief Gets the name of network interface (e.g. usb0).
357 * @privlevel platform
358 * @privilege %http://tizen.org/privilege/tethering.admin
359 * @remarks @a interface_name must be released using free().
360 * @param[in] tethering The tethering handle
361 * @param[in] type The tethering type
362 * @param[out] interface_name The name of the network interface
363 * @return 0 on success, otherwise negative error value
364 * @retval #TETHERING_ERROR_NONE Successful
365 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
366 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
367 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
368 * @retval #TETHERING_ERROR_NOT_ENABLED Not enabled
369 * @pre The tethering must be enabled.
370 * @see tethering_is_enabled()
371 * @see tethering_enable()
373 int tethering_get_network_interface_name(tethering_h tethering, tethering_type_e type, char **interface_name);
376 * @brief Gets the local IP address.
378 * @privlevel platform
379 * @privilege %http://tizen.org/privilege/tethering.admin
380 * @remarks @a ip_address must be released using free().
381 * @param[in] tethering The tethering handle
382 * @param[in] type The tethering type
383 * @param[in] address_family The address family of IP address (currently, #TETHERING_ADDRESS_FAMILY_IPV4 is only supported)
384 * @param[out] ip_address The local IP address
385 * @return 0 on success, otherwise negative error value
386 * @retval #TETHERING_ERROR_NONE Successful
387 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
388 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
389 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
390 * @retval #TETHERING_ERROR_NOT_ENABLED Not enabled
391 * @pre The tethering must be enabled.
392 * @see tethering_is_enabled()
393 * @see tethering_enable()
395 int tethering_get_ip_address(tethering_h tethering, tethering_type_e type, tethering_address_family_e address_family, char **ip_address);
398 * @brief Gets the Gateway address.
400 * @privlevel platform
401 * @privilege %http://tizen.org/privilege/tethering.admin
402 * @remarks @a gateway_address must be released using free().
403 * @param[in] tethering The tethering handle
404 * @param[in] type The tethering type
405 * @param[in] address_family The address family of IP address (currently, #TETHERING_ADDRESS_FAMILY_IPV4 is only supported)
406 * @param[out] gateway_address The local IP address
407 * @return 0 on success, otherwise negative error value
408 * @retval #TETHERING_ERROR_NONE Successful
409 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
410 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
411 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
412 * @retval #TETHERING_ERROR_NOT_ENABLED Not enabled
413 * @pre The tethering must be enabled.
414 * @see tethering_is_enabled()
415 * @see tethering_enable()
417 int tethering_get_gateway_address(tethering_h tethering, tethering_type_e type, tethering_address_family_e address_family, char **gateway_address);
420 * @brief Gets the Subnet Mask.
422 * @privlevel platform
423 * @privilege %http://tizen.org/privilege/tethering.admin
424 * @remarks @a subnet_mask must be released using free().
425 * @param[in] tethering The tethering handle
426 * @param[in] type The tethering type
427 * @param[in] address_family The address family of IP address (currently, #TETHERING_ADDRESS_FAMILY_IPV4 is only supported)
428 * @param[out] subnet_mask The local IP address
429 * @return 0 on success, otherwise negative error value
430 * @retval #TETHERING_ERROR_NONE Successful
431 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
432 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
433 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
434 * @retval #TETHERING_ERROR_NOT_ENABLED Not enabled
435 * @pre The tethering must be enabled.
436 * @see tethering_is_enabled()
437 * @see tethering_enable()
439 int tethering_get_subnet_mask(tethering_h tethering, tethering_type_e type, tethering_address_family_e address_family, char **subnet_mask);
442 * @brief Gets the data usage.
444 * @privlevel platform
445 * @privilege %http://tizen.org/privilege/tethering.admin
446 * @param[in] tethering The tethering handle
447 * @param[out] usage The data usage
448 * @return 0 on success, otherwise negative error value
449 * @retval #TETHERING_ERROR_NONE Successful
450 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
451 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
452 * @retval #TETHERING_ERROR_NOT_ENABLED Not enabled
453 * @pre The tethering must be enabled.
454 * @see tethering_is_enabled()
455 * @see tethering_enable()
457 int tethering_get_data_usage(tethering_h tethering, tethering_data_usage_cb callback, void *user_data);
460 * @brief Gets the clients which are connected.
462 * @privlevel platform
463 * @privilege %http://tizen.org/privilege/tethering.admin
464 * @param[in] tethering The tethering handle
465 * @param[in] type The tethering type
466 * @param[in] callback The callback function to invoke
467 * @param[in] user_data The user data to be passed to the callback function
468 * @retval #TETHERING_ERROR_NONE Successful
469 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
470 * @retval #TETHERING_ERROR_NOT_ENABLED Not enabled
471 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
472 * @pre The tethering must be enabled.
473 * @see tethering_is_enabled()
474 * @see tethering_enable()
476 int tethering_foreach_connected_clients(tethering_h tethering, tethering_type_e type, tethering_connected_client_cb callback, void *user_data);
479 * @brief Registers the callback function, which is called when tethering is enabled.
481 * @privlevel platform
482 * @privilege %http://tizen.org/privilege/tethering.admin
483 * @param[in] tethering The tethering handle
484 * @param[in] type The tethering type
485 * @param[in] callback The callback function to invoke
486 * @param[in] user_data The user data to be passed to the callback function
487 * @retval #TETHERING_ERROR_NONE Successful
488 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
489 * @see tethering_unset_enabled_cb()
491 int tethering_set_enabled_cb(tethering_h tethering, tethering_type_e type, tethering_enabled_cb callback, void *user_data);
494 * @brief Unregisters the callback function, which is called when tethering is enabled.
496 * @privlevel platform
497 * @privilege %http://tizen.org/privilege/tethering.admin
498 * @param[in] tethering The tethering handle
499 * @param[in] type The tethering type
500 * @retval #TETHERING_ERROR_NONE Successful
501 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
502 * @see tethering_set_enabled_cb()
504 int tethering_unset_enabled_cb(tethering_h tethering, tethering_type_e type);
507 * @brief Registers the callback function called when tethering is disabled.
509 * @privlevel platform
510 * @privilege %http://tizen.org/privilege/tethering.admin
511 * @param[in] tethering The tethering handle
512 * @param[in] type The tethering type
513 * @param[in] callback The callback function to invoke
514 * @param[in] user_data The user data to be passed to the callback function
515 * @retval #TETHERING_ERROR_NONE Successful
516 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
517 * @see tethering_unset_disabled_cb()
519 int tethering_set_disabled_cb(tethering_h tethering, tethering_type_e type, tethering_disabled_cb callback, void *user_data);
522 * @brief Unregisters the callback function, which is called when tethering is disabled.
524 * @privlevel platform
525 * @privilege %http://tizen.org/privilege/tethering.admin
526 * @param[in] tethering The tethering handle
527 * @param[in] type The tethering type
528 * @retval #TETHERING_ERROR_NONE Successful
529 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
530 * @see tethering_set_disabled_cb()
532 int tethering_unset_disabled_cb(tethering_h tethering, tethering_type_e type);
535 * @brief Registers the callback function, which is called when the state of connection is changed.
537 * @privlevel platform
538 * @privilege %http://tizen.org/privilege/tethering.admin
539 * @param[in] tethering The tethering handle
540 * @param[in] type The tethering type
541 * @param[in] callback The callback function to invoke
542 * @param[in] user_data The user data to be passed to the callback function
543 * @retval #TETHERING_ERROR_NONE Successful
544 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
545 * @see tethering_unset_connection_state_changed_cb_cb()
547 int tethering_set_connection_state_changed_cb(tethering_h tethering, tethering_type_e type, tethering_connection_state_changed_cb callback, void *user_data);
550 * @brief Unregisters the callback function, which is called when the state of connection is changed.
552 * @privlevel platform
553 * @privilege %http://tizen.org/privilege/tethering.admin
554 * @param[in] tethering The tethering handle
555 * @param[in] type The tethering type
556 * @retval #TETHERING_ERROR_NONE Successful
557 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
558 * @see tethering_set_connection_state_changed_cb()
560 int tethering_unset_connection_state_changed_cb(tethering_h tethering, tethering_type_e type);
563 * @brief Registers the callback function, which is called when the security type of Wi-Fi tethering is changed.
565 * @privlevel platform
566 * @privilege %http://tizen.org/privilege/tethering.admin
567 * @param[in] tethering The tethering handle
568 * @param[in] callback The callback function to invoke
569 * @param[in] user_data The user data to be passed to the callback function
570 * @retval #TETHERING_ERROR_NONE Successful
571 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
572 * @see tethering_wifi_unset_security_type_changed_cb()
574 int tethering_wifi_set_security_type_changed_cb(tethering_h tethering, tethering_wifi_security_type_changed_cb callback, void *user_data);
577 * @brief Unregisters the callback function, which is called when the security type of Wi-Fi tethering is changed.
579 * @privlevel platform
580 * @privilege %http://tizen.org/privilege/tethering.admin
581 * @param[in] tethering The tethering handle
582 * @param[in] type The tethering type
583 * @retval #TETHERING_ERROR_NONE Successful
584 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
585 * @see tethering_wifi_set_security_type_changed_cb()
587 int tethering_wifi_unset_security_type_changed_cb(tethering_h tethering);
590 * @brief Registers the callback function , which iscalled when the visibility of SSID is changed.
592 * @privlevel platform
593 * @privilege %http://tizen.org/privilege/tethering.admin
594 * @param[in] tethering The tethering handle
595 * @param[in] callback The callback function to invoke
596 * @param[in] user_data The user data to be passed to the callback function
597 * @retval #TETHERING_ERROR_NONE Successful
598 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
599 * @see tethering_wifi_unset_ssid_visibility_changed_cb_cb()
601 int tethering_wifi_set_ssid_visibility_changed_cb(tethering_h tethering, tethering_wifi_ssid_visibility_changed_cb callback, void *user_data);
604 * @brief Unregisters the callback function, which is called when the visibility of SSID is changed.
606 * @privlevel platform
607 * @privilege %http://tizen.org/privilege/tethering.admin
608 * @param[in] tethering The tethering handle
609 * @retval #TETHERING_ERROR_NONE Successful
610 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
611 * @see tethering_wifi_set_ssid_visibility_changed_cb()
613 int tethering_wifi_unset_ssid_visibility_changed_cb(tethering_h tethering);
616 * @brief Registers the callback function, which is called when the passphrase of Wi-Fi tethering is changed.
618 * @privlevel platform
619 * @privilege %http://tizen.org/privilege/tethering.admin
620 * @param[in] tethering The tethering handle
621 * @param[in] callback The callback function to invoke
622 * @param[in] user_data The user data to be passed to the callback function
623 * @retval #TETHERING_ERROR_NONE Successful
624 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
625 * @see tethering_wifi_unset_passphrase_changed_cb()
627 int tethering_wifi_set_passphrase_changed_cb(tethering_h tethering, tethering_wifi_passphrase_changed_cb callback, void *user_data);
630 * @brief Unregisters the callback function, which is called when the passphrase of Wi-Fi tethering is changed.
632 * @privlevel platform
633 * @privilege %http://tizen.org/privilege/tethering.admin
634 * @param[in] tethering The tethering handle
635 * @retval #TETHERING_ERROR_NONE Successful
636 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
637 * @see tethering_wifi_set_passphrase_changed_cb()
639 int tethering_wifi_unset_passphrase_changed_cb(tethering_h tethering);
647 * @addtogroup CAPI_NETWORK_TETHERING_WIFI_MODULE
652 * @brief Sets the security type of Wi-Fi tethering.
654 * @privlevel platform
655 * @privilege %http://tizen.org/privilege/tethering.admin
656 * @remarks This change is applied next time Wi-Fi tethering is enabled.
657 * @param[in] tethering The tethering handle
658 * @param[in] type The security type
659 * @return 0 on success, otherwise negative error value
660 * @retval #TETHERING_ERROR_NONE Successful
661 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
662 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
663 * @see tethering_wifi_get_security_type()
665 int tethering_wifi_set_security_type(tethering_h tethering, tethering_wifi_security_type_e type);
668 * @brief Gets the security type of Wi-Fi tethering.
670 * @privlevel platform
671 * @privilege %http://tizen.org/privilege/tethering.admin
672 * @param[in] tethering The tethering handle
673 * @param[out] type The security type
674 * @return 0 on success, otherwise negative error value
675 * @retval #TETHERING_ERROR_NONE Successful
676 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
677 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
678 * @see tethering_wifi_set_security_type()
680 int tethering_wifi_get_security_type(tethering_h tethering, tethering_wifi_security_type_e *type);
683 * @brief Sets the SSID (service set identifier).
684 * @details The SSID cannot exceed 32 bytes. If SSID is not set, device name is used as SSID.
686 * @privlevel platform
687 * @privilege %http://tizen.org/privilege/tethering.admin
688 * @remarks This change is applied next time Wi-Fi tethering is enabled with same @a tethering handle.
689 * @param[in] tethering The tethering handle
690 * @param[in] ssid The SSID
691 * @return 0 on success, otherwise negative error value
692 * @retval #TETHERING_ERROR_NONE Successful
693 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
694 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
696 int tethering_wifi_set_ssid(tethering_h tethering, const char *ssid);
699 * @brief Gets the SSID (service set identifier).
701 * @privlevel platform
702 * @privilege %http://tizen.org/privilege/tethering.admin
703 * @remarks @a ssid must be released using free().
704 * @param[in] tethering The tethering handle
705 * @param[out] ssid The SSID
706 * @return 0 on success, otherwise negative error value
707 * @retval #TETHERING_ERROR_NONE Successful
708 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
709 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
710 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
712 int tethering_wifi_get_ssid(tethering_h tethering, char **ssid);
715 * @brief Sets the visibility of SSID (service set identifier).
716 * @details If the visibility is set to invisible, then the SSID of this device is hidden and Wi-Fi scan will not find the device.
718 * @privlevel platform
719 * @privilege %http://tizen.org/privilege/tethering.admin
720 * @remarks This change is applied next time Wi-Fi tethering is enabled.
721 * @param[in] tethering The tethering handle
722 * @param[in] visible The visibility of SSID: (@c true = visible, @c false = invisible)
723 * @return 0 on success, otherwise negative error value
724 * @retval #TETHERING_ERROR_NONE Successful
725 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
726 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
727 * @see tethering_wifi_get_ssid_visibility()
729 int tethering_wifi_set_ssid_visibility(tethering_h tethering, bool visible);
732 * @brief Gets the visibility of SSID (service set identifier).
733 * @details If the visibility is set to invisible, then the SSID of this device is hidden and Wi-Fi scan will not find the device.
735 * @privlevel platform
736 * @privilege %http://tizen.org/privilege/tethering.admin
737 * @param[in] tethering The tethering handle
738 * @param[out] visible The visibility of SSID: (@c true = visible, @c false = invisible)
739 * @return 0 on success, otherwise negative error value
740 * @retval #TETHERING_ERROR_NONE Successful
741 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
742 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
743 * @see tethering_wifi_set_ssid_visibility()
745 int tethering_wifi_get_ssid_visibility(tethering_h tethering, bool *visible);
748 * @brief Sets the passphrase.
750 * @privlevel platform
751 * @privilege %http://tizen.org/privilege/tethering.admin
752 * @remarks This change is applied next time Wi-Fi tethering is enabled.
753 * @param[in] tethering The tethering handle
754 * @param[in] passphrase The passphrase
755 * @return 0 on success, otherwise negative error value
756 * @retval #TETHERING_ERROR_NONE Successful
757 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
758 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
759 * @see tethering_wifi_get_passphrase()
761 int tethering_wifi_set_passphrase(tethering_h tethering, const char *passphrase);
764 * @brief Gets the passphrase.
766 * @privlevel platform
767 * @privilege %http://tizen.org/privilege/tethering.admin
768 * @remarks @a passphrase must be released using free().
769 * @param[in] tethering The tethering handle
770 * @param[out] passphrase The passphrase
771 * @return 0 on success, otherwise negative error value
772 * @retval #TETHERING_ERROR_NONE Successful
773 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
774 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
775 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
776 * @see tethering_wifi_set_passphrase()
778 int tethering_wifi_get_passphrase(tethering_h tethering, char **passphrase);
781 * @brief Reloads the settings (SSID / Passphrase / Security type / SSID visibility).
783 * @privlevel platform
784 * @privilege %http://tizen.org/privilege/tethering.admin
785 * @remarks Connected devices via Wi-Fi tethering or MobileAP will be disconnected when the settings are reloaded.
786 * @param[in] tethering The tethering handle
787 * @param[in] callback The callback function to invoke
788 * @param[in] user_data The user data to be passed to the callback function
789 * @return 0 on success, otherwise negative error value
790 * @retval #TETHERING_ERROR_NONE Successful
791 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
792 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
794 int tethering_wifi_reload_settings(tethering_h tethering, tethering_wifi_settings_reloaded_cb callback, void *user_data);
797 * @brief Gets the mac_filter for Wi-Fi Tethering.
798 * @details If you set the mac_filter to enable, then the device can be allowed/blocked based on mac-address.
799 * By default mac_filter is set to false.
801 * @privlevel platform
802 * @privilege %http://tizen.org/privilege/tethering.admin
803 * @param[in] tethering The handle of tethering
804 * @param[out] mac_filter The mac filter: (@c true = enable, @c false = disable)
805 * @return 0 on success, otherwise negative error value.
806 * @retval #TETHERING_ERROR_NONE Successful
807 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
808 * @retval #TETHERING_ERROR_NOT_SUPPORTED API is not supported
809 * @retval #TETHERING_ERROR_PERMISSION_DENIED Permission Denied
810 * @see tethering_mobileap_set_mac_filter()
812 int tethering_wifi_get_mac_filter(tethering_h tethering, bool *mac_filter);
815 * @brief Sets the mac-filter for Wi-Fi Tethering.
816 * @details If you set the mac_filter to enable, then the device can be allowed/blocked based on mac-address.
817 * By default mac_filter is set to @c false.
819 * @privlevel platform
820 * @privilege %http://tizen.org/privilege/tethering.admin
821 * @remarks This change is applied next time Wi-Fi tethering is enabled.
822 * @param[in] tethering The tethering handle
823 * @param[in] mac_filter The mac filter: (@c true = enable, @c false = disable)
824 * @return 0 on success, otherwise negative error value
825 * @retval #TETHERING_ERROR_NONE Successful
826 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
827 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
828 * @retval #TETHERING_ERROR_NOT_SUPPORTED API is not supported
829 * @retval #TETHERING_ERROR_PERMISSION_DENIED Permission Denied
830 * @see tethering_mobileap_get_mac_filter()
832 int tethering_wifi_set_mac_filter(tethering_h tethering, bool mac_filter);
835 * @brief Adds the mac-address to the allowed client list.
836 * @details AP can allow the client by adding clients mac-address to the allowed list.
838 * @privlevel platform
839 * @privilege %http://tizen.org/privilege/tethering.admin
840 * @param[in] tethering The handle of tethering
841 * @param[in] mac The mac address
842 * @return 0 on success, otherwise negative error value.
843 * @retval #TETHERING_ERROR_NONE Successful
844 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
845 * @retval #TETHERING_ERROR_NOT_SUPPORTED API is not supported
846 * @retval #TETHERING_ERROR_PERMISSION_DENIED Permission Denied
847 * @see tethering_mobileap_set_mac_filter()
849 int tethering_wifi_add_allowed_mac_list(tethering_h tethering, const char *mac);
852 * @brief Removes the mac-address from the allowed client list.
853 * @details Removes the mac-address from the allowed client list.
855 * @privlevel platform
856 * @privilege %http://tizen.org/privilege/tethering.admin
857 * @param[in] tethering The handle of tethering
858 * @param[in] mac The mac address
859 * @return 0 on success, otherwise negative error value.
860 * @retval #TETHERING_ERROR_NONE Successful
861 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
862 * @retval #TETHERING_ERROR_NOT_SUPPORTED API is not supported
863 * @retval #TETHERING_ERROR_PERMISSION_DENIED Permission Denied
864 * @see tethering_mobileap_set_mac_filter()
866 int tethering_wifi_remove_allowed_mac_list(tethering_h tethering, const char *mac);
868 * @brief Gets the mac-addresses from the allowed client list.
869 * @details Gets the mac-addresses from the allowed client list.
871 * @privlevel platform
872 * @privilege %http://tizen.org/privilege/tethering.admin
873 * @param[in] tethering The handle of tethering
874 * @param[out] allowed_mac_list list of allowed mac addresses list
875 * @return 0 on success, otherwise negative error value.
876 * @retval #TETHERING_ERROR_NONE Successful
877 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
878 * @retval #TETHERING_ERROR_NOT_SUPPORTED API is not supported
879 * @retval #TETHERING_ERROR_PERMISSION_DENIED Permission Denied
880 * @see tethering_mobileap_set_mac_filter()
882 int tethering_wifi_get_allowed_mac_list(tethering_h tethering, void **allowed_mac_list);
885 * @brief Adds the mac-address to the blocked(black list) client list.
886 * @details AP can disallow the client by adding clients mac-address to the blocked list.
888 * @privlevel platform
889 * @privilege %http://tizen.org/privilege/tethering.admin
890 * @param[in] tethering The handle of tethering
891 * @param[in] mac The mac address
892 * @return 0 on success, otherwise negative error value.
893 * @retval #TETHERING_ERROR_NONE Successful
894 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
895 * @retval #TETHERING_ERROR_NOT_SUPPORTED API is not supported
896 * @retval #TETHERING_ERROR_PERMISSION_DENIED Permission Denied
897 * @see tethering_mobileap_set_mac_filter()
899 int tethering_wifi_add_blocked_mac_list(tethering_h tethering, const char *mac);
902 * @brief Removes the mac-address from the blocked(black list) client list.
903 * @details Removes the mac-address from the blocked client list.
905 * @privlevel platform
906 * @privilege %http://tizen.org/privilege/tethering.admin
907 * @param[in] tethering The handle of tethering
908 * @param[in] mac The mac address
909 * @return 0 on success, otherwise negative error value.
910 * @retval #TETHERING_ERROR_NONE Successful
911 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
912 * @retval #TETHERING_ERROR_NOT_SUPPORTED API is not supported
913 * @retval #TETHERING_ERROR_PERMISSION_DENIED Permission Denied
914 * @see tethering_mobileap_set_mac_filter()
916 int tethering_wifi_remove_blocked_mac_list(tethering_h tethering, const char *mac);
919 * @brief Gets the mac-addresses from the blocked client list.
920 * @details Get the mac-addresses from the blocked client list.
922 * @privlevel platform
923 * @privilege %http://tizen.org/privilege/tethering.admin
924 * @param[in] tethering The handle of tethering
925 * @param[out] blocked_mac_list list of blocked mac addresses list
926 * @return 0 on success, otherwise negative error value.
927 * @retval #TETHERING_ERROR_NONE Successful
928 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
929 * @retval #TETHERING_ERROR_NOT_SUPPORTED API is not supported
930 * @retval #TETHERING_ERROR_PERMISSION_DENIED Permission Denied
931 * @see tethering_mobileap_set_mac_filter()
933 int tethering_wifi_get_blocked_mac_list(tethering_h tethering, void **blocked_mac_list);
936 * @brief Enables/disables the dhcp server.
938 * @privlevel platform
939 * @privilege %http://tizen.org/privilege/tethering.admin
940 * @details Enable/disable the dhcp server.
941 * @param[in] tethering The handle of tethering
942 * @param[in] enable Enable/disable the dhcp server
943 * @return 0 on success, otherwise negative error value.
944 * @retval #TETHERING_ERROR_NONE Successful
945 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
947 int tethering_wifi_enable_dhcp(tethering_h tethering, bool enable);
950 * @brief Enables the dhcp server with the address range.
952 * @privlevel platform
953 * @privilege %http://tizen.org/privilege/tethering.admin
954 * @details Enable the dhcp server with the address range.
955 * @param[in] tethering The handle of tethering
956 * @param[in] rangestart Start address range
957 * @param[in] rangestop End address range
958 * @return 0 on success, otherwise negative error value.
959 * @retval #TETHERING_ERROR_NONE Successful
960 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
962 int tethering_wifi_set_dhcp_range(tethering_h tethering, char *rangestart, char *rangestop);
965 * @brief Checks whether the dhcp is enabled or not.
967 * @privlevel platform
968 * @privilege %http://tizen.org/privilege/tethering.admin
969 * @param[in] tethering The tethering handle
970 * @param[out] dhcp_enabled @c true if dhcp is enabled, \n @c false if dhcp is disabled
971 * @return 0 on success, otherwise a negative error value
972 * @retval #TETHERING_ERROR_NONE Successful
973 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
975 int tethering_wifi_is_dhcp_enabled(tethering_h tethering, bool *dhcp_enabled);
978 * @brief Sets the Channel for Wi-Fi.
979 * @details The Channel should be in between 1-14. If channel is not set, Wi-Fi sets default channel.
981 * @privlevel platform
982 * @privilege %http://tizen.org/privilege/tethering.admin
983 * @param[in] tethering The tethering handle
984 * @param[in] channel The channel number
985 * @return 0 on success, otherwise negative error value
986 * @retval #TETHERING_ERROR_NONE Successful
987 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
989 int tethering_wifi_set_channel(tethering_h tethering, int channel);
992 * @brief Gets the channel for Wi-Fi.
993 * @details If channel is not set, Wi-Fi gets default channel.
995 * @privlevel platform
996 * @privilege %http://tizen.org/privilege/tethering.admin
997 * @param[in] tethering The tethering handle
998 * @param[out] channel The channel number
999 * @return 0 on success, otherwise negative error value
1000 * @retval #TETHERING_ERROR_NONE Successful
1001 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1002 * @see tethering_wifi_ap_set_channel()
1004 int tethering_wifi_get_channel(tethering_h tethering, int *channel);
1007 * @brief Sets the mode for Wi-Fi.
1008 * @details The mobile AP mode (ex: b only, g only, ad, a). If mode is not set, Wi-Fi sets default mode.
1010 * @privlevel platform
1011 * @privilege %http://tizen.org/privilege/tethering.admin
1012 * @param[in] tethering The tethering handle
1013 * @param[in] type The mobile AP mode
1014 * @return 0 on success, otherwise negative error value
1015 * @retval #TETHERING_ERROR_NONE Successful
1016 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1018 int tethering_wifi_set_mode(tethering_h tethering, tethering_wifi_mode_type_e type);
1021 * @brief Gets the mode for Wi-Fi.
1022 * @details If the mode is not set, Wi-Fi gets default mode.
1024 * @privlevel platform
1025 * @privilege %http://tizen.org/privilege/tethering.admin
1026 * @remarks @a mode must be released using free().
1027 * @param[in] tethering The tethering handle
1028 * @param[out] type The mode of Wi-Fi AP
1029 * @return 0 on success, otherwise negative error value
1030 * @retval #TETHERING_ERROR_NONE Successful
1031 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1032 * @see tethering_wifi_set_mode()
1034 int tethering_wifi_get_mode(tethering_h tethering, tethering_wifi_mode_type_e *type);
1037 * @brief Sets the security type of Wi-Fi AP.
1038 * @details If security type is not set, WPA2_PSK is used.
1040 * @privlevel platform
1041 * @privilege %http://tizen.org/privilege/tethering.admin
1042 * @param[in] tethering The tethering handle
1043 * @param[in] type The security type
1044 * @return 0 on success, otherwise negative error value
1045 * @retval #TETHERING_ERROR_NONE Successful
1046 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1047 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
1048 * @see tethering_wifi_ap_get_security_type()
1050 int tethering_wifi_ap_set_security_type(tethering_h tethering, tethering_wifi_security_type_e type);
1053 * @brief Gets the security type of Wi-Fi AP.
1054 * @details If security type is not set, WPA2_PSK is used.
1056 * @privlevel platform
1057 * @privilege %http://tizen.org/privilege/tethering.admin
1058 * @param[in] tethering The tethering handle
1059 * @param[out] type The security type
1060 * @return 0 on success, otherwise negative error value
1061 * @retval #TETHERING_ERROR_NONE Successful
1062 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1063 * @see tethering_wifi_ap_set_security_type()
1065 int tethering_wifi_ap_get_security_type(tethering_h tethering, tethering_wifi_security_type_e *type);
1068 * @brief Sets the SSID (service set identifier) for Wi-Fi AP.
1069 * @details The SSID cannot exceed 32 bytes. If SSID is not set, device name is used as SSID.
1071 * @privlevel platform
1072 * @privilege %http://tizen.org/privilege/tethering.admin
1073 * @param[in] tethering The tethering handle
1074 * @param[in] ssid The SSID
1075 * @return 0 on success, otherwise negative error value
1076 * @retval #TETHERING_ERROR_NONE Successful
1077 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1078 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
1080 int tethering_wifi_ap_set_ssid(tethering_h tethering, const char *ssid);
1083 * @brief Gets the SSID (service set identifier) for Wi-Fi AP.
1084 * @details If SSID is not set, Device name is used as SSID.
1086 * @privlevel platform
1087 * @privilege %http://tizen.org/privilege/tethering.admin
1088 * @remarks @a ssid must be released using free().
1089 * @param[in] tethering The tethering handle
1090 * @param[out] ssid The SSID
1091 * @return 0 on success, otherwise negative error value
1092 * @retval #TETHERING_ERROR_NONE Successful
1093 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1094 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
1096 int tethering_wifi_ap_get_ssid(tethering_h tethering, char **ssid);
1099 * @brief Sets the visibility of SSID (service set identifier) for Wi-Fi AP.
1100 * @details If you set the visibility to invisible, then the SSID of this device is hidden and Wi-Fi scan won't find your device.
1101 * @details By default visibility is set to @c true.
1103 * @privlevel platform
1104 * @privilege %http://tizen.org/privilege/tethering.admin
1105 * @remarks This change is applied next time Wi-Fi tethering is enabled.
1106 * @param[in] tethering The tethering handle
1107 * @param[in] visible The visibility of SSID: (@c true = visible, @c false = invisible)
1108 * @return 0 on success, otherwise negative error value
1109 * @retval #TETHERING_ERROR_NONE Successful
1110 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1111 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
1112 * @see tethering_wifi_ap_get_ssid_visibility()
1114 int tethering_wifi_ap_set_ssid_visibility(tethering_h tethering, bool visible);
1117 * @brief Gets the visibility of SSID (service set identifier) for Wi-Fi AP.
1118 * @details If the visibility is set to invisible, then the SSID of this device is hidden and Wi-Fi scan won't find your device.
1119 * @details By default visibility is set to @c true.
1121 * @privlevel platform
1122 * @privilege %http://tizen.org/privilege/tethering.admin
1123 * @param[in] tethering The tethering handle
1124 * @param[out] visible The visibility of SSID: (@c true = visible, @c false = invisible)
1125 * @return 0 on success, otherwise negative error value
1126 * @retval #TETHERING_ERROR_NONE Successful
1127 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1128 * @see tethering_wifi_ap_set_ssid_visibility()
1130 int tethering_wifi_ap_get_ssid_visibility(tethering_h tethering, bool *visible);
1133 * @brief Sets the passphrase for Wi-Fi AP.
1134 * @details If the passphrase is not set, random string of 8 characters will be used.
1136 * @privlevel platform
1137 * @privilege %http://tizen.org/privilege/tethering.admin
1138 * @param[in] tethering The tethering handle
1139 * @param[in] passphrase The passphrase
1140 * @return 0 on success, otherwise negative error value
1141 * @retval #TETHERING_ERROR_NONE Successful
1142 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1143 * @see tethering_wifi_ap_get_passphrase()
1145 int tethering_wifi_ap_set_passphrase(tethering_h tethering, const char *passphrase);
1148 * @brief Gets the passphrase for Wi-Fi AP.
1149 * @details If the passphrase is not set, random string of 8 characters will be used.
1151 * @privlevel platform
1152 * @privilege %http://tizen.org/privilege/tethering.admin
1153 * @remarks @a passphrase must be released using free().
1154 * @param[in] tethering The tethering handle
1155 * @param[out] passphrase The passphrase
1156 * @return 0 on success, otherwise negative error value
1157 * @retval #TETHERING_ERROR_NONE Successful
1158 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1159 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
1160 * @see tethering_wifi_ap_set_passphrase()
1162 int tethering_wifi_ap_get_passphrase(tethering_h tethering, char **passphrase);
1165 * @brief Reloads the settings (SSID / Passphrase / Security type / SSID visibility) for Wi-Fi AP.
1167 * @privlevel platform
1168 * @privilege %http://tizen.org/privilege/tethering.admin
1169 * @remarks Devices connected via MobileAP will be disconnected when the settings are reloaded.
1170 * @param[in] tethering The tethering handle
1171 * @param[in] callback The callback function to invoke
1172 * @param[in] user_data The user data to be passed to the callback function
1173 * @return 0 on success, otherwise negative error value
1174 * @retval #TETHERING_ERROR_NONE Successful
1175 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1176 * @retval #TETHERING_ERROR_OPERATION_FAILED Operation failed
1178 int tethering_wifi_ap_reload_settings(tethering_h tethering, tethering_wifi_ap_settings_reloaded_cb callback, void *user_data);
1185 * @addtogroup CAPI_NETWORK_TETHERING_CLIENT_MODULE
1190 * @brief Clones the handle of a client.
1192 * @privlevel platform
1193 * @privilege %http://tizen.org/privilege/tethering.admin
1194 * @remarks @a dest must be release using tethering_client_destroy().
1195 * @param[out] dest The cloned client handle
1196 * @param[in] origin The origin client handle
1197 * @return 0 on success, otherwise a negative error value
1198 * @retval #TETHERING_ERROR_NONE Successful
1199 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1200 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
1201 * @see tethering_client_destroy()
1203 int tethering_client_clone(tethering_client_h *dest, tethering_client_h origin);
1206 * @brief Destroys the handle of a client.
1208 * @privlevel platform
1209 * @privilege %http://tizen.org/privilege/tethering.admin
1210 * @param[in] client The client handle
1211 * @return 0 on success, otherwise a negative error value
1212 * @retval #TETHERING_ERROR_NONE Successful
1213 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1214 * @see tethering_client_clone()
1216 int tethering_client_destroy(tethering_client_h client);
1219 * @brief Gets the tethering type of client.
1221 * @privlevel platform
1222 * @privilege %http://tizen.org/privilege/tethering.admin
1223 * @param[in] client The handle of client
1224 * @param[out] type The type of tethering
1225 * @return 0 on success, otherwise a negative error value.
1226 * @retval #TETHERING_ERROR_NONE Successful
1227 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1228 * @see tethering_usb_get_connected_client()
1229 * @see tethering_connection_state_changed_cb()
1231 int tethering_client_get_tethering_type(tethering_client_h client, tethering_type_e *type);
1234 * @brief Gets the name of a client.
1236 * @privlevel platform
1237 * @privilege %http://tizen.org/privilege/tethering.admin
1238 * @remarks @a name must be released using free().
1239 * @param[in] client The client handle
1240 * @param[out] name The name of the client
1241 * @return 0 on success, otherwise a negative error value
1242 * @retval #TETHERING_ERROR_NONE Successful
1243 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1244 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
1245 * @see tethering_usb_get_connected_client()
1246 * @see tethering_connection_state_changed_cb()
1248 int tethering_client_get_name(tethering_client_h client, char **name);
1251 * @brief Gets the IP address of a client.
1253 * @privlevel platform
1254 * @privilege %http://tizen.org/privilege/tethering.admin
1255 * @remarks @a ip_address must be released using free().
1256 * @param[in] client The client handle
1257 * @param[in] address_family The address family of IP address. Currently, #TETHERING_ADDRESS_FAMILY_IPV4 is only supported
1258 * @param[out] ip_address The IP address
1259 * @return 0 on success, otherwise a negative error value
1260 * @retval #TETHERING_ERROR_NONE Successful
1261 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1262 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
1263 * @see tethering_usb_get_connected_client()
1264 * @see tethering_connection_state_changed_cb()
1266 int tethering_client_get_ip_address(tethering_client_h client, tethering_address_family_e address_family, char **ip_address);
1269 * @brief Gets the MAC address of a client such as "FC:A1:3E:D6:B1:B1".
1271 * @privlevel platform
1272 * @privilege %http://tizen.org/privilege/tethering.admin
1273 * @remarks @a mac_address must be released using free().
1274 * @param[in] client The client handle
1275 * @param[out] mac_address The MAC address
1276 * @return 0 on success, otherwise a negative error value
1277 * @retval #TETHERING_ERROR_NONE Successful
1278 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1279 * @retval #TETHERING_ERROR_OUT_OF_MEMORY Out of memory
1280 * @see tethering_usb_get_connected_client()
1281 * @see tethering_connection_state_changed_cb()
1283 int tethering_client_get_mac_address(tethering_client_h client, char **mac_address);
1286 * @brief Gets the connection time of a client.
1288 * @privlevel platform
1289 * @privilege %http://tizen.org/privilege/tethering.admin
1290 * @param[in] client The client handle
1291 * @param[out] time The connected time of the client
1292 * @return 0 on success, otherwise a negative error value
1293 * @retval #TETHERING_ERROR_NONE Successful
1294 * @retval #TETHERING_ERROR_INVALID_PARAMETER Invalid parameter
1295 * @see tethering_usb_get_connected_client()
1296 * @see tethering_connection_state_changed_cb()
1298 int tethering_client_get_time(tethering_client_h client, time_t *timestamp);
1309 #endif /* __TIZEN_NETWORK_TETHERING_H__ */