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.
18 #ifndef __TIZEN_NETWORK_CONNECTION_PROFILE_H__
19 #define __TIZEN_NETWORK_CONNECTION_PROFILE_H__
31 * @file connection_profile.h
36 * @addtogroup CAPI_NETWORK_CONNECTION_WIFI_PROFILE_MODULE
42 * @brief Enumeration for security type of Wi-Fi.
43 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
46 CONNECTION_WIFI_SECURITY_TYPE_NONE = 0, /**< Security disabled */
47 CONNECTION_WIFI_SECURITY_TYPE_WEP = 1, /**< WEP */
48 CONNECTION_WIFI_SECURITY_TYPE_WPA_PSK = 2, /**< WPA-PSK */
49 CONNECTION_WIFI_SECURITY_TYPE_WPA2_PSK = 3, /**< WPA2-PSK */
50 CONNECTION_WIFI_SECURITY_TYPE_EAP = 4, /**< EAP */
51 } connection_wifi_security_type_e;
55 * @brief Enumeration for encryption modes.
56 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
59 CONNECTION_WIFI_ENCRYPTION_TYPE_NONE = 0, /**< Encryption disabled */
60 CONNECTION_WIFI_ENCRYPTION_TYPE_WEP = 1, /**< WEP */
61 CONNECTION_WIFI_ENCRYPTION_TYPE_TKIP = 2, /**< TKIP */
62 CONNECTION_WIFI_ENCRYPTION_TYPE_AES = 3, /**< AES */
63 CONNECTION_WIFI_ENCRYPTION_TYPE_TKIP_AES_MIXED = 4, /**< TKIP and AES are both supported */
64 } connection_wifi_encryption_type_e;
73 * @addtogroup CAPI_NETWORK_CONNECTION_CELLULAR_PROFILE_MODULE
79 * @brief Enumeration for cellular service type.
80 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
83 CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN = 0, /**< Unknown */
84 CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET = 1, /**< Internet */
85 CONNECTION_CELLULAR_SERVICE_TYPE_MMS = 2, /**< MMS */
86 CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET = 3, /**< Prepaid internet */
87 CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_MMS = 4, /**< Prepaid MMS */
88 CONNECTION_CELLULAR_SERVICE_TYPE_TETHERING = 5, /**< Tethering */
89 CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION = 6, /**< Specific application */
90 } connection_cellular_service_type_e;
94 * @brief Enumeration for cellular pdn type.
96 * @remarks Use CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPV6 instead of
97 * CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPv6.
100 CONNECTION_CELLULAR_PDN_TYPE_UNKNOWN = 0, /**> Unknown */
101 CONNECTION_CELLULAR_PDN_TYPE_IPV4 = 1, /**> IPv4 */
102 CONNECTION_CELLULAR_PDN_TYPE_IPV6 = 2, /**> IPv6 */
103 CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPv6 = 3, /**> IPv4 and IPv6 (Deprecated since 4.0)*/
104 CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPV6 = 4, /**> IPv4 and IPv6 (Since 4.0)*/
105 } connection_cellular_pdn_type_e;
109 * @brief Enumeration for cellular authentication type.
110 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
113 CONNECTION_CELLULAR_AUTH_TYPE_NONE = 0, /**< No authentication */
114 CONNECTION_CELLULAR_AUTH_TYPE_PAP = 1, /**< PAP authentication */
115 CONNECTION_CELLULAR_AUTH_TYPE_CHAP = 2, /**< CHAP authentication */
116 } connection_cellular_auth_type_e;
125 * @addtogroup CAPI_NETWORK_CONNECTION_PROFILE_MODULE
131 * @brief The profile handle.
132 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
134 typedef void* connection_profile_h;
138 * @brief Enumeration for profile state type.
139 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
142 CONNECTION_PROFILE_STATE_DISCONNECTED = 0, /**< Disconnected state */
143 CONNECTION_PROFILE_STATE_ASSOCIATION = 1, /**< Association state */
144 CONNECTION_PROFILE_STATE_CONFIGURATION = 2, /**< Configuration state */
145 CONNECTION_PROFILE_STATE_CONNECTED = 3, /**< Connected state */
146 } connection_profile_state_e;
150 * @brief Enumeration for address family.
151 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
154 CONNECTION_ADDRESS_FAMILY_IPV4 = 0, /**< IPV4 Address type */
155 CONNECTION_ADDRESS_FAMILY_IPV6 = 1, /**< IPV6 Address type */
156 } connection_address_family_e;
160 * @brief Enumeration for IP configuration type.
161 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
167 CONNECTION_IP_CONFIG_TYPE_NONE = 0,
170 * Manual IP configuration
172 CONNECTION_IP_CONFIG_TYPE_STATIC = 1,
175 * Config IP using DHCP client
177 CONNECTION_IP_CONFIG_TYPE_DYNAMIC = 2,
180 * Config IP from Auto IP pool (169.254/16). Later with DHCP client, if available
182 CONNECTION_IP_CONFIG_TYPE_AUTO = 3,
185 * Indicates an IP address that can not be modified
187 CONNECTION_IP_CONFIG_TYPE_FIXED = 4,
189 } connection_ip_config_type_e;
193 * @brief Enumeration for proxy method type.
194 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
200 CONNECTION_PROXY_TYPE_DIRECT = 0,
203 * Auto configuration (use PAC file). If URL property is not set,
204 * DHCP/WPAD auto-discover will be tried
206 CONNECTION_PROXY_TYPE_AUTO = 1,
209 * Manual configuration
211 CONNECTION_PROXY_TYPE_MANUAL = 2,
213 } connection_proxy_type_e;
216 * @brief Enumeration for DNS configuration type.
220 CONNECTION_DNS_CONFIG_TYPE_NONE = 0, /**< Not defined */
221 CONNECTION_DNS_CONFIG_TYPE_STATIC = 1, /**< Manual DNS configuration */
222 CONNECTION_DNS_CONFIG_TYPE_DYNAMIC = 2, /**< Config DNS using DHCP client */
223 } connection_dns_config_type_e;
226 * @brief Enumeration for network connection type.
227 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
230 CONNECTION_PROFILE_TYPE_CELLULAR = 0, /**< Cellular type */
231 CONNECTION_PROFILE_TYPE_WIFI = 1, /**< Wi-Fi type */
232 CONNECTION_PROFILE_TYPE_ETHERNET = 2, /**< Ethernet type */
233 CONNECTION_PROFILE_TYPE_BT = 3, /**< Bluetooth type */
234 } connection_profile_type_e;
238 * @brief Creates a profile handle.
239 * @details The profile name, which you get from connection_profile_get_name()
240 * will include the keyword you set.
241 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
243 * @privilege %http://tizen.org/privilege/network.get
244 * @remarks You must release @a profile using connection_profile_destroy().
245 * @param[in] type The type of profile \n
246 * #CONNECTION_PROFILE_TYPE_CELLULAR and #CONNECTION_PROFILE_TYPE_WIFI are supported
247 * @param[in] keyword The keyword included in profile name
248 * @param[out] profile The handle of the profile
249 * @return @c 0 on success,
250 * otherwise negative error value
251 * @retval #CONNECTION_ERROR_NONE Successful
252 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
253 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
254 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
255 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
256 * @see connection_profile_destroy()
257 * @see connection_profile_get_name()
259 int connection_profile_create(connection_profile_type_e type,
260 const char *keyword, connection_profile_h *profile);
264 * @brief Destroys a profile handle.
265 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
266 * @param[out] profile The handle to the profile
267 * @return @c 0 on success,
268 * otherwise a negative error value
269 * @retval #CONNECTION_ERROR_NONE Successful
270 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
271 * @see connection_profile_create()
273 int connection_profile_destroy(connection_profile_h profile);
277 * @brief Clones a profile handle.
279 * @remarks You must release @a cloned_profile using connection_profile_destroy().
280 * @param[out] cloned_profile The handle of the cloned profile
281 * @param[in] origin_profile The handle of the origin profile
282 * @return @c 0 on success,
283 * otherwise a negative error value
284 * @retval #CONNECTION_ERROR_NONE Successful
285 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
286 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
287 * @see connection_profile_destroy()
289 int connection_profile_clone(connection_profile_h *cloned_profile,
290 connection_profile_h origin_profile);
294 * @brief Gets the profile ID.
295 * @details The separate profiles can have the same name.
296 * So, you must use this API instead of connection_profile_get_name()
297 * if you want to get the unique identification.
298 * In case you create a profile, this value will be determined when you add the profile.
299 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
300 * @remarks You must release @a profile_id using free().
301 * @param[in] profile The profile handle
302 * @param[out] profile_id The ID of the profile
303 * @return @c 0 on success,
304 * otherwise a negative error value
305 * @retval #CONNECTION_ERROR_NONE Successful
306 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
307 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
308 * @see connection_profile_get_name()
309 * @see connection_add_profile()
311 int connection_profile_get_id(connection_profile_h profile, char **profile_id);
315 * @brief Gets the profile name.
316 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
317 * @remarks You must release @a profile_name using free().
318 * @param[in] profile The profile handle
319 * @param[out] profile_name The name of the profile
320 * @return @c 0 on success,
321 * otherwise a negative error value
322 * @retval #CONNECTION_ERROR_NONE Successful
323 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
324 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
325 * @see connection_profile_get_id()
327 int connection_profile_get_name(connection_profile_h profile, char **profile_name);
331 * @brief Gets the network type.
332 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
333 * @param[in] profile The profile handle
334 * @param[out] type The type of the profile
335 * @return @c 0 on success,
336 * otherwise a negative error value
337 * @retval #CONNECTION_ERROR_NONE Successful
338 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
339 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
341 int connection_profile_get_type(connection_profile_h profile, connection_profile_type_e *type);
345 * @brief Gets the name of the network interface, e.g. eth0 and pdp0.
346 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
347 * @remarks You must release @a interface_name using free().
348 * @param[in] profile The profile handle
349 * @param[out] interface_name The name of the network interface
350 * @return @c 0 on success,
351 * otherwise a negative error value
352 * @retval #CONNECTION_ERROR_NONE Successful
353 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
354 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
356 int connection_profile_get_network_interface_name(connection_profile_h profile,
357 char **interface_name);
361 * @brief Refreshes the profile information.
362 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
364 * @privilege %http://tizen.org/privilege/network.get
365 * @remarks You should call this function in order to get the current information
366 * because the profile information can be changed.
367 * @param[in] profile The profile handle
368 * @return @c 0 on success,
369 * otherwise a negative error value
370 * @retval #CONNECTION_ERROR_NONE Successful
371 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
372 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
373 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
374 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
376 int connection_profile_refresh(connection_profile_h profile);
380 * @brief Gets the network type.
381 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
382 * @param[in] profile The profile handle
383 * @param[out] state The state of the profile
384 * @return @c 0 on success,
385 * otherwise a negative error value
386 * @retval #CONNECTION_ERROR_NONE Successful
387 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
388 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
390 int connection_profile_get_state(connection_profile_h profile,
391 connection_profile_state_e *state);
395 * @brief Gets the IP config type.
396 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
397 * @param[in] profile The profile handle
398 * @param[in] address_family The address family
399 * @param[out] type The type of the IP config
400 * @return @c 0 on success,
401 * otherwise a negative error value
402 * @retval #CONNECTION_ERROR_NONE Successful
403 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
404 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
406 int connection_profile_get_ip_config_type(connection_profile_h profile,
407 connection_address_family_e address_family, connection_ip_config_type_e *type);
411 * @brief Gets the IP address.
412 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
413 * @remarks You must release @a ip_address using free().
414 * @param[in] profile The profile handle
415 * @param[in] address_family The address family
416 * @param[out] ip_address The IP address
417 * @return @c 0 on success,
418 * otherwise a negative error value
419 * @retval #CONNECTION_ERROR_NONE Successful
420 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
421 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
422 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
423 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
425 int connection_profile_get_ip_address(connection_profile_h profile,
426 connection_address_family_e address_family, char **ip_address);
430 * @brief Gets the Subnet Mask.
431 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
432 * @remarks You must release @a subnet_mask using free().
433 * This function is supported only for IPv4 address family.
434 * @param[in] profile The profile handle
435 * @param[in] address_family The address family
436 * @param[out] subnet_mask The subnet mask
437 * @return @c 0 on success,
438 * otherwise a negative error value
439 * @retval #CONNECTION_ERROR_NONE Successful
440 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
441 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
442 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
443 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
445 int connection_profile_get_subnet_mask(connection_profile_h profile,
446 connection_address_family_e address_family, char **subnet_mask);
450 * @brief Gets the Gateway address.
451 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
452 * @remarks You must release @a gateway_address using free().
453 * @param[in] profile The profile handle
454 * @param[in] address_family The address family
455 * @param[out] gateway_address The gateway address
456 * @return @c 0 on success,
457 * otherwise a negative error value
458 * @retval #CONNECTION_ERROR_NONE Successful
459 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
460 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
461 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
462 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
464 int connection_profile_get_gateway_address(connection_profile_h profile,
465 connection_address_family_e address_family, char **gateway_address);
468 * @brief Gets the DHCP Server address.
470 * @remarks You must release @a dhcp_server using free().
471 * This function is supported only for IPv4 address family.
472 * @param[in] profile The profile handle
473 * @param[in] address_family The address family
474 * @param[out] dhcp_server The DHCP Server address
475 * @return @c 0 on success, otherwise a negative error value
476 * @retval #CONNECTION_ERROR_NONE Successful
477 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
478 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
479 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
480 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
482 int connection_profile_get_dhcp_server_address(connection_profile_h profile,
483 connection_address_family_e address_family, char **dhcp_server);
486 * @brief Gets the DNS address.
487 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
488 * @remarks The allowance of the DNS address is @c 2. You must release @a dns_address using free().
489 * @param[in] profile The profile handle
490 * @param[in] order The order of DNS address \n
491 * It starts from 1, which means first DNS address
492 * @param[in] address_family The address family
493 * @param[out] dns_address The DNS address
494 * @return @c 0 on success,
495 * otherwise a negative error value
496 * @retval #CONNECTION_ERROR_NONE Successful
497 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
498 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
499 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
500 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
502 int connection_profile_get_dns_address(connection_profile_h profile,
503 int order, connection_address_family_e address_family, char **dns_address);
507 * @brief Gets the Proxy type.
508 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
509 * @param[in] profile The profile handle
510 * @param[out] type The type of the proxy
511 * @return @c 0 on success,
512 * otherwise a negative error value
513 * @retval #CONNECTION_ERROR_NONE Successful
514 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
515 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
517 int connection_profile_get_proxy_type(connection_profile_h profile,
518 connection_proxy_type_e *type);
522 * @brief Gets the Proxy address.
523 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
524 * @remarks You must release @a proxy_address using free().
525 * @param[in] profile The profile handle
526 * @param[in] address_family The address family
527 * @param[out] proxy_address The proxy address
528 * @return @c 0 on success,
529 * otherwise a negative error value
530 * @retval #CONNECTION_ERROR_NONE Successful
531 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
532 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
533 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
534 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
536 int connection_profile_get_proxy_address(connection_profile_h profile,
537 connection_address_family_e address_family, char **proxy_address);
541 * @brief Sets the IP config type.
542 * @details If you set IP config type to #CONNECTION_IP_CONFIG_TYPE_STATIC,
543 * then IP address, Gateway and Subnet mask will be set to the initial value "0.0.0.0".
544 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
545 * @param[in] profile The profile handle
546 * @param[in] address_family The address family
547 * @param[in] type The type of the IP config
548 * @return @c 0 on success,
549 * otherwise a negative error value
550 * @retval #CONNECTION_ERROR_NONE Successful
551 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
552 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
554 int connection_profile_set_ip_config_type(connection_profile_h profile,
555 connection_address_family_e address_family, connection_ip_config_type_e type);
559 * @brief Sets the IP address.
560 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
561 * @remarks You must release @a ip_address using free().
562 * @param[in] profile The profile handle
563 * @param[in] address_family The address family
564 * @param[in] ip_address The IP address \n
565 * If you set this value to @c NULL, then the existing value will be deleted
566 * @return @c 0 on success,
567 * otherwise a negative error value
568 * @retval #CONNECTION_ERROR_NONE Successful
569 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
570 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
571 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
572 * @see connection_update_profile()
574 int connection_profile_set_ip_address(connection_profile_h profile,
575 connection_address_family_e address_family, const char *ip_address);
579 * @brief Sets the Subnet Mask.
580 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
581 * @remarks You must release @a subnet_mask using free().
582 * This function is supported only for IPv4 address family.
583 * @param[in] profile The profile handle
584 * @param[in] address_family The address family
585 * @param[in] subnet_mask The subnet mask \n
586 * If you set this value to @c NULL, then the existing value will be deleted
587 * @return @c 0 on success,
588 * otherwise a negative error value
589 * @retval #CONNECTION_ERROR_NONE Successful
590 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
591 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
592 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
593 * @see connection_update_profile()
595 int connection_profile_set_subnet_mask(connection_profile_h profile,
596 connection_address_family_e address_family, const char *subnet_mask);
600 * @brief Sets the Gateway address.
601 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
602 * @remarks You must release @a gateway_address using free().
603 * @param[in] profile The profile handle
604 * @param[in] address_family The address family
605 * @param[in] gateway_address The gateway address \n
606 * If you set this value to @c NULL, then the existing value will be deleted
607 * @return @c 0 on success,
608 * otherwise a negative error value
609 * @retval #CONNECTION_ERROR_NONE Successful
610 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
611 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
612 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
613 * @see connection_update_profile()
615 int connection_profile_set_gateway_address(connection_profile_h profile,
616 connection_address_family_e address_family, const char *gateway_address);
620 * @brief Sets the DNS address.
621 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
622 * @remarks The allowance of the DNS address is @c 2.
623 * @remarks You must release @a dns_address using free().
624 * @param[in] profile The profile handle
625 * @param[in] order The order of the DNS address \n
626 * It starts from @c 1, which means first DNS address
627 * @param[in] address_family The address family
628 * @param[in] dns_address The DNS address \n
629 * If you set this value to NULL then the existing value will be deleted
630 * @return @c 0 on success,
631 * otherwise a negative error value
632 * @retval #CONNECTION_ERROR_NONE Successful
633 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
634 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
635 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
636 * @see connection_update_profile()
638 int connection_profile_set_dns_address(connection_profile_h profile,
639 int order, connection_address_family_e address_family, const char *dns_address);
643 * @brief Sets the Proxy type.
644 * @details If you set the Proxy type to #CONNECTION_PROXY_TYPE_AUTO or
645 * #CONNECTION_PROXY_TYPE_MANUAL, then Proxy will be restored.
646 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
647 * @param[in] profile The profile handle
648 * @param[in] type The type of the proxy
649 * @return @c 0 on success,
650 * otherwise a negative error value
651 * @retval #CONNECTION_ERROR_NONE Successful
652 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
653 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
654 * @see connection_update_profile()
656 int connection_profile_set_proxy_type(connection_profile_h profile,
657 connection_proxy_type_e type);
661 * @brief Sets the Proxy address.
662 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
663 * @remarks You must release @a proxy_address using free().
664 * @param[in] profile The profile handle
665 * @param[in] address_family The address family
666 * @param[in] proxy_address The proxy address \n
667 * If you set this value to @c NULL, then the existing value will be deleted
668 * @return @c 0 on success,
669 * otherwise a negative error value
670 * @retval #CONNECTION_ERROR_NONE Successful
671 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
672 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
673 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
674 * @see connection_update_profile()
676 int connection_profile_set_proxy_address(connection_profile_h profile,
677 connection_address_family_e address_family, const char *proxy_address);
681 * @brief Called when the state of the profile is changed.
682 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
683 * @param[in] state The state
684 * @param[in] user_data The user data passed from the callback registration function
685 * @see connection_profile_set_state_changed_cb()
686 * @see connection_profile_unset_state_changed_cb()
688 typedef void(*connection_profile_state_changed_cb)(connection_profile_state_e state,
693 * @brief Registers the callback that is called when the state of profile is changed.
694 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
695 * @param[in] profile The profile handle
696 * @param[in] callback The callback function to be called
697 * @param[in] user_data The user data passed to the callback function
698 * @return @c 0 on success,
699 * otherwise a negative error value
700 * @retval #CONNECTION_ERROR_NONE Successful
701 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
702 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
703 * @post connection_opened_cb() is invoked when the state of profile is changed.
704 * @see connection_profile_state_changed_cb()
705 * @see connection_profile_unset_state_changed_cb()
707 int connection_profile_set_state_changed_cb(connection_profile_h profile,
708 connection_profile_state_changed_cb callback, void *user_data);
712 * @brief Unregisters the callback that is called when the state of profile is changed.
713 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
714 * @param[in] profile The profile handle
715 * @return @c 0 on success,
716 * otherwise a negative error value
717 * @retval #CONNECTION_ERROR_NONE Successful
718 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
719 * @see connection_profile_state_changed_cb()
720 * @see connection_profile_set_state_changed_cb()
722 int connection_profile_unset_state_changed_cb(connection_profile_h profile);
725 * @brief Gets the IPv6 network state.
727 * @param[in] profile The profile handle
728 * @param[out] state The profile state
729 * @return 0 on success, otherwise negative error value
730 * @retval #CONNECTION_ERROR_NONE Successful
731 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
732 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
733 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
735 int connection_profile_get_ipv6_state(connection_profile_h profile,
736 connection_profile_state_e *state);
739 * @brief Sets the DNS config type.
741 * @param[in] profile The profile handle
742 * @param[in] address_family The address family
743 * @param[in] type The DNS config type
744 * @return 0 on success, otherwise negative error value
745 * @retval #CONNECTION_ERROR_NONE Successful
746 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
747 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
748 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
750 int connection_profile_set_dns_config_type(connection_profile_h profile,
751 connection_address_family_e address_family, connection_dns_config_type_e type);
754 * @brief Gets the DNS config type.
756 * @param[in] profile The profile handle
757 * @param[in] address_family The address family
758 * @param[out] type The DNS config type
759 * @return 0 on success, otherwise negative error value
760 * @retval #CONNECTION_ERROR_NONE Successful
761 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
762 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
763 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
765 int connection_profile_get_dns_config_type(connection_profile_h profile,
766 connection_address_family_e address_family, connection_dns_config_type_e *type);
769 * @brief Gets the network prefix length.
771 * @param[in] profile The profile handle
772 * @param[in] address_family The address family
773 * @param[out] prefix_len The network prefix length \n
774 * In case of IPv4, it means netmask length
775 * (also called a prefix, e.g. 8, 16, 24, 32)
776 * @return 0 on success, otherwise negative error value.
777 * @retval #CONNECTION_ERROR_NONE Successful
778 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
779 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
780 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
782 int connection_profile_get_prefix_length(connection_profile_h profile,
783 connection_address_family_e address_family, int *prefix_len);
786 * @brief Sets the network prefix length.
788 * @param[in] profile The profile handle
789 * @param[in] address_family The address family
790 * @param[in] prefix_len The network prefix length
791 * In case of IPv4, it means netmask length
792 * (also called a prefix, e.g. 8, 16, 24, 32)
793 * @return 0 on success, otherwise negative error value
794 * @retval #CONNECTION_ERROR_NONE Successful
795 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
796 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
797 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
798 * @see connection_update_profile()
800 int connection_profile_set_prefix_length(connection_profile_h profile,
801 connection_address_family_e address_family, int prefix_len);
809 * @addtogroup CAPI_NETWORK_CONNECTION_WIFI_PROFILE_MODULE
815 * @brief Gets the ESSID (Extended Service Set Identifier).
816 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
817 * @remarks You must release @a essid using free().
818 * @param[in] profile The profile handle
819 * @param[out] essid The ESSID
820 * @return @c 0 on success,
821 * otherwise a negative error value
822 * @retval #CONNECTION_ERROR_NONE Successful
823 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
824 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
825 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
827 int connection_profile_get_wifi_essid(connection_profile_h profile, char **essid);
831 * @brief Gets the BSSID (Basic Service Set Identifier).
832 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
833 * @remarks You must release @a bssid using free().
834 * @param[in] profile The profile handle
835 * @param[out] bssid The BSSID
836 * @return @c 0 on success,
837 * otherwise a negative error value
838 * @retval #CONNECTION_ERROR_NONE Successful
839 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
840 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
841 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
843 int connection_profile_get_wifi_bssid(connection_profile_h profile, char **bssid);
847 * @brief Gets the RSSI.
848 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
849 * @param[in] profile The profile handle
850 * @param[out] rssi The RSSI
851 * @return @c 0 on success,
852 * otherwise a negative error value
853 * @retval #CONNECTION_ERROR_NONE Successful
854 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
855 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
857 int connection_profile_get_wifi_rssi(connection_profile_h profile, int *rssi);
861 * @brief Gets the frequency (MHz).
862 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
863 * @param[in] profile The profile handle
864 * @param[out] frequency The frequency
865 * @return @c 0 on success,
866 * otherwise a negative error value
867 * @retval #CONNECTION_ERROR_NONE Successful
868 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
869 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
871 int connection_profile_get_wifi_frequency(connection_profile_h profile, int *frequency);
875 * @brief Gets the max speed (Mbps).
876 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
877 * @param[in] profile The profile handle
878 * @param[out] max_speed The max speed
879 * @return @c 0 on success,
880 * otherwise a negative error value
881 * @retval #CONNECTION_ERROR_NONE Successful
882 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
883 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
885 int connection_profile_get_wifi_max_speed(connection_profile_h profile, int *max_speed);
889 * @brief Gets the security mode of Wi-Fi.
890 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
891 * @param[in] profile The profile handle
892 * @param[out] type The type of Wi-Fi security
893 * @return @c 0 on success,
894 * otherwise a negative error value
895 * @retval #CONNECTION_ERROR_NONE Successful
896 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
897 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
898 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
900 int connection_profile_get_wifi_security_type(connection_profile_h profile,
901 connection_wifi_security_type_e *type);
905 * @brief Gets the security mode of Wi-Fi.
906 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
907 * @param[in] profile The profile handle
908 * @param[out] type The type of Wi-Fi security
909 * @return @c 0 on success,
910 * otherwise a negative error value
911 * @retval #CONNECTION_ERROR_NONE Successful
912 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
913 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
914 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
916 int connection_profile_get_wifi_encryption_type(connection_profile_h profile,
917 connection_wifi_encryption_type_e *type);
921 * @brief Checks whether passphrase is required.
922 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
923 * @remarks This function is not valid if security type is #CONNECTION_WIFI_SECURITY_TYPE_EAP.
924 * @param[in] profile The profile handle
925 * @param[out] required @c true if a passphrase is required,
926 * otherwise @c false if a passphrase is not required
927 * @return @c 0 on success,
928 * otherwise a negative error value
929 * @retval #CONNECTION_ERROR_NONE Successful
930 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
931 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
933 int connection_profile_is_wifi_passphrase_required(connection_profile_h profile,
938 * @brief Sets the passphrase of the Wi-Fi WPA.
939 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
940 * @remarks You must release @a passphrase using free().
941 * @param[in] profile The profile handle
942 * @param[in] passphrase The passphrase of Wi-Fi security
943 * @return @c 0 on success,
944 * otherwise a negative error value
945 * @retval #CONNECTION_ERROR_NONE Successful
946 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
947 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
948 * @see connection_update_profile()
950 int connection_profile_set_wifi_passphrase(connection_profile_h profile,
951 const char *passphrase);
955 * @brief Checks whether the WPS (Wi-Fi Protected Setup) is supported.
956 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
957 * @remarks If WPS is supported, you can connect the access point with WPS by wifi_connect_with_wps().
958 * @param[in] profile The profile handle
959 * @param[out] supported @c true if WPS is supported,
960 * otherwise @c false if WPS is not supported
961 * @return @c 0 on success,
962 * otherwise negative error value
963 * @retval #CONNECTION_ERROR_NONE Successful
964 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
965 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
967 int connection_profile_is_wifi_wps_supported(connection_profile_h profile,
977 * @addtogroup CAPI_NETWORK_CONNECTION_CELLULAR_PROFILE_MODULE
983 * @brief Gets the service type.
984 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
985 * @param[in] profile The profile handle
986 * @param[out] type The type of the cellular service
987 * @return @c 0 on success,
988 * otherwise a negative error value
989 * @retval #CONNECTION_ERROR_NONE Successful
990 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
991 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
992 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
994 int connection_profile_get_cellular_service_type(connection_profile_h profile,
995 connection_cellular_service_type_e *type);
999 * @brief Gets the APN (access point name).
1000 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1001 * @remarks You must release @a apn using free().
1002 * @param[in] profile The profile handle
1003 * @param[out] apn The name of the APN
1004 * @return @c 0 on success,
1005 * otherwise a negative error value
1006 * @retval #CONNECTION_ERROR_NONE Successful
1007 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1008 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
1009 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1011 int connection_profile_get_cellular_apn(connection_profile_h profile, char **apn);
1015 * @brief Gets the authentication information.
1016 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1017 * @remarks You must release @a user_name and @a password using free().
1018 * @param[in] profile The profile handle
1019 * @param[out] type The type of the authentication
1020 * @param[out] user_name The user name
1021 * @param[out] password The password
1022 * @return @c 0 on success,
1023 * otherwise a negative error value
1024 * @retval #CONNECTION_ERROR_NONE Successful
1025 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1026 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
1027 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1028 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1030 int connection_profile_get_cellular_auth_info(connection_profile_h profile,
1031 connection_cellular_auth_type_e *type, char **user_name, char **password);
1035 * @brief Gets the home URL.
1036 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1037 * @remarks You must release @a home_url using free().
1038 * @param[in] profile The profile handle
1039 * @param[out] home_url The home URL
1040 * @return @c 0 on success,
1041 * otherwise a negative error value
1042 * @retval #CONNECTION_ERROR_NONE Successful
1043 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1044 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
1045 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1047 int connection_profile_get_cellular_home_url(connection_profile_h profile,
1052 * @brief Gets the cellular pdn type.
1054 * @param[in] profile The profile handle
1055 * @param[out] type The cellular pdn type
1056 * @return @c 0 on success,
1057 * otherwise negative error value
1058 * @retval #CONNECTION_ERROR_NONE Successful
1059 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1060 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1061 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not suppported
1063 int connection_profile_get_cellular_pdn_type(connection_profile_h profile,
1064 connection_cellular_pdn_type_e *type);
1068 * @brief Gets the cellular roam pdn type.
1070 * @param[in] profile The profile handle
1071 * @param[out] type The cellular pdn type
1072 * @return @c 0 on success,
1073 * otherwise negative error value
1074 * @retval #CONNECTION_ERROR_NONE Successful
1075 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1076 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1077 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1079 int connection_profile_get_cellular_roam_pdn_type(connection_profile_h profile,
1080 connection_cellular_pdn_type_e *type);
1084 * @brief Checks whether the connection is in roaming state.
1085 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1086 * @param[in] profile The profile handle
1087 * @param[out] is_roaming @c true if the cellular is roaming,
1088 * otherwise @c false if it is not roaming
1089 * @return @c 0 on success,
1090 * otherwise a negative error value
1091 * @retval #CONNECTION_ERROR_NONE Successful
1092 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1093 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1095 int connection_profile_is_cellular_roaming(connection_profile_h profile,
1100 * @brief Checks whether the profile is hidden.
1101 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1102 * @param[in] profile The profile handle
1103 * @param[out] is_hidden @c true if the profile is in hidden,
1104 * otherwise @c false if the profile is not hidden
1105 * @return @c 0 on success,
1106 * otherwise a negative error value
1107 * @retval #CONNECTION_ERROR_NONE Successful
1108 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1109 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1111 int connection_profile_is_cellular_hidden(connection_profile_h profile,
1116 * @brief Checks whether the profile is editable.
1117 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1118 * @param[in] profile The profile handle
1119 * @param[out] is_editable @c true if the profile is editable,
1120 * otherwise @c false if the profile is not editable
1121 * @return @c 0 on success,
1122 * otherwise a negative error value
1123 * @retval #CONNECTION_ERROR_NONE Successful
1124 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1125 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1127 int connection_profile_is_cellular_editable(connection_profile_h profile,
1132 * @brief Checks whether the profile is default.
1133 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1134 * @param[in] profile The profile handle
1135 * @param[out] is_default @c true if the profile is default,
1136 * otherwise @c false if the profile is not default
1137 * @return @c 0 on success,
1138 * otherwise a negative error value
1139 * @retval #CONNECTION_ERROR_NONE Successful
1140 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1141 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1143 int connection_profile_is_cellular_default(connection_profile_h profile,
1148 * @brief Sets the service type.
1149 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1150 * @param[in] profile The profile handle
1151 * @param[in] service_type The type of cellular service
1152 * @return @c 0 on success,
1153 * otherwise a negative error value
1154 * @retval #CONNECTION_ERROR_NONE Successful
1155 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1156 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1157 * @see connection_update_profile()
1159 int connection_profile_set_cellular_service_type(connection_profile_h profile,
1160 connection_cellular_service_type_e service_type);
1164 * @brief Sets the APN (Access Point Name).
1165 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1166 * @remarks You must release @a spn using free().
1167 * @param[in] profile The profile handle
1168 * @param[in] apn The name of APN
1169 * @return @c 0 on success,
1170 * otherwise a negative error value
1171 * @retval #CONNECTION_ERROR_NONE Successful
1172 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1173 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1174 * @see connection_update_profile()
1176 int connection_profile_set_cellular_apn(connection_profile_h profile, const char *apn);
1180 * @brief Sets the Authentication information.
1181 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1182 * @remarks You must release @a user_name using free().
1183 * @param[in] profile The profile handle
1184 * @param[in] type The type of the authentication
1185 * @param[in] user_name The user name
1186 * @param[in] password The password
1187 * @return @c 0 on success,
1188 * otherwise a negative error value
1189 * @retval #CONNECTION_ERROR_NONE Successful
1190 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1191 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1192 * @see connection_update_profile()
1194 int connection_profile_set_cellular_auth_info(connection_profile_h profile,
1195 connection_cellular_auth_type_e type, const char *user_name, const char *password);
1199 * @brief Sets the home URL.
1200 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1201 * @remarks You must release @a home_url using free().
1202 * @param[in] profile The profile handle
1203 * @param[in] home_url The home URL
1204 * @return @c 0 on success,
1205 * otherwise a negative error value
1206 * @retval #CONNECTION_ERROR_NONE Successful
1207 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1208 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1209 * @see connection_update_profile()
1211 int connection_profile_set_cellular_home_url(connection_profile_h profile,
1212 const char *home_url);
1216 * @brief Sets the cellular pdn type.
1218 * @param[in] profile The profile handle
1219 * @param[in] type The cellular pdn type
1220 * @return @c 0 on success,
1221 * otherwise negative error value
1222 * @retval #CONNECTION_ERROR_NONE Successful
1223 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1224 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1225 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1227 int connection_profile_set_cellular_pdn_type(connection_profile_h profile,
1228 connection_cellular_pdn_type_e type);
1232 * @brief Sets the cellular roam pdn type.
1234 * @param[in] profile The profile handle
1235 * @param[in] type The cellular pdn type
1236 * @return @c 0 on success,
1237 * otherwise negative error value
1238 * @retval #CONNECTION_ERROR_NONE Successful
1239 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1240 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1241 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1243 int connection_profile_set_cellular_roam_pdn_type(connection_profile_h profile,
1244 connection_cellular_pdn_type_e type);
1259 #endif /* __TIZEN_NETWORK_CONNECTION_PROFILE_H__ */