Base Code merged to SPIN 2.4
[platform/core/api/tethering.git] / include / tethering.h
1 /*
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17 #ifndef __TIZEN_NETWORK_TETHERING_H__
18 #define __TIZEN_NETWORK_TETHERING_H__
19
20 #include <tizen.h>
21 #include <time.h>
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 /**
28  * @file tethering.h
29  */
30
31 /**
32  * @addtogroup CAPI_NETWORK_TETHERING_MANAGER_MODULE
33  * @{
34  */
35
36 /**
37  * @brief The tethering handle.
38  * @since_tizen 2.3
39  */
40 typedef void * tethering_h;
41
42 /**
43  * @brief Enumeration for the tethering.
44  * @since_tizen 2.3
45  */
46 typedef enum {
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 */
57 } tethering_error_e;
58
59 /**
60  * @brief Enumeration for the type of tethering.
61  * @since_tizen 2.3
62  */
63 typedef enum {
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 */
69 } tethering_type_e;
70
71 /**
72  * @brief Enumeration for the cause of disabling the tethering.
73  * @since_tizen 2.3
74  */
75 typedef enum
76 {
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;
87
88 /**
89  * @}
90  */
91
92
93 /**
94  * @addtogroup CAPI_NETWORK_TETHERING_WIFI_MODULE
95  * @{
96  */
97
98 /**
99  * @brief Enumeration for the Wi-Fi security.
100  * @since_tizen 2.3
101  */
102 typedef enum {
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;
106
107 /**
108  * @}
109  */
110
111
112 /**
113  * @addtogroup CAPI_NETWORK_TETHERING_CLIENT_MODULE
114  * @{
115  */
116
117 /**
118  * @brief The tethering client handle.
119  * @since_tizen 2.3
120  */
121 typedef void * tethering_client_h;
122
123 /**
124  * @brief Enumeration for address family.
125  * @since_tizen 2.3
126  */
127 typedef enum {
128     TETHERING_ADDRESS_FAMILY_IPV4 = 0,  /**< IPV4 Address type */
129 } tethering_address_family_e;
130
131 /**
132  * @}
133  */
134
135
136 /**
137  * @addtogroup CAPI_NETWORK_TETHERING_MANAGER_MODULE
138  * @{
139  */
140
141 /**
142  * @brief Called when the tethering is enabled.
143  * @since_tizen 2.3
144  * @param[in]  result  The result of enabling the tethering
145  * @param[in]  type  The tethering type
146  * @param[in]  is_requested  Indicates whether this change is requested
147  * @param[in]  user_data  The user data passed from tethering_set_enabled_cb()
148  * @pre  If you register callback function using tethering_set_enabled_cb(), this will be invoked when the tethering is enabled.
149  * @see tethering_enable()
150  * @see tethering_unset_enabled_cb()
151  */
152 typedef void (*tethering_enabled_cb)(tethering_error_e result, tethering_type_e type, bool is_requested, void *user_data);
153
154 /**
155  * @brief Called when the tethering is disabled.
156  * @since_tizen 2.3
157  * @param[in]  result  The result of disabling the tethering
158  * @param[in]  type  The tethering type
159  * @param[in]  cause  The cause of disabling
160  * @param[in]  user_data  The user data passed from tethering_set_disabled_cb()
161  * @pre  If you register callback function using tethering_set_disabled_cb(), this will be invoked when the tethering is disabled.
162  * @see tethering_set_disabled_cb()
163  * @see tethering_unset_disabled_cb()
164  */
165 typedef void (*tethering_disabled_cb)(tethering_error_e result, tethering_type_e type, tethering_disabled_cause_e cause, void *user_data);
166
167 /**
168  * @brief Called when the connection state is changed.
169  * @since_tizen 2.3
170  * @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().
171  * @param[in]  client  The client of which connection state is changed
172  * @param[in]  opened  @c true when connection is opened, otherwise false
173  * @param[in]  user_data  The user data passed from tethering_set_connection_state_changed_cb()
174  * @pre  If you register callback function using tethering_set_connection_state_changed_cb(), this will be invoked when the connection state is changed.
175  * @see tethering_set_connection_state_changed_cb()
176  * @see tethering_unset_connection_state_changed_cb()
177  */
178 typedef void (*tethering_connection_state_changed_cb)(tethering_client_h client, bool opened, void *user_data);
179
180 /**
181  * @brief Called when you get the connected client repeatedly.
182  * @since_tizen 2.3
183  * @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().
184  * @param[in]  client  The connected client
185  * @param[in]  user_data  The user data passed from the request function
186  * @return  @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
187  * @pre  tethering_foreach_connected_clients() will invoke this callback.
188  * @see  tethering_foreach_connected_clients()
189  */
190 typedef bool(*tethering_connected_client_cb)(tethering_client_h client, void *user_data);
191
192 /**
193  * @brief Called when you get the data usage.
194  * @since_tizen 2.3
195  * @param[in]  result  The result of getting the data usage
196  * @param[in]  received_data  The usage of received data
197  * @param[in]  sent_data  The usage of sent data
198  * @param[in]  user_data  The user data passed from the request function
199  * @pre  tethering_get_data_usage() will invoked this callback.
200  */
201 typedef void (*tethering_data_usage_cb)(tethering_error_e result, unsigned long long received_data, unsigned long long sent_data, void *user_data);
202
203 /**
204  * @brief Called when the security type of Wi-Fi tethering is changed.
205  * @since_tizen 2.3
206  * @param[in]  changed_type  The changed security type of Wi-Fi tethering
207  * @param[in]  user_data  The user data passed from the register function
208  * @see tethering_wifi_set_security_type_changed_cb()
209  * @see tethering_wifi_unset_security_type_changed_cb()
210  */
211 typedef void (*tethering_wifi_security_type_changed_cb)(tethering_wifi_security_type_e changed_type, void *user_data);
212
213 /**
214  * @brief Called when the visibility of SSID is changed.
215  * @since_tizen 2.3
216  * @param[in]  changed_visible  The changed visibility of SSID
217  * @param[in]  user_data  The user data passed from the register function
218  * @see tethering_wifi_set_ssid_visibility_changed_cb()
219  * @see tethering_wifi_unset_ssid_visibility_changed_cb()
220  */
221 typedef void (*tethering_wifi_ssid_visibility_changed_cb)(bool changed_visible, void *user_data);
222
223 /**
224  * @brief Called when the passphrase of Wi-Fi tethering is changed.
225  * @since_tizen 2.3
226  * @param[in]  user_data  The user data passed from the register function
227  * @see tethering_wifi_set_passphrase_changed_cb()
228  * @see tethering_wifi_unset_passphrase_changed_cb()
229  */
230 typedef void (*tethering_wifi_passphrase_changed_cb)(void *user_data);
231
232 /**
233  * @brief Called when the settings are reloaded.
234  * @since_tizen 2.3
235  * @param[in]  result  The result of reloading the settings
236  * @param[in]  user_data  The user data passed from the request function
237  * @pre  tethering_wifi_reload_settings() will invoke this callback.
238  */
239 typedef void (*tethering_wifi_settings_reloaded_cb)(tethering_error_e result, void *user_data);
240
241 /**
242  * @brief Called when Wi-Fi AP settings are reloaded.
243  * @since_tizen 2.3
244  * @param[in]  result  The result of reloading the settings
245  * @param[in]  user_data  The user data passed from the request function
246  * @pre  tethering_wifi_ap_reload_settings() will invoke this callback.
247  */
248 typedef void (*tethering_wifi_ap_settings_reloaded_cb)(tethering_error_e result, void *user_data);
249
250 /**
251  * @brief Creates the handle for tethering.
252  * @since_tizen 2.3
253  * @privlevel platform
254  * @privilege http://tizen.org/privilege/tethering.admin
255  * @remarks The @a tethering must be released using tethering_destroy().
256  * @param[out]  tethering  A handle of a new mobile ap handle on success
257  * @return  0 on success, otherwise a negative error value
258  * @retval  #TETHERING_ERROR_NONE  Successful
259  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
260  * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
261  * @retval  #TETHERING_ERROR_NOT_SUPPORT_API  API is not supported
262  * @see  tethering_destroy()
263  */
264 int tethering_create(tethering_h *tethering);
265
266 /**
267  * @brief Destroys the handle for tethering.
268  * @since_tizen 2.3
269  * @privlevel platform
270  * @privilege http://tizen.org/privilege/tethering.admin
271  * @param[in]  tethering  The tethering handle
272  * @return  0 on success, otherwise a negative error value
273  * @retval  #TETHERING_ERROR_NONE  Successful
274  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
275  * @see  tethering_create()
276  */
277 int tethering_destroy(tethering_h tethering);
278
279 /**
280  * @brief Enables the tethering, asynchronously.
281  * @since_tizen 2.3
282  * @privlevel platform
283  * @privilege http://tizen.org/privilege/tethering.admin
284  * @param[in]  tethering  The tethering handle
285  * @param[in]  type  The tethering type
286  * @return 0 on success, otherwise negative error value
287  * @retval  #TETHERING_ERROR_NONE  Successful
288  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
289  * @post tethering_enabled_cb() will be invoked.
290  * @see  tethering_is_enabled()
291  * @see  tethering_disable()
292  */
293 int tethering_enable(tethering_h tethering, tethering_type_e type);
294
295 /**
296  * @brief Disables the tethering, asynchronously.
297  * @since_tizen 2.3
298  * @privlevel platform
299  * @privilege http://tizen.org/privilege/tethering.admin
300  * @param[in]  tethering  The tethering handle
301  * @param[in]  type  The tethering type
302  * @return 0 on success, otherwise negative error value
303  * @retval  #TETHERING_ERROR_NONE  Successful
304  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
305  * @post tethering_disabled_cb() will be invoked.
306  * @see  tethering_is_enabled()
307  * @see  tethering_enable()
308  */
309 int tethering_disable(tethering_h tethering, tethering_type_e type);
310
311 /**
312  * @brief Checks whether the tethering is enabled or not.
313  * @since_tizen 2.3
314  * @privlevel platform
315  * @privilege http://tizen.org/privilege/tethering.admin
316  * @param[in]  tethering  The tethering handle
317  * @param[in]  type  The tethering type
318  * @return  @c true if tethering is enabled, \n @c false if tethering is disabled
319  */
320 bool tethering_is_enabled(tethering_h tethering, tethering_type_e type);
321
322 /**
323  * @brief Gets the MAC address of local device as "FC:A1:3E:D6:B1:B1".
324  * @since_tizen 2.3
325  * @privlevel platform
326  * @privilege http://tizen.org/privilege/tethering.admin
327  * @remarks @a mac_address must be released using free().
328  * @param[in]  tethering  The tethering handle
329  * @param[in]  type  The tethering type
330  * @param[out]  mac_address  The MAC address
331  * @return  0 on success, otherwise a negative error value
332  * @retval  #TETHERING_ERROR_NONE  Successful
333  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
334  * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
335  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
336  * @retval  #TETHERING_ERROR_NOT_ENABLED  Not enabled
337  * @pre  The tethering must be enabled.
338  * @see  tethering_is_enabled()
339  * @see  tethering_enable()
340  */
341 int tethering_get_mac_address(tethering_h tethering, tethering_type_e type, char **mac_address);
342
343 /**
344  * @brief Gets the name of network interface (e.g. usb0).
345  * @since_tizen 2.3
346  * @privlevel platform
347  * @privilege http://tizen.org/privilege/tethering.admin
348  * @remarks @a interface_name must be released using free().
349  * @param[in]  tethering  The tethering handle
350  * @param[in]  type  The tethering type
351  * @param[out]  interface_name  The name of the network interface
352  * @return 0 on success, otherwise negative error value
353  * @retval  #TETHERING_ERROR_NONE  Successful
354  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
355  * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
356  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
357  * @retval  #TETHERING_ERROR_NOT_ENABLED  Not enabled
358  * @pre  The tethering must be enabled.
359  * @see  tethering_is_enabled()
360  * @see  tethering_enable()
361  */
362 int tethering_get_network_interface_name(tethering_h tethering, tethering_type_e type, char **interface_name);
363
364 /**
365  * @brief Gets the local IP address.
366  * @since_tizen 2.3
367  * @privlevel platform
368  * @privilege http://tizen.org/privilege/tethering.admin
369  * @remarks @a ip_address must be released using free().
370  * @param[in]  tethering  The tethering handle
371  * @param[in]  type  The tethering type
372  * @param[in]  address_family  The address family of IP address (currently, #TETHERING_ADDRESS_FAMILY_IPV4 is only supported)
373  * @param[out]  ip_address  The local IP address
374  * @return 0 on success, otherwise negative error value
375  * @retval  #TETHERING_ERROR_NONE  Successful
376  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
377  * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
378  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
379  * @retval  #TETHERING_ERROR_NOT_ENABLED  Not enabled
380  * @pre  The tethering must be enabled.
381  * @see  tethering_is_enabled()
382  * @see  tethering_enable()
383  */
384 int tethering_get_ip_address(tethering_h tethering, tethering_type_e type, tethering_address_family_e address_family, char **ip_address);
385
386 /**
387  * @brief Gets the Gateway address.
388  * @since_tizen 2.3
389  * @privlevel platform
390  * @privilege http://tizen.org/privilege/tethering.admin
391  * @remarks @a gateway_address must be released using free().
392  * @param[in]  tethering  The tethering handle
393  * @param[in]  type  The tethering type
394  * @param[in]  address_family  The address family of IP address (currently, #TETHERING_ADDRESS_FAMILY_IPV4 is only supported)
395  * @param[out]  gateway_address  The local IP address
396  * @return 0 on success, otherwise negative error value
397  * @retval  #TETHERING_ERROR_NONE  Successful
398  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
399  * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
400  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
401  * @retval  #TETHERING_ERROR_NOT_ENABLED  Not enabled
402  * @pre  The tethering must be enabled.
403  * @see  tethering_is_enabled()
404  * @see  tethering_enable()
405  */
406 int tethering_get_gateway_address(tethering_h tethering, tethering_type_e type, tethering_address_family_e address_family, char **gateway_address);
407
408 /**
409  * @brief Gets the Subnet Mask.
410  * @since_tizen 2.3
411  * @privlevel platform
412  * @privilege http://tizen.org/privilege/tethering.admin
413  * @remarks @a subnet_mask must be released using free().
414  * @param[in]  tethering  The tethering handle
415  * @param[in]  type  The tethering type
416  * @param[in]  address_family  The address family of IP address (currently, #TETHERING_ADDRESS_FAMILY_IPV4 is only supported)
417  * @param[out]  subnet_mask  The local IP address
418  * @return 0 on success, otherwise negative error value
419  * @retval  #TETHERING_ERROR_NONE  Successful
420  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
421  * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
422  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
423  * @retval  #TETHERING_ERROR_NOT_ENABLED  Not enabled
424  * @pre  The tethering must be enabled.
425  * @see  tethering_is_enabled()
426  * @see  tethering_enable()
427  */
428 int tethering_get_subnet_mask(tethering_h tethering, tethering_type_e type, tethering_address_family_e address_family, char **subnet_mask);
429
430 /**
431  * @brief Gets the data usage.
432  * @since_tizen 2.3
433  * @privlevel platform
434  * @privilege http://tizen.org/privilege/tethering.admin
435  * @param[in]  tethering  The tethering handle
436  * @param[out]  usage  The data usage
437  * @return 0 on success, otherwise negative error value
438  * @retval  #TETHERING_ERROR_NONE  Successful
439  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
440  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
441  * @retval  #TETHERING_ERROR_NOT_ENABLED  Not enabled
442  * @pre  The tethering must be enabled.
443  * @see  tethering_is_enabled()
444  * @see  tethering_enable()
445  */
446 int tethering_get_data_usage(tethering_h tethering, tethering_data_usage_cb callback, void *user_data);
447
448 /**
449  * @brief Gets the clients which are connected.
450  * @since_tizen 2.3
451  * @privlevel platform
452  * @privilege http://tizen.org/privilege/tethering.admin
453  * @param[in]  tethering  The tethering handle
454  * @param[in]  type  The tethering type
455  * @param[in]  callback  The callback function to invoke
456  * @param[in]  user_data  The user data to be passed to the callback function
457  * @retval  #TETHERING_ERROR_NONE  Successful
458  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
459  * @retval  #TETHERING_ERROR_NOT_ENABLED  Not enabled
460  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
461  * @pre  The tethering must be enabled.
462  * @see  tethering_is_enabled()
463  * @see  tethering_enable()
464  */
465 int tethering_foreach_connected_clients(tethering_h tethering, tethering_type_e type, tethering_connected_client_cb callback, void *user_data);
466
467 /**
468  * @brief Registers the callback function, which is called when tethering is enabled.
469  * @since_tizen 2.3
470  * @privlevel platform
471  * @privilege http://tizen.org/privilege/tethering.admin
472  * @param[in]  tethering  The tethering handle
473  * @param[in]  type  The tethering type
474  * @param[in]  callback  The callback function to invoke
475  * @param[in]  user_data  The user data to be passed to the callback function
476  * @retval  #TETHERING_ERROR_NONE  Successful
477  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
478  * @see  tethering_unset_enabled_cb()
479  */
480 int tethering_set_enabled_cb(tethering_h tethering, tethering_type_e type, tethering_enabled_cb callback, void *user_data);
481
482 /**
483  * @brief Unregisters the callback function, which is called when tethering is enabled.
484  * @since_tizen 2.3
485  * @privlevel platform
486  * @privilege http://tizen.org/privilege/tethering.admin
487  * @param[in]  tethering  The tethering handle
488  * @param[in]  type  The tethering type
489  * @retval  #TETHERING_ERROR_NONE  Successful
490  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
491  * @see  tethering_set_enabled_cb()
492  */
493 int tethering_unset_enabled_cb(tethering_h tethering, tethering_type_e type);
494
495 /**
496  * @brief Registers the callback function called when tethering is disabled.
497  * @since_tizen 2.3
498  * @privlevel platform
499  * @privilege http://tizen.org/privilege/tethering.admin
500  * @param[in]  tethering  The tethering handle
501  * @param[in]  type  The tethering type
502  * @param[in]  callback  The callback function to invoke
503  * @param[in]  user_data  The user data to be passed to the callback function
504  * @retval  #TETHERING_ERROR_NONE  Successful
505  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
506  * @see  tethering_unset_disabled_cb()
507  */
508 int tethering_set_disabled_cb(tethering_h tethering, tethering_type_e type, tethering_disabled_cb callback, void *user_data);
509
510 /**
511  * @brief Unregisters the callback function, which is called when tethering is disabled.
512  * @since_tizen 2.3
513  * @privlevel platform
514  * @privilege http://tizen.org/privilege/tethering.admin
515  * @param[in]  tethering  The tethering handle
516  * @param[in]  type  The tethering type
517  * @retval  #TETHERING_ERROR_NONE  Successful
518  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
519  * @see  tethering_set_disabled_cb()
520  */
521 int tethering_unset_disabled_cb(tethering_h tethering, tethering_type_e type);
522
523 /**
524  * @brief Registers the callback function, which is called when the state of connection is changed.
525  * @since_tizen 2.3
526  * @privlevel platform
527  * @privilege http://tizen.org/privilege/tethering.admin
528  * @param[in]  tethering  The tethering handle
529  * @param[in]  type  The tethering type
530  * @param[in]  callback  The callback function to invoke
531  * @param[in]  user_data  The user data to be passed to the callback function
532  * @retval  #TETHERING_ERROR_NONE  Successful
533  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
534  * @see  tethering_unset_connection_state_changed_cb_cb()
535  */
536 int tethering_set_connection_state_changed_cb(tethering_h tethering, tethering_type_e type, tethering_connection_state_changed_cb callback, void *user_data);
537
538 /**
539  * @brief Unregisters the callback function, which is called when the state of connection is changed.
540  * @since_tizen 2.3
541  * @privlevel platform
542  * @privilege http://tizen.org/privilege/tethering.admin
543  * @param[in]  tethering  The tethering handle
544  * @param[in]  type  The tethering type
545  * @retval  #TETHERING_ERROR_NONE  Successful
546  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
547  * @see  tethering_set_connection_state_changed_cb()
548  */
549 int tethering_unset_connection_state_changed_cb(tethering_h tethering, tethering_type_e type);
550
551 /**
552  * @brief Registers the callback function, which is called when the security type of Wi-Fi tethering is changed.
553  * @since_tizen 2.3
554  * @privlevel platform
555  * @privilege http://tizen.org/privilege/tethering.admin
556  * @param[in]  tethering  The tethering handle
557  * @param[in]  callback  The callback function to invoke
558  * @param[in]  user_data  The user data to be passed to the callback function
559  * @retval  #TETHERING_ERROR_NONE  Successful
560  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
561  * @see  tethering_wifi_unset_security_type_changed_cb()
562  */
563 int tethering_wifi_set_security_type_changed_cb(tethering_h tethering, tethering_wifi_security_type_changed_cb callback, void *user_data);
564
565 /**
566  * @brief Unregisters the callback function, which is called when the security type of Wi-Fi tethering is changed.
567  * @since_tizen 2.3
568  * @privlevel platform
569  * @privilege http://tizen.org/privilege/tethering.admin
570  * @param[in]  tethering  The tethering handle
571  * @param[in]  type  The tethering type
572  * @retval  #TETHERING_ERROR_NONE  Successful
573  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
574  * @see  tethering_wifi_set_security_type_changed_cb()
575  */
576 int tethering_wifi_unset_security_type_changed_cb(tethering_h tethering);
577
578 /**
579  * @brief Registers the callback function , which iscalled when the visibility of SSID is changed.
580  * @since_tizen 2.3
581  * @privlevel platform
582  * @privilege http://tizen.org/privilege/tethering.admin
583  * @param[in]  tethering  The tethering handle
584  * @param[in]  callback  The callback function to invoke
585  * @param[in]  user_data  The user data to be passed to the callback function
586  * @retval  #TETHERING_ERROR_NONE  Successful
587  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
588  * @see  tethering_wifi_unset_ssid_visibility_changed_cb_cb()
589  */
590 int tethering_wifi_set_ssid_visibility_changed_cb(tethering_h tethering, tethering_wifi_ssid_visibility_changed_cb callback, void *user_data);
591
592 /**
593  * @brief Unregisters the callback function, which is called when the visibility of SSID is changed.
594  * @since_tizen 2.3
595  * @privlevel platform
596  * @privilege http://tizen.org/privilege/tethering.admin
597  * @param[in]  tethering  The tethering handle
598  * @retval  #TETHERING_ERROR_NONE  Successful
599  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
600  * @see  tethering_wifi_set_ssid_visibility_changed_cb()
601  */
602 int tethering_wifi_unset_ssid_visibility_changed_cb(tethering_h tethering);
603
604 /**
605  * @brief Registers the callback function, which is called when the passphrase of Wi-Fi tethering is changed.
606  * @since_tizen 2.3
607  * @privlevel platform
608  * @privilege http://tizen.org/privilege/tethering.admin
609  * @param[in]  tethering  The tethering handle
610  * @param[in]  callback  The callback function to invoke
611  * @param[in]  user_data  The user data to be passed to the callback function
612  * @retval  #TETHERING_ERROR_NONE  Successful
613  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
614  * @see  tethering_wifi_unset_passphrase_changed_cb()
615  */
616 int tethering_wifi_set_passphrase_changed_cb(tethering_h tethering, tethering_wifi_passphrase_changed_cb callback, void *user_data);
617
618 /**
619  * @brief Unregisters the callback function, which is called when the passphrase of Wi-Fi tethering is changed.
620  * @since_tizen 2.3
621  * @privlevel platform
622  * @privilege http://tizen.org/privilege/tethering.admin
623  * @param[in]  tethering  The tethering handle
624  * @retval  #TETHERING_ERROR_NONE  Successful
625  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
626  * @see  tethering_wifi_set_passphrase_changed_cb()
627  */
628 int tethering_wifi_unset_passphrase_changed_cb(tethering_h tethering);
629
630 /**
631  * @}
632  */
633
634
635 /**
636  * @addtogroup CAPI_NETWORK_TETHERING_WIFI_MODULE
637  * @{
638  */
639
640 /**
641  * @brief Sets the security type of Wi-Fi tethering.
642  * @since_tizen 2.3
643  * @privlevel platform
644  * @privilege http://tizen.org/privilege/tethering.admin
645  * @remarks This change is applied next time Wi-Fi tethering is enabled.
646  * @param[in]  tethering  The tethering handle
647  * @param[in]  type  The security type
648  * @return 0 on success, otherwise negative error value
649  * @retval  #TETHERING_ERROR_NONE  Successful
650  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
651  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
652  * @see  tethering_wifi_get_security_type()
653  */
654 int tethering_wifi_set_security_type(tethering_h tethering, tethering_wifi_security_type_e type);
655
656 /**
657  * @brief Gets the security type of Wi-Fi tethering.
658  * @since_tizen 2.3
659  * @privlevel platform
660  * @privilege http://tizen.org/privilege/tethering.admin
661  * @param[in]  tethering  The tethering handle
662  * @param[out]  type  The security type
663  * @return 0 on success, otherwise negative error value
664  * @retval  #TETHERING_ERROR_NONE  Successful
665  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
666  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
667  * @see  tethering_wifi_set_security_type()
668  */
669 int tethering_wifi_get_security_type(tethering_h tethering, tethering_wifi_security_type_e *type);
670
671 /**
672  * @brief Sets the SSID (service set identifier).
673  * @details The SSID cannot exceed 32 bytes. If SSID is not set, device name is used as SSID.
674  * @since_tizen 2.3
675  * @privlevel platform
676  * @privilege http://tizen.org/privilege/tethering.admin
677  * @remarks This change is applied next time Wi-Fi tethering is enabled with same @a tethering handle.
678  * @param[in]  tethering  The tethering handle
679  * @param[in]  ssid  The SSID
680  * @return 0 on success, otherwise negative error value
681  * @retval  #TETHERING_ERROR_NONE  Successful
682  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
683  * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
684  */
685 int tethering_wifi_set_ssid(tethering_h tethering, const char *ssid);
686
687 /**
688  * @brief Gets the SSID (service set identifier).
689  * @since_tizen 2.3
690  * @privlevel platform
691  * @privilege http://tizen.org/privilege/tethering.admin
692  * @remarks @a ssid must be released using free().
693  * @param[in]  tethering  The tethering handle
694  * @param[out]  ssid  The SSID
695  * @return 0 on success, otherwise negative error value
696  * @retval  #TETHERING_ERROR_NONE  Successful
697  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
698  * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
699  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
700  */
701 int tethering_wifi_get_ssid(tethering_h tethering, char **ssid);
702
703 /**
704  * @brief Sets the visibility of SSID (service set identifier).
705  * @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.
706  * @since_tizen 2.3
707  * @privlevel platform
708  * @privilege http://tizen.org/privilege/tethering.admin
709  * @remarks This change is applied next time Wi-Fi tethering is enabled.
710  * @param[in]  tethering  The tethering handle
711  * @param[in]  visible  The visibility of SSID: (@c true = visible, @c false = invisible)
712  * @return 0 on success, otherwise negative error value
713  * @retval  #TETHERING_ERROR_NONE  Successful
714  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
715  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
716  * @see  tethering_wifi_get_ssid_visibility()
717  */
718 int tethering_wifi_set_ssid_visibility(tethering_h tethering, bool visible);
719
720 /**
721  * @brief Gets the visibility of SSID (service set identifier).
722  * @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.
723  * @since_tizen 2.3
724  * @privlevel platform
725  * @privilege http://tizen.org/privilege/tethering.admin
726  * @param[in]  tethering  The tethering handle
727  * @param[out]  visible  The visibility of SSID: (@c true = visible, @c false = invisible)
728  * @return 0 on success, otherwise negative error value
729  * @retval  #TETHERING_ERROR_NONE  Successful
730  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
731  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
732  * @see  tethering_wifi_set_ssid_visibility()
733  */
734 int tethering_wifi_get_ssid_visibility(tethering_h tethering, bool *visible);
735
736 /**
737  * @brief Sets the passphrase.
738  * @since_tizen 2.3
739  * @privlevel platform
740  * @privilege http://tizen.org/privilege/tethering.admin
741  * @remarks This change is applied next time Wi-Fi tethering is enabled.
742  * @param[in]  tethering  The tethering handle
743  * @param[in]  passphrase  The passphrase
744  * @return 0 on success, otherwise negative error value
745  * @retval  #TETHERING_ERROR_NONE  Successful
746  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
747  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
748  * @see  tethering_wifi_get_passphrase()
749  */
750 int tethering_wifi_set_passphrase(tethering_h tethering, const char *passphrase);
751
752 /**
753  * @brief Gets the passphrase.
754  * @since_tizen 2.3
755  * @privlevel platform
756  * @privilege http://tizen.org/privilege/tethering.admin
757  * @remarks @a passphrase must be released using free().
758  * @param[in]  tethering  The tethering handle
759  * @param[out]  passphrase  The passphrase
760  * @return 0 on success, otherwise negative error value
761  * @retval  #TETHERING_ERROR_NONE  Successful
762  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
763  * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
764  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
765  * @see  tethering_wifi_set_passphrase()
766  */
767 int tethering_wifi_get_passphrase(tethering_h tethering, char **passphrase);
768
769 /**
770  * @brief Reloads the settings (SSID / Passphrase / Security type / SSID visibility).
771  * @since_tizen 2.3
772  * @privlevel platform
773  * @privilege http://tizen.org/privilege/tethering.admin
774  * @remarks Connected devices via Wi-Fi tethering or MobileAP will be disconnected when the settings are reloaded.
775  * @param[in]  tethering  The tethering handle
776  * @param[in]  callback  The callback function to invoke
777  * @param[in]  user_data  The user data to be passed to the callback function
778  * @return 0 on success, otherwise negative error value
779  * @retval  #TETHERING_ERROR_NONE  Successful
780  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
781  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
782  */
783 int tethering_wifi_reload_settings(tethering_h tethering, tethering_wifi_settings_reloaded_cb callback, void *user_data);
784
785 /**
786  * @brief Sets the security type of Wi-Fi AP.
787  * @details If security type is not set, WPA2_PSK is used.
788  * @since_tizen 2.3
789  * @privlevel platform
790  * @privilege http://tizen.org/privilege/tethering.admin
791  * @param[in]  tethering  The tethering handle
792  * @param[in]  type  The security type
793  * @return 0 on success, otherwise negative error value
794  * @retval  #TETHERING_ERROR_NONE  Successful
795  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
796  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
797  * @see  tethering_wifi_ap_get_security_type()
798  */
799 int tethering_wifi_ap_set_security_type(tethering_h tethering, tethering_wifi_security_type_e type);
800
801 /**
802  * @brief Gets the security type of Wi-Fi AP.
803  * @details If security type is not set, WPA2_PSK is used.
804  * @since_tizen 2.3
805  * @privlevel platform
806  * @privilege http://tizen.org/privilege/tethering.admin
807  * @param[in]  tethering  The tethering handle
808  * @param[out]  type  The security type
809  * @return 0 on success, otherwise negative error value
810  * @retval  #TETHERING_ERROR_NONE  Successful
811  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
812  * @see  tethering_wifi_ap_set_security_type()
813  */
814 int tethering_wifi_ap_get_security_type(tethering_h tethering, tethering_wifi_security_type_e *type);
815
816 /**
817  * @brief Sets the SSID (service set identifier) for Wi-Fi AP.
818  * @details The SSID cannot exceed 32 bytes. If SSID is not set, device name is used as SSID.
819  * @since_tizen 2.3
820  * @privlevel platform
821  * @privilege http://tizen.org/privilege/tethering.admin
822  * @param[in]  tethering  The tethering handle
823  * @param[in]  ssid  The SSID
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_OUT_OF_MEMORY  Out of memory
828  */
829 int tethering_wifi_ap_set_ssid(tethering_h tethering, const char *ssid);
830
831 /**
832  * @brief Gets the SSID (service set identifier) for Wi-Fi AP.
833  * @details If SSID is not set, Device name is used as SSID.
834  * @since_tizen 2.3
835  * @privlevel platform
836  * @privilege http://tizen.org/privilege/tethering.admin
837  * @remarks @a ssid must be released using free().
838  * @param[in]  tethering  The tethering handle
839  * @param[out]  ssid  The SSID
840  * @return 0 on success, otherwise negative error value
841  * @retval  #TETHERING_ERROR_NONE  Successful
842  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
843  * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
844  */
845 int tethering_wifi_ap_get_ssid(tethering_h tethering, char **ssid);
846
847 /**
848  * @brief Sets the visibility of SSID (service set identifier) for Wi-Fi AP.
849  * @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.
850  * @details By default visibility is set to @c true.
851  * @since_tizen 2.3
852  * @privlevel platform
853  * @privilege http://tizen.org/privilege/tethering.admin
854  * @remarks This change is applied next time Wi-Fi tethering is enabled.
855  * @param[in]  tethering  The tethering handle
856  * @param[in]  visible  The visibility of SSID: (@c true = visible, @c false = invisible)
857  * @return 0 on success, otherwise negative error value
858  * @retval  #TETHERING_ERROR_NONE  Successful
859  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
860  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
861  * @see  tethering_wifi_ap_get_ssid_visibility()
862  */
863 int tethering_wifi_ap_set_ssid_visibility(tethering_h tethering, bool visible);
864
865 /**
866  * @brief Gets the visibility of SSID (service set identifier) for Wi-Fi AP.
867  * @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.
868  * @details By default visibility is set to @c true.
869  * @since_tizen 2.3
870  * @privlevel platform
871  * @privilege http://tizen.org/privilege/tethering.admin
872  * @param[in]  tethering  The tethering handle
873  * @param[out]  visible  The visibility of SSID: (@c true = visible, @c false = invisible)
874  * @return 0 on success, otherwise negative error value
875  * @retval  #TETHERING_ERROR_NONE  Successful
876  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
877  * @see  tethering_wifi_ap_set_ssid_visibility()
878  */
879 int tethering_wifi_ap_get_ssid_visibility(tethering_h tethering, bool *visible);
880
881 /**
882  * @brief Sets the passphrase for Wi-Fi AP.
883  * @details If the passphrase is not set, random string of 8 characters will be used.
884  * @since_tizen 2.3
885  * @privlevel platform
886  * @privilege http://tizen.org/privilege/tethering.admin
887  * @param[in]  tethering  The tethering handle
888  * @param[in]  passphrase  The passphrase
889  * @return 0 on success, otherwise negative error value
890  * @retval  #TETHERING_ERROR_NONE  Successful
891  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
892  * @see  tethering_wifi_ap_get_passphrase()
893  */
894 int tethering_wifi_ap_set_passphrase(tethering_h tethering, const char *passphrase);
895
896 /**
897  * @brief Gets the passphrase for Wi-Fi AP.
898  * @details If the passphrase is not set, random string of 8 characters will be used.
899  * @since_tizen 2.3
900  * @privlevel platform
901  * @privilege http://tizen.org/privilege/tethering.admin
902  * @remarks @a passphrase must be released using free().
903  * @param[in]  tethering  The tethering handle
904  * @param[out]  passphrase  The passphrase
905  * @return 0 on success, otherwise negative error value
906  * @retval  #TETHERING_ERROR_NONE  Successful
907  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
908  * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
909  * @see  tethering_wifi_ap_set_passphrase()
910  */
911 int tethering_wifi_ap_get_passphrase(tethering_h tethering, char **passphrase);
912
913 /**
914  * @brief Reloads the settings (SSID / Passphrase / Security type / SSID visibility) for Wi-Fi AP.
915  * @since_tizen 2.3
916  * @privlevel platform
917  * @privilege http://tizen.org/privilege/tethering.admin
918  * @remarks Devices connected via MobileAP will be disconnected when the settings are reloaded.
919  * @param[in]  tethering  The tethering handle
920  * @param[in]  callback  The callback function to invoke
921  * @param[in]  user_data  The user data to be passed to the callback function
922  * @return 0 on success, otherwise negative error value
923  * @retval  #TETHERING_ERROR_NONE  Successful
924  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
925  * @retval  #TETHERING_ERROR_OPERATION_FAILED  Operation failed
926  */
927 int tethering_wifi_ap_reload_settings(tethering_h tethering, tethering_wifi_ap_settings_reloaded_cb callback, void *user_data);
928
929 /**
930  * @}
931  */
932
933
934 /**
935  * @addtogroup CAPI_NETWORK_TETHERING_CLIENT_MODULE
936  * @{
937  */
938
939 /**
940  * @brief Clones the handle of a client.
941  * @since_tizen 2.3
942  * @privlevel platform
943  * @privilege http://tizen.org/privilege/tethering.admin
944  * @remarks @a dest must be release using tethering_client_destroy().
945  * @param[out]  dest  The cloned client handle
946  * @param[in]  origin  The origin client handle
947  * @return  0 on success, otherwise a negative error value
948  * @retval  #TETHERING_ERROR_NONE  Successful
949  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
950  * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
951  * @see  tethering_client_destroy()
952  */
953 int tethering_client_clone(tethering_client_h *dest, tethering_client_h origin);
954
955 /**
956  * @brief Destroys the handle of a client.
957  * @since_tizen 2.3
958  * @privlevel platform
959  * @privilege http://tizen.org/privilege/tethering.admin
960  * @param[in]  client  The client handle
961  * @return  0 on success, otherwise a negative error value
962  * @retval  #TETHERING_ERROR_NONE  Successful
963  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
964  * @see  tethering_client_clone()
965  */
966 int tethering_client_destroy(tethering_client_h client);
967
968 /**
969  * @brief  Gets the tethering type of client.
970  * @since_tizen 2.3
971  * @privlevel platform
972  * @privilege http://tizen.org/privilege/tethering.admin
973  * @param[in]  client  The handle of client
974  * @param[out]  type  The type of tethering
975  * @return  0 on success, otherwise a negative error value.
976  * @retval  #TETHERING_ERROR_NONE  Successful
977  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
978  * @see  tethering_usb_get_connected_client()
979  * @see  tethering_connection_state_changed_cb()
980  */
981 int tethering_client_get_tethering_type(tethering_client_h client, tethering_type_e *type);
982
983 /**
984  * @brief Gets the name of a client.
985  * @since_tizen 2.3
986  * @privlevel platform
987  * @privilege http://tizen.org/privilege/tethering.admin
988  * @remarks @a name must be released using free().
989  * @param[in]  client  The client handle
990  * @param[out]  name  The name of the client
991  * @return  0 on success, otherwise a negative error value
992  * @retval  #TETHERING_ERROR_NONE  Successful
993  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
994  * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
995  * @see  tethering_usb_get_connected_client()
996  * @see  tethering_connection_state_changed_cb()
997  */
998 int tethering_client_get_name(tethering_client_h client, char **name);
999
1000 /**
1001  * @brief Gets the IP address of a client.
1002  * @since_tizen 2.3
1003  * @privlevel platform
1004  * @privilege http://tizen.org/privilege/tethering.admin
1005  * @remarks @a ip_address must be released using free().
1006  * @param[in]  client  The client handle
1007  * @param[in]  address_family  The address family of IP address. Currently, #TETHERING_ADDRESS_FAMILY_IPV4 is only supported
1008  * @param[out]  ip_address  The IP address
1009  * @return  0 on success, otherwise a negative error value
1010  * @retval  #TETHERING_ERROR_NONE  Successful
1011  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
1012  * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
1013  * @see  tethering_usb_get_connected_client()
1014  * @see  tethering_connection_state_changed_cb()
1015  */
1016 int tethering_client_get_ip_address(tethering_client_h client, tethering_address_family_e address_family, char **ip_address);
1017
1018 /**
1019  * @brief Gets the MAC address of a client such as "FC:A1:3E:D6:B1:B1".
1020  * @since_tizen 2.3
1021  * @privlevel platform
1022  * @privilege http://tizen.org/privilege/tethering.admin
1023  * @remarks @a mac_address must be released using free().
1024  * @param[in]  client  The client handle
1025  * @param[out]  mac_address  The MAC address
1026  * @return  0 on success, otherwise a negative error value
1027  * @retval  #TETHERING_ERROR_NONE  Successful
1028  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
1029  * @retval  #TETHERING_ERROR_OUT_OF_MEMORY  Out of memory
1030  * @see  tethering_usb_get_connected_client()
1031  * @see  tethering_connection_state_changed_cb()
1032  */
1033 int tethering_client_get_mac_address(tethering_client_h client, char **mac_address);
1034
1035 /**
1036  * @brief Gets the connection time of a client.
1037  * @since_tizen 2.3
1038  * @privlevel platform
1039  * @privilege http://tizen.org/privilege/tethering.admin
1040  * @param[in] client The client handle
1041  * @param[out]  time  The connected time of the client
1042  * @return  0 on success, otherwise a negative error value
1043  * @retval  #TETHERING_ERROR_NONE  Successful
1044  * @retval  #TETHERING_ERROR_INVALID_PARAMETER  Invalid parameter
1045  * @see  tethering_usb_get_connected_client()
1046  * @see  tethering_connection_state_changed_cb()
1047  */
1048 int tethering_client_get_time(tethering_client_h client, time_t *timestamp);
1049
1050 /**
1051  * @}
1052  */
1053
1054
1055 #ifdef __cplusplus
1056  }
1057 #endif
1058
1059 #endif /* __TIZEN_NETWORK_TETHERING_H__ */
1060
1061