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 * @param[in] profile The profile handle
434 * @param[in] address_family The address family
435 * @param[out] subnet_mask The subnet mask
436 * @return @c 0 on success,
437 * otherwise a negative error value
438 * @retval #CONNECTION_ERROR_NONE Successful
439 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
440 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
441 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
442 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
444 int connection_profile_get_subnet_mask(connection_profile_h profile,
445 connection_address_family_e address_family, char **subnet_mask);
449 * @brief Gets the Gateway address.
450 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
451 * @remarks You must release @a gateway_address using free().
452 * @param[in] profile The profile handle
453 * @param[in] address_family The address family
454 * @param[out] gateway_address The gateway address
455 * @return @c 0 on success,
456 * otherwise a negative error value
457 * @retval #CONNECTION_ERROR_NONE Successful
458 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
459 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
460 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
461 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
463 int connection_profile_get_gateway_address(connection_profile_h profile,
464 connection_address_family_e address_family, char **gateway_address);
467 * @brief Gets the DHCP Server address.
469 * @remarks You must release @a dhcp_server using free().
470 * This function is supported only for IPv4 address family.
471 * @param[in] profile The profile handle
472 * @param[in] address_family The address family
473 * @param[out] dhcp_server The DHCP Server address
474 * @return @c 0 on success, otherwise a negative error value
475 * @retval #CONNECTION_ERROR_NONE Successful
476 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
477 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
478 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
479 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
481 int connection_profile_get_dhcp_server_address(connection_profile_h profile,
482 connection_address_family_e address_family, char **dhcp_server);
485 * @brief Gets the DNS address.
486 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
487 * @remarks The allowance of the DNS address is @c 2. You must release @a dns_address using free().
488 * @param[in] profile The profile handle
489 * @param[in] order The order of DNS address \n
490 * It starts from 1, which means first DNS address
491 * @param[in] address_family The address family
492 * @param[out] dns_address The DNS address
493 * @return @c 0 on success,
494 * otherwise a negative error value
495 * @retval #CONNECTION_ERROR_NONE Successful
496 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
497 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
498 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
499 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
501 int connection_profile_get_dns_address(connection_profile_h profile,
502 int order, connection_address_family_e address_family, char **dns_address);
506 * @brief Gets the Proxy type.
507 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
508 * @param[in] profile The profile handle
509 * @param[out] type The type of the proxy
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_OPERATION_FAILED Operation failed
516 int connection_profile_get_proxy_type(connection_profile_h profile,
517 connection_proxy_type_e *type);
521 * @brief Gets the Proxy address.
522 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
523 * @remarks You must release @a proxy_address using free().
524 * @param[in] profile The profile handle
525 * @param[in] address_family The address family
526 * @param[out] proxy_address The proxy address
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_OUT_OF_MEMORY Out of memory
532 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
533 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
535 int connection_profile_get_proxy_address(connection_profile_h profile,
536 connection_address_family_e address_family, char **proxy_address);
540 * @brief Sets the IP config type.
541 * @details If you set IP config type to #CONNECTION_IP_CONFIG_TYPE_STATIC,
542 * then IP address, Gateway and Subnet mask will be set to the initial value "0.0.0.0".
543 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
544 * @param[in] profile The profile handle
545 * @param[in] address_family The address family
546 * @param[in] type The type of the IP config
547 * @return @c 0 on success,
548 * otherwise a negative error value
549 * @retval #CONNECTION_ERROR_NONE Successful
550 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
551 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
553 int connection_profile_set_ip_config_type(connection_profile_h profile,
554 connection_address_family_e address_family, connection_ip_config_type_e type);
558 * @brief Sets the IP address.
559 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
560 * @remarks You must release @a ip_address using free().
561 * @param[in] profile The profile handle
562 * @param[in] address_family The address family
563 * @param[in] ip_address The IP address \n
564 * If you set this value to @c NULL, then the existing value will be deleted
565 * @return @c 0 on success,
566 * otherwise a negative error value
567 * @retval #CONNECTION_ERROR_NONE Successful
568 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
569 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
570 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
571 * @see connection_update_profile()
573 int connection_profile_set_ip_address(connection_profile_h profile,
574 connection_address_family_e address_family, const char *ip_address);
578 * @brief Sets the Subnet Mask.
579 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
580 * @remarks You must release @a subnet_mask using free().
581 * @param[in] profile The profile handle
582 * @param[in] address_family The address family
583 * @param[in] subnet_mask The subnet mask \n
584 * If you set this value to @c NULL, then the existing value will be deleted
585 * @return @c 0 on success,
586 * otherwise a negative error value
587 * @retval #CONNECTION_ERROR_NONE Successful
588 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
589 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
590 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
591 * @see connection_update_profile()
593 int connection_profile_set_subnet_mask(connection_profile_h profile,
594 connection_address_family_e address_family, const char *subnet_mask);
598 * @brief Sets the Gateway address.
599 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
600 * @remarks You must release @a gateway_address using free().
601 * @param[in] profile The profile handle
602 * @param[in] address_family The address family
603 * @param[in] gateway_address The gateway address \n
604 * If you set this value to @c NULL, then the existing value will be deleted
605 * @return @c 0 on success,
606 * otherwise a negative error value
607 * @retval #CONNECTION_ERROR_NONE Successful
608 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
609 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
610 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
611 * @see connection_update_profile()
613 int connection_profile_set_gateway_address(connection_profile_h profile,
614 connection_address_family_e address_family, const char *gateway_address);
618 * @brief Sets the DNS address.
619 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
620 * @remarks The allowance of the DNS address is @c 2.
621 * @remarks You must release @a dns_address using free().
622 * @param[in] profile The profile handle
623 * @param[in] order The order of the DNS address \n
624 * It starts from @c 1, which means first DNS address
625 * @param[in] address_family The address family
626 * @param[in] dns_address The DNS address \n
627 * If you set this value to NULL then the existing value will be deleted
628 * @return @c 0 on success,
629 * otherwise a negative error value
630 * @retval #CONNECTION_ERROR_NONE Successful
631 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
632 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
633 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
634 * @see connection_update_profile()
636 int connection_profile_set_dns_address(connection_profile_h profile,
637 int order, connection_address_family_e address_family, const char *dns_address);
641 * @brief Sets the Proxy type.
642 * @details If you set the Proxy type to #CONNECTION_PROXY_TYPE_AUTO or
643 * #CONNECTION_PROXY_TYPE_MANUAL, then Proxy will be restored.
644 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
645 * @param[in] profile The profile handle
646 * @param[in] type The type of the proxy
647 * @return @c 0 on success,
648 * otherwise a negative error value
649 * @retval #CONNECTION_ERROR_NONE Successful
650 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
651 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
652 * @see connection_update_profile()
654 int connection_profile_set_proxy_type(connection_profile_h profile,
655 connection_proxy_type_e type);
659 * @brief Sets the Proxy address.
660 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
661 * @remarks You must release @a proxy_address using free().
662 * @param[in] profile The profile handle
663 * @param[in] address_family The address family
664 * @param[in] proxy_address The proxy address \n
665 * If you set this value to @c NULL, then the existing value will be deleted
666 * @return @c 0 on success,
667 * otherwise a negative error value
668 * @retval #CONNECTION_ERROR_NONE Successful
669 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
670 * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Not supported address family
671 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
672 * @see connection_update_profile()
674 int connection_profile_set_proxy_address(connection_profile_h profile,
675 connection_address_family_e address_family, const char *proxy_address);
679 * @brief Called when the state of the profile is changed.
680 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
681 * @param[in] state The state
682 * @param[in] user_data The user data passed from the callback registration function
683 * @see connection_profile_set_state_changed_cb()
684 * @see connection_profile_unset_state_changed_cb()
686 typedef void(*connection_profile_state_changed_cb)(connection_profile_state_e state,
691 * @brief Registers the callback that is called when the state of profile is changed.
692 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
693 * @param[in] profile The profile handle
694 * @param[in] callback The callback function to be called
695 * @param[in] user_data The user data passed to the callback function
696 * @return @c 0 on success,
697 * otherwise a negative error value
698 * @retval #CONNECTION_ERROR_NONE Successful
699 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
700 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
701 * @post connection_opened_cb() is invoked when the state of profile is changed.
702 * @see connection_profile_state_changed_cb()
703 * @see connection_profile_unset_state_changed_cb()
705 int connection_profile_set_state_changed_cb(connection_profile_h profile,
706 connection_profile_state_changed_cb callback, void *user_data);
710 * @brief Unregisters the callback that is called when the state of profile is changed.
711 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
712 * @param[in] profile The profile handle
713 * @return @c 0 on success,
714 * otherwise a negative error value
715 * @retval #CONNECTION_ERROR_NONE Successful
716 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
717 * @see connection_profile_state_changed_cb()
718 * @see connection_profile_set_state_changed_cb()
720 int connection_profile_unset_state_changed_cb(connection_profile_h profile);
723 * @brief Gets the IPv6 network state.
725 * @param[in] profile The profile handle
726 * @param[out] state The profile state
727 * @return 0 on success, otherwise negative error value
728 * @retval #CONNECTION_ERROR_NONE Successful
729 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
730 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
731 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
733 int connection_profile_get_ipv6_state(connection_profile_h profile,
734 connection_profile_state_e *state);
737 * @brief Sets the DNS config type.
739 * @param[in] profile The profile handle
740 * @param[in] address_family The address family
741 * @param[in] type The DNS config type
742 * @return 0 on success, otherwise negative error value
743 * @retval #CONNECTION_ERROR_NONE Successful
744 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
745 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
746 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
748 int connection_profile_set_dns_config_type(connection_profile_h profile,
749 connection_address_family_e address_family, connection_dns_config_type_e type);
752 * @brief Gets the DNS config type.
754 * @param[in] profile The profile handle
755 * @param[in] address_family The address family
756 * @param[out] type The DNS config type
757 * @return 0 on success, otherwise negative error value
758 * @retval #CONNECTION_ERROR_NONE Successful
759 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
760 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
761 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
763 int connection_profile_get_dns_config_type(connection_profile_h profile,
764 connection_address_family_e address_family, connection_dns_config_type_e *type);
767 * @brief Gets the network prefix length.
769 * @param[in] profile The profile handle
770 * @param[in] address_family The address family
771 * @param[out] prefix_len The network prefix length \n
772 * In case of IPv4, it means netmask length
773 * (also called a prefix, e.g. 8, 16, 24, 32)
774 * @return 0 on success, otherwise negative error value.
775 * @retval #CONNECTION_ERROR_NONE Successful
776 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
777 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
778 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
780 int connection_profile_get_prefix_length(connection_profile_h profile,
781 connection_address_family_e address_family, int *prefix_len);
784 * @brief Sets the network prefix length.
786 * @param[in] profile The profile handle
787 * @param[in] address_family The address family
788 * @param[in] prefix_len The network prefix length
789 * In case of IPv4, it means netmask length
790 * (also called a prefix, e.g. 8, 16, 24, 32)
791 * @return 0 on success, otherwise negative error value
792 * @retval #CONNECTION_ERROR_NONE Successful
793 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
794 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
795 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
796 * @see connection_update_profile()
798 int connection_profile_set_prefix_length(connection_profile_h profile,
799 connection_address_family_e address_family, int prefix_len);
807 * @addtogroup CAPI_NETWORK_CONNECTION_WIFI_PROFILE_MODULE
813 * @brief Gets the ESSID (Extended Service Set Identifier).
814 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
815 * @remarks You must release @a essid using free().
816 * @param[in] profile The profile handle
817 * @param[out] essid The ESSID
818 * @return @c 0 on success,
819 * otherwise a negative error value
820 * @retval #CONNECTION_ERROR_NONE Successful
821 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
822 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
823 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
825 int connection_profile_get_wifi_essid(connection_profile_h profile, char **essid);
829 * @brief Gets the BSSID (Basic Service Set Identifier).
830 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
831 * @remarks You must release @a bssid using free().
832 * @param[in] profile The profile handle
833 * @param[out] bssid The BSSID
834 * @return @c 0 on success,
835 * otherwise a negative error value
836 * @retval #CONNECTION_ERROR_NONE Successful
837 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
838 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
839 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
841 int connection_profile_get_wifi_bssid(connection_profile_h profile, char **bssid);
845 * @brief Gets the RSSI.
846 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
847 * @param[in] profile The profile handle
848 * @param[out] rssi The RSSI
849 * @return @c 0 on success,
850 * otherwise a negative error value
851 * @retval #CONNECTION_ERROR_NONE Successful
852 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
853 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
855 int connection_profile_get_wifi_rssi(connection_profile_h profile, int *rssi);
859 * @brief Gets the frequency (MHz).
860 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
861 * @param[in] profile The profile handle
862 * @param[out] frequency The frequency
863 * @return @c 0 on success,
864 * otherwise a negative error value
865 * @retval #CONNECTION_ERROR_NONE Successful
866 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
867 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
869 int connection_profile_get_wifi_frequency(connection_profile_h profile, int *frequency);
873 * @brief Gets the max speed (Mbps).
874 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
875 * @param[in] profile The profile handle
876 * @param[out] max_speed The max speed
877 * @return @c 0 on success,
878 * otherwise a negative error value
879 * @retval #CONNECTION_ERROR_NONE Successful
880 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
881 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
883 int connection_profile_get_wifi_max_speed(connection_profile_h profile, int *max_speed);
887 * @brief Gets the security mode of Wi-Fi.
888 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
889 * @param[in] profile The profile handle
890 * @param[out] type The type of Wi-Fi security
891 * @return @c 0 on success,
892 * otherwise a negative error value
893 * @retval #CONNECTION_ERROR_NONE Successful
894 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
895 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
896 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
898 int connection_profile_get_wifi_security_type(connection_profile_h profile,
899 connection_wifi_security_type_e *type);
903 * @brief Gets the security mode of Wi-Fi.
904 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
905 * @param[in] profile The profile handle
906 * @param[out] type The type of Wi-Fi security
907 * @return @c 0 on success,
908 * otherwise a negative error value
909 * @retval #CONNECTION_ERROR_NONE Successful
910 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
911 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
912 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
914 int connection_profile_get_wifi_encryption_type(connection_profile_h profile,
915 connection_wifi_encryption_type_e *type);
919 * @brief Checks whether passphrase is required.
920 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
921 * @remarks This function is not valid if security type is #CONNECTION_WIFI_SECURITY_TYPE_EAP.
922 * @param[in] profile The profile handle
923 * @param[out] required @c true if a passphrase is required,
924 * otherwise @c false if a passphrase is not required
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_NOT_SUPPORTED Not supported
931 int connection_profile_is_wifi_passphrase_required(connection_profile_h profile,
936 * @brief Sets the passphrase of the Wi-Fi WPA.
937 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
938 * @remarks You must release @a passphrase using free().
939 * @param[in] profile The profile handle
940 * @param[in] passphrase The passphrase of Wi-Fi security
941 * @return @c 0 on success,
942 * otherwise a negative error value
943 * @retval #CONNECTION_ERROR_NONE Successful
944 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
945 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
946 * @see connection_update_profile()
948 int connection_profile_set_wifi_passphrase(connection_profile_h profile,
949 const char *passphrase);
953 * @brief Checks whether the WPS (Wi-Fi Protected Setup) is supported.
954 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
955 * @remarks If WPS is supported, you can connect the access point with WPS by wifi_connect_with_wps().
956 * @param[in] profile The profile handle
957 * @param[out] supported @c true if WPS is supported,
958 * otherwise @c false if WPS is not supported
959 * @return @c 0 on success,
960 * otherwise 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
965 int connection_profile_is_wifi_wps_supported(connection_profile_h profile,
975 * @addtogroup CAPI_NETWORK_CONNECTION_CELLULAR_PROFILE_MODULE
981 * @brief Gets the service type.
982 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
983 * @param[in] profile The profile handle
984 * @param[out] type The type of the cellular service
985 * @return @c 0 on success,
986 * otherwise a negative error value
987 * @retval #CONNECTION_ERROR_NONE Successful
988 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
989 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
990 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
992 int connection_profile_get_cellular_service_type(connection_profile_h profile,
993 connection_cellular_service_type_e *type);
997 * @brief Gets the APN (access point name).
998 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
999 * @remarks You must release @a apn using free().
1000 * @param[in] profile The profile handle
1001 * @param[out] apn The name of the APN
1002 * @return @c 0 on success,
1003 * otherwise a negative error value
1004 * @retval #CONNECTION_ERROR_NONE Successful
1005 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1006 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
1007 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1009 int connection_profile_get_cellular_apn(connection_profile_h profile, char **apn);
1013 * @brief Gets the authentication information.
1014 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1015 * @remarks You must release @a user_name and @a password using free().
1016 * @param[in] profile The profile handle
1017 * @param[out] type The type of the authentication
1018 * @param[out] user_name The user name
1019 * @param[out] password The password
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_OPERATION_FAILED Operation failed
1026 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1028 int connection_profile_get_cellular_auth_info(connection_profile_h profile,
1029 connection_cellular_auth_type_e *type, char **user_name, char **password);
1033 * @brief Gets the home URL.
1034 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1035 * @remarks You must release @a home_url using free().
1036 * @param[in] profile The profile handle
1037 * @param[out] home_url The home URL
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_NOT_SUPPORTED Not supported
1045 int connection_profile_get_cellular_home_url(connection_profile_h profile,
1050 * @brief Gets the cellular pdn type.
1052 * @param[in] profile The profile handle
1053 * @param[out] type The cellular pdn type
1054 * @return @c 0 on success,
1055 * otherwise negative error value
1056 * @retval #CONNECTION_ERROR_NONE Successful
1057 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1058 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1059 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not suppported
1061 int connection_profile_get_cellular_pdn_type(connection_profile_h profile,
1062 connection_cellular_pdn_type_e *type);
1066 * @brief Gets the cellular roam pdn type.
1068 * @param[in] profile The profile handle
1069 * @param[out] type The cellular pdn type
1070 * @return @c 0 on success,
1071 * otherwise negative error value
1072 * @retval #CONNECTION_ERROR_NONE Successful
1073 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1074 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1075 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1077 int connection_profile_get_cellular_roam_pdn_type(connection_profile_h profile,
1078 connection_cellular_pdn_type_e *type);
1082 * @brief Checks whether the connection is in roaming state.
1083 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1084 * @param[in] profile The profile handle
1085 * @param[out] is_roaming @c true if the cellular is roaming,
1086 * otherwise @c false if it is not roaming
1087 * @return @c 0 on success,
1088 * otherwise a negative error value
1089 * @retval #CONNECTION_ERROR_NONE Successful
1090 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1091 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1093 int connection_profile_is_cellular_roaming(connection_profile_h profile,
1098 * @brief Checks whether the profile is hidden.
1099 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1100 * @param[in] profile The profile handle
1101 * @param[out] is_hidden @c true if the profile is in hidden,
1102 * otherwise @c false if the profile is not hidden
1103 * @return @c 0 on success,
1104 * otherwise a negative error value
1105 * @retval #CONNECTION_ERROR_NONE Successful
1106 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1107 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1109 int connection_profile_is_cellular_hidden(connection_profile_h profile,
1114 * @brief Checks whether the profile is editable.
1115 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1116 * @param[in] profile The profile handle
1117 * @param[out] is_editable @c true if the profile is editable,
1118 * otherwise @c false if the profile is not editable
1119 * @return @c 0 on success,
1120 * otherwise a negative error value
1121 * @retval #CONNECTION_ERROR_NONE Successful
1122 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1123 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1125 int connection_profile_is_cellular_editable(connection_profile_h profile,
1130 * @brief Checks whether the profile is default.
1131 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1132 * @param[in] profile The profile handle
1133 * @param[out] is_default @c true if the profile is default,
1134 * otherwise @c false if the profile is not default
1135 * @return @c 0 on success,
1136 * otherwise a negative error value
1137 * @retval #CONNECTION_ERROR_NONE Successful
1138 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1139 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1141 int connection_profile_is_cellular_default(connection_profile_h profile,
1146 * @brief Sets the service type.
1147 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1148 * @param[in] profile The profile handle
1149 * @param[in] service_type The type of cellular service
1150 * @return @c 0 on success,
1151 * otherwise a negative error value
1152 * @retval #CONNECTION_ERROR_NONE Successful
1153 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1154 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1155 * @see connection_update_profile()
1157 int connection_profile_set_cellular_service_type(connection_profile_h profile,
1158 connection_cellular_service_type_e service_type);
1162 * @brief Sets the APN (Access Point Name).
1163 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1164 * @remarks You must release @a spn using free().
1165 * @param[in] profile The profile handle
1166 * @param[in] apn The name of APN
1167 * @return @c 0 on success,
1168 * otherwise a negative error value
1169 * @retval #CONNECTION_ERROR_NONE Successful
1170 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1171 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1172 * @see connection_update_profile()
1174 int connection_profile_set_cellular_apn(connection_profile_h profile, const char *apn);
1178 * @brief Sets the Authentication information.
1179 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1180 * @remarks You must release @a user_name using free().
1181 * @param[in] profile The profile handle
1182 * @param[in] type The type of the authentication
1183 * @param[in] user_name The user name
1184 * @param[in] password The password
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_auth_info(connection_profile_h profile,
1193 connection_cellular_auth_type_e type, const char *user_name, const char *password);
1197 * @brief Sets the home URL.
1198 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1199 * @remarks You must release @a home_url using free().
1200 * @param[in] profile The profile handle
1201 * @param[in] home_url The home URL
1202 * @return @c 0 on success,
1203 * otherwise a negative error value
1204 * @retval #CONNECTION_ERROR_NONE Successful
1205 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1206 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1207 * @see connection_update_profile()
1209 int connection_profile_set_cellular_home_url(connection_profile_h profile,
1210 const char *home_url);
1214 * @brief Sets the cellular pdn type.
1216 * @param[in] profile The profile handle
1217 * @param[in] type The cellular pdn type
1218 * @return @c 0 on success,
1219 * otherwise negative error value
1220 * @retval #CONNECTION_ERROR_NONE Successful
1221 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1222 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1223 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1225 int connection_profile_set_cellular_pdn_type(connection_profile_h profile,
1226 connection_cellular_pdn_type_e type);
1230 * @brief Sets the cellular roam pdn type.
1232 * @param[in] profile The profile handle
1233 * @param[in] type The cellular pdn type
1234 * @return @c 0 on success,
1235 * otherwise negative error value
1236 * @retval #CONNECTION_ERROR_NONE Successful
1237 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
1238 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
1239 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
1241 int connection_profile_set_cellular_roam_pdn_type(connection_profile_h profile,
1242 connection_cellular_pdn_type_e type);
1257 #endif /* __TIZEN_NETWORK_CONNECTION_PROFILE_H__ */