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 DHCP lease duration.
488 * @param[in] profile The profile handle
489 * @param[in] address_family The address family
490 * @param[out] dhcp_lease_duration The DHCP lease duration in seconds
491 * @return @c 0 on success, otherwise a negative error value
492 * @retval #CONNECTION_ERROR_NONE Successful
493 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
494 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
495 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
496 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
498 int connection_profile_get_dhcp_lease_duration(connection_profile_h profile,
499 connection_address_family_e address_family, int *dhcp_lease_duration);
502 * @brief Gets the DNS address.
503 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
504 * @remarks The allowance of the DNS address is @c 2. You must release @a dns_address using free().
505 * @param[in] profile The profile handle
506 * @param[in] order The order of DNS address \n
507 * It starts from 1, which means first DNS address
508 * @param[in] address_family The address family
509 * @param[out] dns_address The DNS address
510 * @return @c 0 on success,
511 * otherwise a negative error value
512 * @retval #CONNECTION_ERROR_NONE Successful
513 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
514 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
515 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
516 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
518 int connection_profile_get_dns_address(connection_profile_h profile,
519 int order, connection_address_family_e address_family, char **dns_address);
523 * @brief Gets the Proxy type.
524 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
525 * @param[in] profile The profile handle
526 * @param[out] type The type of the proxy
527 * @return @c 0 on success,
528 * otherwise a negative error value
529 * @retval #CONNECTION_ERROR_NONE Successful
530 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
531 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
533 int connection_profile_get_proxy_type(connection_profile_h profile,
534 connection_proxy_type_e *type);
538 * @brief Gets the Proxy address.
539 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
540 * @remarks You must release @a proxy_address using free().
541 * @param[in] profile The profile handle
542 * @param[in] address_family The address family
543 * @param[out] proxy_address The proxy address
544 * @return @c 0 on success,
545 * otherwise a negative error value
546 * @retval #CONNECTION_ERROR_NONE Successful
547 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
548 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
549 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
550 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
552 int connection_profile_get_proxy_address(connection_profile_h profile,
553 connection_address_family_e address_family, char **proxy_address);
557 * @brief Sets the IP config type.
558 * @details If you set IP config type to #CONNECTION_IP_CONFIG_TYPE_STATIC,
559 * then IP address, Gateway and Subnet mask will be set to the initial value "0.0.0.0".
560 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
561 * @param[in] profile The profile handle
562 * @param[in] address_family The address family
563 * @param[in] type The type of the IP config
564 * @return @c 0 on success,
565 * otherwise a negative error value
566 * @retval #CONNECTION_ERROR_NONE Successful
567 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
568 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
570 int connection_profile_set_ip_config_type(connection_profile_h profile,
571 connection_address_family_e address_family, connection_ip_config_type_e type);
575 * @brief Sets the IP address.
576 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
577 * @remarks You must release @a ip_address using free().
578 * @param[in] profile The profile handle
579 * @param[in] address_family The address family
580 * @param[in] ip_address The IP address \n
581 * If you set this value to @c NULL, then the existing value will be deleted
582 * @return @c 0 on success,
583 * otherwise a negative error value
584 * @retval #CONNECTION_ERROR_NONE Successful
585 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
586 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
587 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
588 * @see connection_update_profile()
590 int connection_profile_set_ip_address(connection_profile_h profile,
591 connection_address_family_e address_family, const char *ip_address);
595 * @brief Sets the Subnet Mask.
596 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
597 * @remarks You must release @a subnet_mask using free().
598 * This function is supported only for IPv4 address family.
599 * @param[in] profile The profile handle
600 * @param[in] address_family The address family
601 * @param[in] subnet_mask The subnet mask \n
602 * If you set this value to @c NULL, then the existing value will be deleted
603 * @return @c 0 on success,
604 * otherwise a negative error value
605 * @retval #CONNECTION_ERROR_NONE Successful
606 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
607 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
608 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
609 * @see connection_update_profile()
611 int connection_profile_set_subnet_mask(connection_profile_h profile,
612 connection_address_family_e address_family, const char *subnet_mask);
616 * @brief Sets the Gateway address.
617 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
618 * @remarks You must release @a gateway_address using free().
619 * @param[in] profile The profile handle
620 * @param[in] address_family The address family
621 * @param[in] gateway_address The gateway address \n
622 * If you set this value to @c NULL, then the existing value will be deleted
623 * @return @c 0 on success,
624 * otherwise a negative error value
625 * @retval #CONNECTION_ERROR_NONE Successful
626 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
627 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
628 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
629 * @see connection_update_profile()
631 int connection_profile_set_gateway_address(connection_profile_h profile,
632 connection_address_family_e address_family, const char *gateway_address);
636 * @brief Sets the DNS address.
637 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
638 * @remarks The allowance of the DNS address is @c 2.
639 * @remarks You must release @a dns_address using free().
640 * @param[in] profile The profile handle
641 * @param[in] order The order of the DNS address \n
642 * It starts from @c 1, which means first DNS address
643 * @param[in] address_family The address family
644 * @param[in] dns_address The DNS address \n
645 * If you set this value to NULL then the existing value will be deleted
646 * @return @c 0 on success,
647 * otherwise a negative error value
648 * @retval #CONNECTION_ERROR_NONE Successful
649 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
650 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
651 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
652 * @see connection_update_profile()
654 int connection_profile_set_dns_address(connection_profile_h profile,
655 int order, connection_address_family_e address_family, const char *dns_address);
659 * @brief Sets the Proxy type.
660 * @details If you set the Proxy type to #CONNECTION_PROXY_TYPE_AUTO or
661 * #CONNECTION_PROXY_TYPE_MANUAL, then Proxy will be restored.
662 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
663 * @param[in] profile The profile handle
664 * @param[in] type The type of the proxy
665 * @return @c 0 on success,
666 * otherwise a negative error value
667 * @retval #CONNECTION_ERROR_NONE Successful
668 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
669 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
670 * @see connection_update_profile()
672 int connection_profile_set_proxy_type(connection_profile_h profile,
673 connection_proxy_type_e type);
677 * @brief Sets the Proxy address.
678 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
679 * @remarks You must release @a proxy_address using free().
680 * @param[in] profile The profile handle
681 * @param[in] address_family The address family
682 * @param[in] proxy_address The proxy address \n
683 * If you set this value to @c NULL, then the existing value will be deleted
684 * @return @c 0 on success,
685 * otherwise a negative error value
686 * @retval #CONNECTION_ERROR_NONE Successful
687 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
688 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
689 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
690 * @see connection_update_profile()
692 int connection_profile_set_proxy_address(connection_profile_h profile,
693 connection_address_family_e address_family, const char *proxy_address);
697 * @brief Called when the state of the profile is changed.
698 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
699 * @param[in] state The state
700 * @param[in] user_data The user data passed from the callback registration function
701 * @see connection_profile_set_state_changed_cb()
702 * @see connection_profile_unset_state_changed_cb()
704 typedef void(*connection_profile_state_changed_cb)(connection_profile_state_e state,
709 * @brief Registers the callback that is called when the state of profile is changed.
710 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
711 * @param[in] profile The profile handle
712 * @param[in] callback The callback function to be called
713 * @param[in] user_data The user data passed to the callback function
714 * @return @c 0 on success,
715 * otherwise a negative error value
716 * @retval #CONNECTION_ERROR_NONE Successful
717 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
718 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
719 * @post connection_opened_cb() is invoked when the state of profile is changed.
720 * @see connection_profile_state_changed_cb()
721 * @see connection_profile_unset_state_changed_cb()
723 int connection_profile_set_state_changed_cb(connection_profile_h profile,
724 connection_profile_state_changed_cb callback, void *user_data);
728 * @brief Unregisters the callback that is called when the state of profile is changed.
729 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
730 * @param[in] profile The profile handle
731 * @return @c 0 on success,
732 * otherwise a negative error value
733 * @retval #CONNECTION_ERROR_NONE Successful
734 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
735 * @see connection_profile_state_changed_cb()
736 * @see connection_profile_set_state_changed_cb()
738 int connection_profile_unset_state_changed_cb(connection_profile_h profile);
741 * @brief Gets the IPv6 network state.
743 * @param[in] profile The profile handle
744 * @param[out] state The profile state
745 * @return 0 on success, otherwise negative error value
746 * @retval #CONNECTION_ERROR_NONE Successful
747 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
748 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
749 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
751 int connection_profile_get_ipv6_state(connection_profile_h profile,
752 connection_profile_state_e *state);
755 * @brief Sets the DNS config type.
757 * @param[in] profile The profile handle
758 * @param[in] address_family The address family
759 * @param[in] type The DNS config type
760 * @return 0 on success, otherwise negative error value
761 * @retval #CONNECTION_ERROR_NONE Successful
762 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
763 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
764 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
766 int connection_profile_set_dns_config_type(connection_profile_h profile,
767 connection_address_family_e address_family, connection_dns_config_type_e type);
770 * @brief Gets the DNS config type.
772 * @param[in] profile The profile handle
773 * @param[in] address_family The address family
774 * @param[out] type The DNS config type
775 * @return 0 on success, otherwise negative error value
776 * @retval #CONNECTION_ERROR_NONE Successful
777 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
778 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
779 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
781 int connection_profile_get_dns_config_type(connection_profile_h profile,
782 connection_address_family_e address_family, connection_dns_config_type_e *type);
785 * @brief Gets the network prefix length.
787 * @param[in] profile The profile handle
788 * @param[in] address_family The address family
789 * @param[out] prefix_len The network prefix length \n
790 * In case of IPv4, it means netmask length
791 * (also called a prefix, e.g. 8, 16, 24, 32)
792 * @return 0 on success, otherwise negative error value.
793 * @retval #CONNECTION_ERROR_NONE Successful
794 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
795 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
796 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
798 int connection_profile_get_prefix_length(connection_profile_h profile,
799 connection_address_family_e address_family, int *prefix_len);
802 * @brief Sets the network prefix length.
804 * @param[in] profile The profile handle
805 * @param[in] address_family The address family
806 * @param[in] prefix_len The network prefix length
807 * In case of IPv4, it means netmask length
808 * (also called a prefix, e.g. 8, 16, 24, 32)
809 * @return 0 on success, otherwise negative error value
810 * @retval #CONNECTION_ERROR_NONE Successful
811 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
812 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
813 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
814 * @see connection_update_profile()
816 int connection_profile_set_prefix_length(connection_profile_h profile,
817 connection_address_family_e address_family, int prefix_len);
825 * @addtogroup CAPI_NETWORK_CONNECTION_WIFI_PROFILE_MODULE
831 * @brief Gets the ESSID (Extended Service Set Identifier).
832 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
833 * @remarks You must release @a essid using free().
834 * @param[in] profile The profile handle
835 * @param[out] essid The ESSID
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_essid(connection_profile_h profile, char **essid);
847 * @brief Gets the BSSID (Basic Service Set Identifier).
848 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
849 * @remarks You must release @a bssid using free().
850 * @param[in] profile The profile handle
851 * @param[out] bssid The BSSID
852 * @return @c 0 on success,
853 * otherwise a negative error value
854 * @retval #CONNECTION_ERROR_NONE Successful
855 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
856 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
857 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
859 int connection_profile_get_wifi_bssid(connection_profile_h profile, char **bssid);
863 * @brief Gets the RSSI.
864 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
865 * @param[in] profile The profile handle
866 * @param[out] rssi The RSSI
867 * @return @c 0 on success,
868 * otherwise a negative error value
869 * @retval #CONNECTION_ERROR_NONE Successful
870 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
871 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
873 int connection_profile_get_wifi_rssi(connection_profile_h profile, int *rssi);
877 * @brief Gets the frequency (MHz).
878 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
879 * @param[in] profile The profile handle
880 * @param[out] frequency The frequency
881 * @return @c 0 on success,
882 * otherwise a negative error value
883 * @retval #CONNECTION_ERROR_NONE Successful
884 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
885 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
887 int connection_profile_get_wifi_frequency(connection_profile_h profile, int *frequency);
891 * @brief Gets the max speed (Mbps).
892 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
893 * @param[in] profile The profile handle
894 * @param[out] max_speed The max speed
895 * @return @c 0 on success,
896 * otherwise a negative error value
897 * @retval #CONNECTION_ERROR_NONE Successful
898 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
899 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
901 int connection_profile_get_wifi_max_speed(connection_profile_h profile, int *max_speed);
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_security_type(connection_profile_h profile,
917 connection_wifi_security_type_e *type);
921 * @brief Gets the security mode of Wi-Fi.
922 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
923 * @param[in] profile The profile handle
924 * @param[out] type The type of Wi-Fi security
925 * @return @c 0 on success,
926 * otherwise a negative error value
927 * @retval #CONNECTION_ERROR_NONE Successful
928 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
929 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
930 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
932 int connection_profile_get_wifi_encryption_type(connection_profile_h profile,
933 connection_wifi_encryption_type_e *type);
937 * @brief Checks whether passphrase is required.
938 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
939 * @remarks This function is not valid if security type is #CONNECTION_WIFI_SECURITY_TYPE_EAP.
940 * @param[in] profile The profile handle
941 * @param[out] required @c true if a passphrase is required,
942 * otherwise @c false if a passphrase is not required
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
949 int connection_profile_is_wifi_passphrase_required(connection_profile_h profile,
954 * @brief Sets the passphrase of the Wi-Fi WPA.
955 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
956 * @remarks You must release @a passphrase using free().
957 * @param[in] profile The profile handle
958 * @param[in] passphrase The passphrase of Wi-Fi security
959 * @return @c 0 on success,
960 * otherwise a negative error value
961 * @retval #CONNECTION_ERROR_NONE Successful
962 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
963 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
964 * @see connection_update_profile()
966 int connection_profile_set_wifi_passphrase(connection_profile_h profile,
967 const char *passphrase);
971 * @brief Checks whether the WPS (Wi-Fi Protected Setup) is supported.
972 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
973 * @remarks If WPS is supported, you can connect the access point with WPS by wifi_connect_with_wps().
974 * @param[in] profile The profile handle
975 * @param[out] supported @c true if WPS is supported,
976 * otherwise @c false if WPS is not supported
977 * @return @c 0 on success,
978 * otherwise negative error value
979 * @retval #CONNECTION_ERROR_NONE Successful
980 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
981 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
983 int connection_profile_is_wifi_wps_supported(connection_profile_h profile,
993 * @addtogroup CAPI_NETWORK_CONNECTION_CELLULAR_PROFILE_MODULE
999 * @brief Gets the service type.
1000 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1001 * @param[in] profile The profile handle
1002 * @param[out] type The type of the cellular service
1003 * @return @c 0 on success,
1004 * otherwise a negative error value
1005 * @retval #CONNECTION_ERROR_NONE Successful
1006 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1007 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1008 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1010 int connection_profile_get_cellular_service_type(connection_profile_h profile,
1011 connection_cellular_service_type_e *type);
1015 * @brief Gets the APN (access point name).
1016 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1017 * @remarks You must release @a apn using free().
1018 * @param[in] profile The profile handle
1019 * @param[out] apn The name of the APN
1020 * @return @c 0 on success,
1021 * otherwise a negative error value
1022 * @retval #CONNECTION_ERROR_NONE Successful
1023 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1024 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
1025 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1027 int connection_profile_get_cellular_apn(connection_profile_h profile, char **apn);
1031 * @brief Gets the authentication information.
1032 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1033 * @remarks You must release @a user_name and @a password using free().
1034 * @param[in] profile The profile handle
1035 * @param[out] type The type of the authentication
1036 * @param[out] user_name The user name
1037 * @param[out] password The password
1038 * @return @c 0 on success,
1039 * otherwise a negative error value
1040 * @retval #CONNECTION_ERROR_NONE Successful
1041 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1042 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
1043 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1044 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1046 int connection_profile_get_cellular_auth_info(connection_profile_h profile,
1047 connection_cellular_auth_type_e *type, char **user_name, char **password);
1051 * @brief Gets the home URL.
1052 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1053 * @remarks You must release @a home_url using free().
1054 * @param[in] profile The profile handle
1055 * @param[out] home_url The home URL
1056 * @return @c 0 on success,
1057 * otherwise a negative error value
1058 * @retval #CONNECTION_ERROR_NONE Successful
1059 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1060 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
1061 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1063 int connection_profile_get_cellular_home_url(connection_profile_h profile,
1068 * @brief Gets the cellular 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 suppported
1079 int connection_profile_get_cellular_pdn_type(connection_profile_h profile,
1080 connection_cellular_pdn_type_e *type);
1084 * @brief Gets the cellular roam pdn type.
1086 * @param[in] profile The profile handle
1087 * @param[out] type The cellular pdn type
1088 * @return @c 0 on success,
1089 * otherwise negative error value
1090 * @retval #CONNECTION_ERROR_NONE Successful
1091 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1092 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1093 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1095 int connection_profile_get_cellular_roam_pdn_type(connection_profile_h profile,
1096 connection_cellular_pdn_type_e *type);
1100 * @brief Checks whether the connection is in roaming state.
1101 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1102 * @param[in] profile The profile handle
1103 * @param[out] is_roaming @c true if the cellular is roaming,
1104 * otherwise @c false if it is not roaming
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_roaming(connection_profile_h profile,
1116 * @brief Checks whether the profile is hidden.
1117 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1118 * @param[in] profile The profile handle
1119 * @param[out] is_hidden @c true if the profile is in hidden,
1120 * otherwise @c false if the profile is not hidden
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_hidden(connection_profile_h profile,
1132 * @brief Checks whether the profile is editable.
1133 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1134 * @param[in] profile The profile handle
1135 * @param[out] is_editable @c true if the profile is editable,
1136 * otherwise @c false if the profile is not editable
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_editable(connection_profile_h profile,
1148 * @brief Checks whether the profile is default.
1149 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1150 * @param[in] profile The profile handle
1151 * @param[out] is_default @c true if the profile is default,
1152 * otherwise @c false if the profile is not default
1153 * @return @c 0 on success,
1154 * otherwise a negative error value
1155 * @retval #CONNECTION_ERROR_NONE Successful
1156 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1157 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1159 int connection_profile_is_cellular_default(connection_profile_h profile,
1164 * @brief Sets the service type.
1165 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1166 * @param[in] profile The profile handle
1167 * @param[in] service_type The type of cellular service
1168 * @return @c 0 on success,
1169 * otherwise a negative error value
1170 * @retval #CONNECTION_ERROR_NONE Successful
1171 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1172 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1173 * @see connection_update_profile()
1175 int connection_profile_set_cellular_service_type(connection_profile_h profile,
1176 connection_cellular_service_type_e service_type);
1180 * @brief Sets the APN (Access Point Name).
1181 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1182 * @remarks You must release @a spn using free().
1183 * @param[in] profile The profile handle
1184 * @param[in] apn The name of APN
1185 * @return @c 0 on success,
1186 * otherwise a negative error value
1187 * @retval #CONNECTION_ERROR_NONE Successful
1188 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1189 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1190 * @see connection_update_profile()
1192 int connection_profile_set_cellular_apn(connection_profile_h profile, const char *apn);
1196 * @brief Sets the Authentication information.
1197 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1198 * @remarks You must release @a user_name using free().
1199 * @param[in] profile The profile handle
1200 * @param[in] type The type of the authentication
1201 * @param[in] user_name The user name
1202 * @param[in] password The password
1203 * @return @c 0 on success,
1204 * otherwise a negative error value
1205 * @retval #CONNECTION_ERROR_NONE Successful
1206 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1207 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1208 * @see connection_update_profile()
1210 int connection_profile_set_cellular_auth_info(connection_profile_h profile,
1211 connection_cellular_auth_type_e type, const char *user_name, const char *password);
1215 * @brief Sets the home URL.
1216 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1217 * @remarks You must release @a home_url using free().
1218 * @param[in] profile The profile handle
1219 * @param[in] home_url The home URL
1220 * @return @c 0 on success,
1221 * otherwise a negative error value
1222 * @retval #CONNECTION_ERROR_NONE Successful
1223 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1224 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1225 * @see connection_update_profile()
1227 int connection_profile_set_cellular_home_url(connection_profile_h profile,
1228 const char *home_url);
1232 * @brief Sets the cellular 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_pdn_type(connection_profile_h profile,
1244 connection_cellular_pdn_type_e type);
1248 * @brief Sets the cellular roam pdn type.
1250 * @param[in] profile The profile handle
1251 * @param[in] type The cellular pdn type
1252 * @return @c 0 on success,
1253 * otherwise negative error value
1254 * @retval #CONNECTION_ERROR_NONE Successful
1255 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1256 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1257 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1259 int connection_profile_set_cellular_roam_pdn_type(connection_profile_h profile,
1260 connection_cellular_pdn_type_e type);
1275 #endif /* __TIZEN_NETWORK_CONNECTION_PROFILE_H__ */