2 * Copyright (c) 2011-2013 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_CONNECTION_EXTENSION_H__
18 #define __TIZEN_NETWORK_CONNECTION_EXTENSION_H__
20 #include "net_connection.h"
28 * @file connection_extension.h
32 * @brief Enumeration for extended network connection type.
36 CONNECTION_PROFILE_TYPE_MESH = CONNECTION_PROFILE_TYPE_BT + 1, /**< Wi-Fi Mesh type */
37 } connection_profile_type_extended_e;
40 * @brief Start TCP Dump.
42 * @param[in] connection The connection handle
44 * @return @c 0 on success, otherwise a negative error value
45 * @retval #CONNECTION_ERROR_NONE Successful
46 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
47 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
49 int connection_profile_start_tcpdump(connection_h connection);
52 * @brief Stop TCP Dump.
54 * @param[in] connection The connection handle
56 * @return @c 0 on success, otherwise a negative error value
57 * @retval #CONNECTION_ERROR_NONE Successful
58 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
59 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
61 int connection_profile_stop_tcpdump(connection_h connection);
64 * @brief Get TCP Dump Running Status.
66 * @param[in] connection The connection handle
67 * @param[out] tcpdump_state The state of tcpdump, tcpdump is in progress or not
69 * @return @c 0 on success, otherwise a negative error value
70 * @retval #CONNECTION_ERROR_NONE Successful
71 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
72 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
74 int connection_profile_get_tcpdump_state(connection_h connection, gboolean *tcpdump_state);
77 * @brief Creates a handle for managing data connections in C# API.
80 * @privilege %http://tizen.org/privilege/network.get
81 * @remarks You must release @a handle using connection_destroy_cs().
82 * @param[in] tid TID in C#
83 * @param[out] connection The connection handle
84 * @return @c 0 on success,
85 * otherwise a negative error value
86 * @retval #CONNECTION_ERROR_NONE Successful
87 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
88 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
89 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
90 * @see connection_destroy_cs()
92 int connection_create_cs(int tid, connection_h *connection);
95 * @brief Destroys the connection handle in C# API.
97 * @param[in] tid TID in C#
98 * @param[in] connection The connection handle
99 * @return @c 0 on success,
100 * otherwise a negative error value
101 * @retval #CONNECTION_ERROR_NONE Successful
102 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
103 * @see connection_create_cs()
105 int connection_destroy_cs(int tid, connection_h connection);
108 CONNECTION_MPTCP_DISABLE = 0, // disable
109 CONNECTION_MPTCP_ENABLE_ALL = 1, // enable
110 CONNECTION_MPTCP_ENABLE_SOCKOPT = 2, // enable if the MPTCP_ENABLED socket option is set
111 } connection_mptcp_enable_e;
114 CONNECTION_MPTCP_PM_UNKNOWN, // Unknown path manager
115 CONNECTION_MPTCP_PM_DEFAULT, // Default path manager - Do nothing
116 CONNECTION_MPTCP_PM_FULLMESH, // Full mesh of subflows
117 } connection_mptcp_path_manager_e;
120 CONNECTION_MPTCP_SCHEDULER_UNKNOWN, // Unknown scheduler
121 CONNECTION_MPTCP_SCHEDULER_DEFAULT, // Default scheduler
122 CONNECTION_MPTCP_SCHEDULER_ROUNDROBIN, // Round robin scheduler
123 } connection_mptcp_scheduler_e;
126 * @brief Check if Multipath TCP is supported
128 * @param[in] connection The connection handle
129 * @param[out] supported true if Multipath TCP is supported, false otherwise
130 * @return @c 0 on success,
131 * otherwise a negative error value
132 * @retval #CONNECTION_ERROR_NONE Successful
134 int connection_mptcp_is_supported(connection_h connection, bool* supported);
137 * @brief Enable Multipath TCP
139 * @param[in] connection The connection handle
140 * @param[in] enable The enabled value
141 * @return @c 0 on success,
142 * otherwise a negative error value
143 * @retval #CONNECTION_ERROR_NONE Successful
144 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
145 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
146 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
147 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
149 int connection_mptcp_enable(connection_h connection, connection_mptcp_enable_e enable);
152 * @brief Disable Multipath TCP
154 * @param[in] connection The connection handle
155 * @return @c 0 on success,
156 * otherwise a negative error value
157 * @retval #CONNECTION_ERROR_NONE Successful
158 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
159 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
160 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
161 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
163 int connection_mptcp_disable(connection_h connection);
166 * @brief Get the enabled value for Multipath TCP
168 * @param[in] connection The connection handle
169 * @param[out] enable The enabled value
170 * @return @c 0 on success,
171 * otherwise a negative error value
172 * @retval #CONNECTION_ERROR_NONE Successful
173 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
174 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
175 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
176 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
178 int connection_mptcp_get_enabled(connection_h connection, connection_mptcp_enable_e* enable);
181 * @brief Set the path manager of Multipath TCP
183 * @param[in] connection The connection handle
184 * @param[in] pm The path manager of Multipath TCP
185 * @return @c 0 on success,
186 * otherwise a negative error value
187 * @retval #CONNECTION_ERROR_NONE Successful
188 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
189 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
190 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
191 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
193 int connection_mptcp_set_path_manager(connection_h connection, connection_mptcp_path_manager_e pm);
196 * @brief Get the path manager of Multipath TCP
198 * @param[in] connection The connection handle
199 * @param[out] pm The path manager of Multipath TCP
200 * @return @c 0 on success,
201 * otherwise a negative error value
202 * @retval #CONNECTION_ERROR_NONE Successful
203 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
204 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
205 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
206 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
208 int connection_mptcp_get_path_manager(connection_h connection, connection_mptcp_path_manager_e* pm);
211 * @brief Set the path manager of Multipath TCP
213 * @param[in] connection The connection handle
214 * @param[in] scheduler The schedduler of Multipath TCP
215 * @return @c 0 on success,
216 * otherwise a negative error value
217 * @retval #CONNECTION_ERROR_NONE Successful
218 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
219 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
220 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
221 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
223 int connection_mptcp_set_scheduler(connection_h connection, connection_mptcp_scheduler_e scheduler);
226 * @brief Set the path manager of Multipath TCP
228 * @param[in] connection The connection handle
229 * @param[out] scheduler The schedduler of Multipath TCP
230 * @return @c 0 on success,
231 * otherwise a negative error value
232 * @retval #CONNECTION_ERROR_NONE Successful
233 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
234 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
235 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
236 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
238 int connection_mptcp_get_scheduler(connection_h connection, connection_mptcp_scheduler_e* scheduler);
241 * @brief Enumeration for EAP type.
245 CONNECTION_ETHERNET_EAP_TYPE_MD5 = 0, /**< EAP MD5 type */
246 CONNECTION_ETHERNET_EAP_TYPE_PEAP = 1, /**< EAP PEAP type */
247 CONNECTION_ETHERNET_EAP_TYPE_TLS = 2, /**< EAP TLS type */
248 CONNECTION_ETHERNET_EAP_TYPE_TTLS = 3, /**< EAP TTLS type */
249 CONNECTION_ETHERNET_EAP_TYPE_FAST = 4, /**< EAP FAST type */
250 } connection_ethernet_eap_type_e;
253 * @brief Enumeration for EAP phase2 authentication type.
257 CONNECTION_ETHERNET_EAP_AUTH_TYPE_NONE = 0, /**< EAP phase2 authentication none */
258 CONNECTION_ETHERNET_EAP_AUTH_TYPE_PAP = 1, /**< EAP phase2 authentication PAP */
259 CONNECTION_ETHERNET_EAP_AUTH_TYPE_MSCHAP = 2, /**< EAP phase2 authentication MSCHAP */
260 CONNECTION_ETHERNET_EAP_AUTH_TYPE_MSCHAPV2 = 3, /**< EAP phase2 authentication MSCHAPv2 */
261 CONNECTION_ETHERNET_EAP_AUTH_TYPE_GTC = 4, /**< EAP phase2 authentication GTC */
262 CONNECTION_ETHERNET_EAP_AUTH_TYPE_MD5 = 5, /**< EAP phase2 authentication MD5 */
263 } connection_ethernet_eap_auth_type_e;
266 * @brief Enumeration for PEAP version.
270 CONNECTION_ETHERNET_EAP_PEAP_VERSION_AUTO = 0, /**< PEAP version Automatic */
271 CONNECTION_ETHERNET_EAP_PEAP_VERSION_0 = 1, /**< PEAP version 0 */
272 CONNECTION_ETHERNET_EAP_PEAP_VERSION_1 = 2, /**< PEAP version 1 */
273 } connection_ethernet_eap_peap_version_e;
276 * @brief Called for each found ethernet configuration.
278 * @param[in] profile The profile handle
279 * @param[in] user_data The user data passed from the request function
280 * @return @c true to continue with the next iteration of the loop, otherwise @c false to break out of the loop \n
281 * @pre connection_profile_foreach_ethernet_eap_config() will invoke this callback.
282 * @see connection_profile_foreach_ethernet_eap_config()
284 typedef bool (*connection_profile_list_cb)(connection_profile_h profile, void *user_data);
287 * @brief Gets configurations of an ethernet.
290 * @privilege %http://tizen.org/privilege/network.profile
292 * @param[in] connection The connection handle
293 * @param[in] callback The callback to be called
294 * @param[in] user_data The user data passed to the callback function
295 * @return 0 on success, otherwise negative error value
296 * @retval #CONNECTION_ERROR_NONE Successful
297 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
298 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
299 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
300 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
301 * @pre This function needs connection_create() before use.
302 * @post This function invokes connection_profile_list_cb().
304 int connection_profile_foreach_ethernet_eap_config(connection_h connection,
305 connection_profile_list_cb callback, void *user_data);
308 * @brief Enable EAP over ethernet network
310 * @param[in] profile The profile handle
311 * @param[in] enable The flag to enable or disable EAP over ethernet
312 * @return @c 0 on success, otherwise a negative error value
313 * @retval #CONNECTION_ERROR_NONE Successful
314 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
315 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
316 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation Failed
317 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
319 int connection_profile_enable_ethernet_eap(connection_profile_h profile, bool enable);
322 * @brief Check if EAP over ethernet is enabled.
324 * @param[in] profile The profile handle
325 * @param[out] enabled true if EAP over ethernet is enabled, false otherwise
326 * @return @c 0 on success, otherwise a negative error value
327 * @retval #CONNECTION_ERROR_NONE Successful
328 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
329 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
330 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
331 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation Failed
332 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
334 int connection_profile_is_ethernet_eap_enabled(connection_profile_h profile, bool *enabled);
337 * @brief Sets the EAP type of ethernet.
339 * @param[in] profile The profile handle
340 * @param[in] type The type of EAP
341 * @return 0 on success, otherwise negative error value
342 * @retval #CONNECTION_ERROR_NONE Successful
343 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
344 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
345 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
347 int connection_profile_set_ethernet_eap_type(connection_profile_h profile, connection_ethernet_eap_type_e type);
350 * @brief Gets the EAP type of ethernet.
352 * @param[in] profile The profile handle
353 * @param[out] type The type of EAP
354 * @return 0 on success, otherwise negative error value
355 * @retval #CONNECTION_ERROR_NONE Successful
356 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
357 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
358 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
360 int connection_profile_get_ethernet_eap_type(connection_profile_h profile, connection_ethernet_eap_type_e *type);
363 * @brief Sets the type of EAP phase2 authentication of ethernet.
365 * @param[in] profile The profile handle
366 * @param[in] type The type of EAP phase2 authentication
367 * @return 0 on success, otherwise negative error value
368 * @retval #CONNECTION_ERROR_NONE Successful
369 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
370 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
371 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
372 * @pre This function needs connection_profile_set_ethernet_eap_type() before use.
374 int connection_profile_set_ethernet_eap_auth_type(connection_profile_h profile,
375 connection_ethernet_eap_auth_type_e type);
378 * @brief Gets the type of EAP phase2 authentication of ethernet.
380 * @param[in] profile The profile handle
381 * @param[out] type The type of EAP phase2 authentication
382 * @return 0 on success, otherwise negative error value
383 * @retval #CONNECTION_ERROR_NONE Successful
384 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
385 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
386 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
388 int connection_profile_get_ethernet_eap_auth_type(connection_profile_h profile,
389 connection_ethernet_eap_auth_type_e *type);
392 * @brief Sets anonymous identity of EAP over ethernet.
394 * @param[in] profile The profile handle
395 * @param[in] anonymous_identity The anonymous identity
396 * @return 0 on success, otherwise negative error value
397 * @retval #CONNECTION_ERROR_NONE Successful
398 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
399 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
400 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
402 int connection_profile_set_ethernet_eap_anonymous_identity(connection_profile_h profile,
403 const char *anonymous_identity);
406 * @brief Gets anonymous identity of EAP over ethernet.
408 * @remarks You must release @a anonymous_identity using free().
409 * @param[in] profile The profile handle
410 * @param[out] anonymous_identity The anonymous identity of ethernet.
411 * @return 0 on success, otherwise negative error value
412 * @retval #CONNECTION_ERROR_NONE Successful
413 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
414 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
415 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
416 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
418 int connection_profile_get_ethernet_eap_anonymous_identity(connection_profile_h profile,
419 char **anonymous_identity);
422 * @brief Sets the CA Certificate of EAP.
424 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS,
425 * #CONNECTION_ETHERNET_EAP_TYPE_TTLS or #CONNECTION_ETHERNET_EAP_TYPE_PEAP.
426 * @param[in] profile The profile handle
427 * @param[in] file The file path of CA Certificate
428 * @return 0 on success, otherwise negative error value
429 * @retval #CONNECTION_ERROR_NONE Successful
430 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
431 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
432 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
434 int connection_profile_set_ethernet_eap_ca_cert_file(connection_profile_h profile, const char *file);
437 * @brief Gets the CA Certificate of EAP.
439 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS,
440 * #CONNECTION_ETHERNET_EAP_TYPE_TTLS or #CONNECTION_ETHERNET_EAP_TYPE_PEAP.
441 * You must release @a file using free().
442 * @param[in] profile The profile handle
443 * @param[out] file The file path of CA Certificate
444 * @return 0 on success, otherwise negative error value
445 * @retval #CONNECTION_ERROR_NONE Successful
446 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
447 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
448 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
449 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
451 int connection_profile_get_ethernet_eap_ca_cert_file(connection_profile_h profile, char **file);
454 * @brief Sets the Client Certificate of EAP.
456 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
457 * @param[in] profile The profile handle
458 * @param[out] file The file path of Client Certificate
459 * @return 0 on success, otherwise negative error value
460 * @retval #CONNECTION_ERROR_NONE Successful
461 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
462 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
463 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
465 int connection_profile_set_ethernet_eap_client_cert_file(connection_profile_h profile, const char *file);
468 * @brief Gets the Client Certificate of EAP.
470 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
471 * You must release @a file using free().
472 * @param[in] profile The profile handle
473 * @param[out] file The file path of Client Certificate
474 * @return 0 on success, otherwise negative error value
475 * @retval #CONNECTION_ERROR_NONE Successful
476 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
477 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
478 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
479 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
481 int connection_profile_get_ethernet_eap_client_cert_file(connection_profile_h profile, char **file);
484 * @brief Sets the PAC file of EAP.
486 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_FAST.
487 * @param[in] profile The profile handle
488 * @param[out] file The path of PAC file
489 * @return 0 on success, otherwise negative error value
490 * @retval #CONNECTION_ERROR_NONE Successful
491 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
492 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
493 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
495 int connection_profile_set_ethernet_eap_pac_file(connection_profile_h profile, const char *file);
498 * @brief Gets the PAC file of EAP.
500 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_FAST.
501 * You must release @a file using free().
502 * @param[in] profile The profile handle
503 * @param[out] file The path of PAC file
504 * @return 0 on success, otherwise negative error value
505 * @retval #CONNECTION_ERROR_NONE Successful
506 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
507 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
508 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
509 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
511 int connection_profile_get_ethernet_eap_pac_file(connection_profile_h profile, char **file);
514 * @brief Sets the version of EAP-PEAP of ethernet.
516 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_PEAP.
517 * @param[in] profile The profile handle
518 * @param[in] version The version of EAP-PEAP.
519 * @return 0 on success, otherwise negative error value
520 * @retval #CONNECTION_ERROR_NONE Successful
521 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
522 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
523 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
525 int connection_profile_set_ethernet_eap_peap_version(connection_profile_h profile,
526 connection_ethernet_eap_peap_version_e version);
529 * @brief Gets the version of EAP-PEAP of ethernet.
531 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_PEAP.
532 * @param[in] profile The profile handle
533 * @param[out] version The version of EAP-PEAP.
534 * @return 0 on success, otherwise negative error value
535 * @retval #CONNECTION_ERROR_NONE Successful
536 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
537 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
538 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
540 int connection_profile_get_ethernet_eap_peap_version(connection_profile_h profile,
541 connection_ethernet_eap_peap_version_e *version);
544 * @brief Sets the identity of EAP over ethernet.
546 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
547 * @param[in] profile The profile handle
548 * @param[in] identity The identity
549 * @return 0 on success, otherwise negative error value
550 * @retval #CONNECTION_ERROR_NONE Successful
551 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
552 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
553 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
555 int connection_profile_set_ethernet_eap_identity(connection_profile_h profile, const char *identity);
558 * @brief Gets the identity of EAP over ethernet.
560 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
561 * You must release @a identity using free().
562 * @param[in] profile The profile handle
563 * @param[out] identity The identity of ethernet.
564 * @return 0 on success, otherwise negative error value
565 * @retval #CONNECTION_ERROR_NONE Successful
566 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
567 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
568 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
569 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
571 int connection_profile_get_ethernet_eap_identity(connection_profile_h profile, char **identity);
574 * @brief Sets the private key information of EAP.
576 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
577 * @param[in] profile The profile handle
578 * @param[in] file The file path of private key
579 * @param[in] password The password
580 * @return 0 on success, otherwise negative error value
581 * @retval #CONNECTION_ERROR_NONE Successful
582 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
583 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
584 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
586 int connection_profile_set_ethernet_eap_private_key_info(connection_profile_h profile,
587 const char *file, const char *password);
589 * @brief Gets the private key file of EAP.
591 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
592 * You must release @a file using free().
593 * @param[in] profile The profile handle
594 * @param[out] file The file path of private key
595 * @return 0 on success, otherwise negative error value
596 * @retval #CONNECTION_ERROR_NONE Successful
597 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
598 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
599 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
600 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
602 int connection_profile_get_ethernet_eap_private_key_file(connection_profile_h profile, char **file);
605 * @brief Sets the user name and passphrase of EAP.
607 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_MD5,
608 * #CONNECTION_ETHERNET_EAP_TYPE_PEAP, #CONNECTION_ETHERNET_EAP_TYPE_TTLS or #CONNECTION_ETHERNET_EAP_TYPE_FAST.
609 * @param[in] profile The profile handle
610 * @param[in] user_name The user name
611 * @param[in] password The password
612 * @return 0 on success, otherwise negative error value
613 * @retval #CONNECTION_ERROR_NONE Successful
614 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
615 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
616 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
618 int connection_profile_set_ethernet_eap_passphrase(connection_profile_h profile,
619 const char *user_name, const char *password);
622 * @brief Gets the username and password status of EAP.
624 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_MD5,
625 * #CONNECTION_ETHERNET_EAP_TYPE_PEAP, #CONNECTION_ETHERNET_EAP_TYPE_TTLS or #CONNECTION_ETHERNET_EAP_TYPE_FAST.
626 * You must release @a user_name using free().
627 * @param[in] profile The profile handle
628 * @param[out] user_name The user name
629 * @param[out] is_password_set @c true if password is set,
630 * otherwise @c false if password is not set.
631 * @return 0 on success, otherwise negative error value
632 * @retval #CONNECTION_ERROR_NONE Successful
633 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
634 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
635 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
636 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
638 int connection_profile_get_ethernet_eap_passphrase(connection_profile_h profile,
639 char **user_name, bool *is_password_set);
642 * @brief Removes configuration of ethernet profile.
645 * @privilege %http://tizen.org/privilege/network.profile
647 * @param[in] connection The connection handle
648 * @param[in] profile The profile handle
649 * @return 0 on success, otherwise negative error value
650 * @retval #CONNECTION_ERROR_NONE Successful
651 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
652 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
653 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
654 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
655 * @see connection_profile_create()
656 * @see connection_profile_foreach_ethernet_eap_config()
658 int connection_profile_remove_ethernet_eap_config(connection_h connection,
659 connection_profile_h profile);
662 * @brief Saves configuration of ethernet profile.
663 * @details When a configuration is changed, these changes will be not applied to the Connection Manager immediately.\n
664 * When you call this function, your changes affect the Connection Manager and the existing configuration is updated.
667 * @privilege %http://tizen.org/privilege/network.profile
669 * @param[in] connection The connection handle
670 * @param[in] profile The profile handle
671 * @return 0 on success, otherwise negative error value
672 * @retval #CONNECTION_ERROR_NONE Successful
673 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
674 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
675 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
676 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
677 * @see connection_profile_create()
679 int connection_profile_save_ethernet_eap_config(connection_h connection,
680 connection_profile_h profile);
683 * @brief Check if the time has been updated by NTP.
685 * @param[in] connection The connection handle
686 * @param[out] updated true if the system time is updated by NTP, false otherwise
687 * @return 0 on success, otherwise a negative error value
688 * @retval #CONNECTION_ERROR_NONE Successful
689 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
690 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
691 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
692 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
694 int connection_clock_is_updated(connection_h connection, bool *updated);
697 * @brief Sets NTP server.
699 * @param[in] connection The connection handle
700 * @param[in] ntp_server requested NTP server IP/URL
701 * @return 0 on success, otherwise a negative error value
702 * @retval #CONNECTION_ERROR_NONE Successful
703 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
704 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
705 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
706 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
708 int connection_set_ntp_server(connection_h connection, const char *ntp_server);
711 * @brief Get NTP server url.
713 * @remarks You must release @a ntp_server using free().
714 * @param[in] connection The connection handle
715 * @param[out] ntp_server The IP/URL of NTP Server
716 * @return 0 on success, otherwise a negative error value
717 * @retval #CONNECTION_ERROR_NONE Successful
718 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
719 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
720 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
721 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
723 int connection_get_ntp_server(connection_h connection, char **ntp_server);
726 * @brief Clear NTP server.
728 * @param[in] connection The connection handle
729 * @return 0 on success, otherwise a negative error value
730 * @retval #CONNECTION_ERROR_NONE Successful
731 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
732 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
733 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
734 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
736 int connection_clear_ntp_server(connection_h connection);
745 #endif /* __cplusplus */
748 #endif /* __TIZEN_NETWORK_CONNECTION_EXTENSION_H__ */