Add some APIs to get and set cellular pdn type
[platform/core/api/connection.git] / include / connection_profile.h
1 /*
2  * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __TIZEN_NETWORK_CONNECTION_PROFILE_H__
18 #define __TIZEN_NETWORK_CONNECTION_PROFILE_H__
19
20 #include <tizen.h>
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /**
27  * @file connection_profile.h
28  */
29
30 /**
31 * @addtogroup CAPI_NETWORK_CONNECTION_WIFI_PROFILE_MODULE
32 * @{
33 */
34
35 /**
36  * @brief Enumeration for security type of Wi-Fi.
37  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
38 */
39 typedef enum
40 {
41     CONNECTION_WIFI_SECURITY_TYPE_NONE = 0,  /**< Security disabled */
42     CONNECTION_WIFI_SECURITY_TYPE_WEP = 1,  /**< WEP */
43     CONNECTION_WIFI_SECURITY_TYPE_WPA_PSK = 2,  /**< WPA-PSK */
44     CONNECTION_WIFI_SECURITY_TYPE_WPA2_PSK = 3,  /**< WPA2-PSK */
45     CONNECTION_WIFI_SECURITY_TYPE_EAP = 4,  /**< EAP */
46 } connection_wifi_security_type_e;
47
48 /**
49  * @brief Enumeration for encryption modes.
50  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
51 */
52 typedef enum
53 {
54     CONNECTION_WIFI_ENCRYPTION_TYPE_NONE = 0,  /**< Encryption disabled */
55     CONNECTION_WIFI_ENCRYPTION_TYPE_WEP = 1,  /**< WEP */
56     CONNECTION_WIFI_ENCRYPTION_TYPE_TKIP = 2,  /**< TKIP */
57     CONNECTION_WIFI_ENCRYPTION_TYPE_AES = 3,  /**< AES */
58     CONNECTION_WIFI_ENCRYPTION_TYPE_TKIP_AES_MIXED = 4,  /**< TKIP and AES are both supported */
59 } connection_wifi_encryption_type_e;
60
61 /**
62 * @}
63 */
64
65
66 /**
67 * @addtogroup CAPI_NETWORK_CONNECTION_CELLULAR_PROFILE_MODULE
68 * @{
69 */
70
71 /**
72  * @brief Enumeration for cellular service type.
73  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
74 */
75 typedef enum
76 {
77     CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN = 0,  /**< Unknown */
78     CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET = 1,  /**< Internet */
79     CONNECTION_CELLULAR_SERVICE_TYPE_MMS = 2,  /**< MMS */
80     CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET = 3,  /**< Prepaid internet */
81     CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_MMS = 4,  /**< Prepaid MMS */
82     CONNECTION_CELLULAR_SERVICE_TYPE_TETHERING = 5,  /**< Tethering */
83     CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION = 6,  /**< Specific application */
84 } connection_cellular_service_type_e;
85
86 /**
87  * @brief Enumeration for cellular pdn type.
88  * @since_tizen 3.0
89  */
90 typedef enum
91 {
92     CONNECTION_CELLULAR_PDN_TYPE_UNKNOWN = 0,
93     CONNECTION_CELLULAR_PDN_TYPE_IPV4 = 1,
94     CONNECTION_CELLULAR_PDN_TYPE_IPV6 = 2,
95     CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPv6 = 3,
96 } connection_cellular_pdn_type_e;
97
98 /**
99  * @brief Enumeration for cellular authentication type.
100  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
101 */
102 typedef enum
103 {
104     CONNECTION_CELLULAR_AUTH_TYPE_NONE = 0,  /**< No authentication */
105     CONNECTION_CELLULAR_AUTH_TYPE_PAP  = 1,  /**< PAP authentication */
106     CONNECTION_CELLULAR_AUTH_TYPE_CHAP = 2,  /**< CHAP authentication */
107 } connection_cellular_auth_type_e;
108
109 /**
110 * @}
111 */
112
113
114 /**
115 * @addtogroup CAPI_NETWORK_CONNECTION_PROFILE_MODULE
116 * @{
117 */
118
119 /**
120  * @brief The profile handle.
121  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
122 */
123 typedef void* connection_profile_h;
124
125 /**
126  * @brief Enumeration for profile state type.
127  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
128 */
129 typedef enum
130 {
131     CONNECTION_PROFILE_STATE_DISCONNECTED = 0,  /**< Disconnected state */
132     CONNECTION_PROFILE_STATE_ASSOCIATION = 1,  /**< Association state */
133     CONNECTION_PROFILE_STATE_CONFIGURATION = 2,  /**< Configuration state */
134     CONNECTION_PROFILE_STATE_CONNECTED = 3,  /**< Connected state */
135 } connection_profile_state_e;
136
137 /**
138  * @brief Enumeration for address family.
139  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
140 */
141 typedef enum
142 {
143     CONNECTION_ADDRESS_FAMILY_IPV4 = 0,  /**< IPV4 Address type */
144     CONNECTION_ADDRESS_FAMILY_IPV6 = 1,  /**< IPV6 Address type */
145 } connection_address_family_e;
146
147 /**
148  * @brief Enumeration for IP configuration type.
149  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
150 */
151 typedef enum
152 {
153     CONNECTION_IP_CONFIG_TYPE_NONE = 0,  /**< Not defined */
154     CONNECTION_IP_CONFIG_TYPE_STATIC  = 1,  /**< Manual IP configuration */
155     CONNECTION_IP_CONFIG_TYPE_DYNAMIC = 2,  /**< Config IP using DHCP client*/
156     CONNECTION_IP_CONFIG_TYPE_AUTO = 3,  /**< Config IP from Auto IP pool (169.254/16). Later with DHCP client, if available */
157     CONNECTION_IP_CONFIG_TYPE_FIXED = 4,  /**< Indicates an IP address that can not be modified */
158 } connection_ip_config_type_e;
159
160 /**
161  * @brief Enumeration for proxy method type.
162  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
163 */
164 typedef enum
165 {
166     CONNECTION_PROXY_TYPE_DIRECT = 0,  /**< Direct connection */
167     CONNECTION_PROXY_TYPE_AUTO = 1,  /**< Auto configuration(Use PAC file). If URL property is not set, DHCP/WPAD auto-discover will be tried */
168     CONNECTION_PROXY_TYPE_MANUAL  = 2,  /**< Manual configuration */
169 } connection_proxy_type_e;
170
171 /**
172  * @brief Enumeration for network connection type.
173  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
174 */
175 typedef enum{
176     CONNECTION_PROFILE_TYPE_CELLULAR = 0,  /**< Cellular type */
177     CONNECTION_PROFILE_TYPE_WIFI = 1,  /**< Wi-Fi type */
178     CONNECTION_PROFILE_TYPE_ETHERNET = 2,  /**< Ethernet type */
179     CONNECTION_PROFILE_TYPE_BT = 3,  /**< Bluetooth type */
180 } connection_profile_type_e;
181
182 /**
183  * @brief Creates a profile handle.
184  * @details The profile name, which you get from connection_profile_get_name(), will include the keyword you set.
185  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
186  * @privlevel public
187  * @privilege %http://tizen.org/privilege/network.get
188  * @remarks You must release @a profile using connection_profile_destroy().
189  * @param[in] type  The type of profile\n
190  *               #CONNECTION_PROFILE_TYPE_CELLULAR and #CONNECTION_PROFILE_TYPE_WIFI are supported.
191  * @param[in] keyword  The keyword included in profile name
192  * @param[out] profile  The handle of the profile
193  * @return @c 0 on success, otherwise negative error value
194  * @retval #CONNECTION_ERROR_NONE  Successful
195  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
196  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
197  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
198  * @see connection_profile_destroy()
199  * @see connection_profile_get_name()
200 */
201 int connection_profile_create(connection_profile_type_e type, const char* keyword, connection_profile_h* profile);
202
203 /**
204  * @brief Destroys a profile handle.
205  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
206  * @param[out] profile  The handle to the profile
207  * @return @c 0 on success, otherwise a negative error value
208  * @retval #CONNECTION_ERROR_NONE  Successful
209  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
210  * @see connection_profile_create()
211 */
212 int connection_profile_destroy(connection_profile_h profile);
213
214 /**
215  * @brief Clones a profile handle.
216  * @since_tizen 2.3
217  * @remarks You must release @a cloned_profile using connection_profile_destroy().
218  * @param[out] cloned_profile  The handle of the cloned profile
219  * @param[in] origin_profile  The handle of the origin profile
220  * @return @c 0 on success, otherwise a negative error value
221  * @retval #CONNECTION_ERROR_NONE  Successful
222  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
223  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
224  * @see connection_profile_destroy()
225 */
226 int connection_profile_clone(connection_profile_h* cloned_profile, connection_profile_h origin_profile);
227
228 /**
229  * @brief Gets the profile ID.
230  * @details The separate profiles can have the same name.
231  * So, you must use this API instead of connection_profile_get_name() if you want to get the unique identification.
232  * In case you create a profile, this value will be determined when you add the profile.
233  *
234  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
235  * @remarks You must release @a profile_id using free().
236  * @param[in] profile  The profile handle
237  * @param[out] profile_id  The ID of the profile
238  * @return @c 0 on success, otherwise a negative error value
239  * @retval #CONNECTION_ERROR_NONE  Successful
240  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
241  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
242  * @see connection_profile_get_name()
243  * @see connection_add_profile()
244 */
245 int connection_profile_get_id(connection_profile_h profile, char** profile_id);
246
247 /**
248  * @brief Gets the profile name.
249  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
250  * @remarks You must release @a profile_name using free().
251  * @param[in] profile  The profile handle
252  * @param[out] profile_name  The name of the profile
253  * @return @c 0 on success, otherwise a negative error value
254  * @retval #CONNECTION_ERROR_NONE  Successful
255  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
256  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
257  * @see connection_profile_get_id()
258 */
259 int connection_profile_get_name(connection_profile_h profile, char** profile_name);
260
261 /**
262  * @brief Gets the network type.
263  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
264  * @param[in] profile  The profile handle
265  * @param[out] type  The type of the profile
266  * @return @c 0 on success, otherwise a negative error value
267  * @retval #CONNECTION_ERROR_NONE  Successful
268  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
269  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
270 */
271 int connection_profile_get_type(connection_profile_h profile, connection_profile_type_e* type);
272
273 /**
274  * @brief Gets the name of the network interface, e.g. eth0 and pdp0.
275  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
276  * @remarks You must release @a interface_name using free().
277  * @param[in] profile  The profile handle
278  * @param[out] interface_name  The name of the network interface
279  * @return @c 0 on success, otherwise a negative error value
280  * @retval #CONNECTION_ERROR_NONE  Successful
281  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
282  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
283 */
284 int connection_profile_get_network_interface_name(connection_profile_h profile, char** interface_name);
285
286 /**
287  * @brief Refreshes the profile information.
288  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
289  * @privlevel public
290  * @privilege %http://tizen.org/privilege/network.get
291  * @remarks You should call this function in order to get the current information because the profile information can be changed.
292  * @param[in] profile  The profile handle
293  * @return @c 0 on success, otherwise a negative error value
294  * @retval #CONNECTION_ERROR_NONE  Successful
295  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
296  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
297  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
298  * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
299 */
300 int connection_profile_refresh(connection_profile_h profile);
301
302 /**
303  * @brief Gets the network type.
304  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
305  * @param[in] profile  The profile handle
306  * @param[out] state  The state of the profile
307  * @return @c 0 on success, otherwise a negative error value
308  * @retval #CONNECTION_ERROR_NONE  Successful
309  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
310  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
311 */
312 int connection_profile_get_state(connection_profile_h profile, connection_profile_state_e* state);
313
314 /**
315  * @brief Gets the IP config type.
316  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
317  * @param[in] profile  The profile handle
318  * @param[in] address_family  The address family
319  * @param[out] type  The type of the IP config
320  * @return @c 0 on success, otherwise a negative error value
321  * @retval #CONNECTION_ERROR_NONE  Successful
322  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
323  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
324 */
325 int connection_profile_get_ip_config_type(connection_profile_h profile, connection_address_family_e address_family, connection_ip_config_type_e* type);
326
327 /**
328  * @brief Gets the IP address.
329  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
330  * @remarks You must release @a ip_address using free().
331  * @param[in] profile  The profile handle
332  * @param[in] address_family  The address family
333  * @param[out] ip_address  The IP address
334  * @return @c 0 on success, otherwise a negative error value
335  * @retval #CONNECTION_ERROR_NONE  Successful
336  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
337  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
338  * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Not supported address family
339  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
340 */
341 int connection_profile_get_ip_address(connection_profile_h profile, connection_address_family_e address_family, char** ip_address);
342
343 /**
344  * @brief Gets the Subnet Mask.
345  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
346  * @remarks You must release @a subnet_mask using free().
347  * @param[in] profile  The profile handle
348  * @param[in] address_family  The address family
349  * @param[out] subnet_mask  The subnet mask
350  * @return @c 0 on success, otherwise a negative error value
351  * @retval #CONNECTION_ERROR_NONE  Successful
352  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
353  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
354  * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Not supported address family
355  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
356 */
357 int connection_profile_get_subnet_mask(connection_profile_h profile, connection_address_family_e address_family, char** subnet_mask);
358
359 /**
360  * @brief Gets the Gateway address.
361  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
362  * @remarks You must release @a gateway_address using free().
363  * @param[in] profile  The profile handle
364  * @param[in] address_family  The address family
365  * @param[out] gateway_address  The gateway address
366  * @return @c 0 on success, otherwise a negative error value
367  * @retval #CONNECTION_ERROR_NONE  Successful
368  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
369  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
370  * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Not supported address family
371  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
372 */
373 int connection_profile_get_gateway_address(connection_profile_h profile, connection_address_family_e address_family, char** gateway_address);
374
375 /**
376  * @brief Gets the DNS address.
377  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
378  * @remarks The allowance of the DNS address is @c 2. You must release @a dns_address using free().
379  * @param[in] profile  The profile handle
380  * @param[in] order  The order of DNS address \n
381  *              it starts from 1, which means first DNS address.
382  * @param[in] address_family  The address family
383  * @param[out] dns_address  The DNS address
384  * @return @c 0 on success, otherwise a negative error value
385  * @retval #CONNECTION_ERROR_NONE  Successful
386  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
387  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
388  * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Not supported address family
389  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
390 */
391 int connection_profile_get_dns_address(connection_profile_h profile, int order, connection_address_family_e address_family, char** dns_address);
392
393 /**
394  * @brief Gets the Proxy type.
395  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
396  * @param[in] profile  The profile handle
397  * @param[out] type  The type of the proxy
398  * @return @c 0 on success, otherwise a negative error value
399  * @retval #CONNECTION_ERROR_NONE  Successful
400  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
401  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
402 */
403 int connection_profile_get_proxy_type(connection_profile_h profile, connection_proxy_type_e* type);
404
405 /**
406  * @brief Gets the Proxy address.
407  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
408  * @remarks You must release @a proxy_address using free().
409  * @param[in] profile  The profile handle
410  * @param[in] address_family  The address family
411  * @param[out] proxy_address  The proxy address
412  * @return @c 0 on success, otherwise a negative error value
413  * @retval #CONNECTION_ERROR_NONE  Successful
414  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
415  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
416  * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Not supported address family
417  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
418 */
419 int connection_profile_get_proxy_address(connection_profile_h profile, connection_address_family_e address_family, char** proxy_address);
420
421 /**
422  * @brief Sets the IP config type.
423  * @details If you set IP config type to #CONNECTION_IP_CONFIG_TYPE_STATIC,
424  * then IP address, Gateway and Subnet mask will be set to the initial value "0.0.0.0".
425  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
426  * @param[in] profile  The profile handle
427  * @param[in] address_family  The address family
428  * @param[in] type  The type of the IP config
429  * @return @c 0 on success, otherwise a negative error value
430  * @retval #CONNECTION_ERROR_NONE  Successful
431  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
432  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
433 */
434 int connection_profile_set_ip_config_type(connection_profile_h profile, connection_address_family_e address_family, connection_ip_config_type_e type);
435
436 /**
437  * @brief Sets the IP address.
438  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
439  * @param[in] profile  The profile handle
440  * @param[in] address_family  The address family
441  * @param[in] ip_address  The IP address.\n
442  *                      If you set this value to @c NULL, then the existing value will be deleted.
443  * @return @c 0 on success, otherwise a negative error value
444  * @retval #CONNECTION_ERROR_NONE  Successful
445  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
446  * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Not supported address family
447  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
448  * @see connection_update_profile()
449 */
450 int connection_profile_set_ip_address(connection_profile_h profile, connection_address_family_e address_family, const char* ip_address);
451
452 /**
453  * @brief Sets the Subnet Mask.
454  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
455  * @param[in] profile  The profile handle
456  * @param[in] address_family  The address family
457  * @param[in] subnet_mask  The subnet mask. \n
458  *                      If you set this value to @c NULL, then the existing value will be deleted.
459  * @return @c 0 on success, otherwise a negative error value
460  * @retval #CONNECTION_ERROR_NONE  Successful
461  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
462  * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Not supported address family
463  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
464  * @see connection_update_profile()
465 */
466 int connection_profile_set_subnet_mask(connection_profile_h profile, connection_address_family_e address_family, const char* subnet_mask);
467
468 /**
469  * @brief Sets the Gateway address.
470  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
471  * @param[in] profile  The profile handle
472  * @param[in] address_family  The address family
473  * @param[in] gateway_address  The gateway address. \n
474  *                      If you set this value to @c NULL, then the existing value will be deleted.
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_ADDRESS_FAMILY_NOT_SUPPORTED  Not supported address family
479  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
480  * @see connection_update_profile()
481 */
482 int connection_profile_set_gateway_address(connection_profile_h profile, connection_address_family_e address_family, const char* gateway_address);
483
484 /**
485  * @brief Sets 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.
488  * @param[in] profile  The profile handle
489  * @param[in] order  The order of the DNS address. \n
490  *              It starts from @c 1, which means first DNS address.
491  * @param[in] address_family  The address family
492  * @param[in] dns_address  The DNS address; if you set this value to NULL, then the existing value will be deleted
493  * @return @c 0 on success, otherwise a negative error value
494  * @retval #CONNECTION_ERROR_NONE  Successful
495  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
496  * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Not supported address family
497  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
498  * @see connection_update_profile()
499 */
500 int connection_profile_set_dns_address(connection_profile_h profile, int order, connection_address_family_e address_family, const char* dns_address);
501
502 /**
503  * @brief Sets the Proxy type.
504  * @details If you set the Proxy type to #CONNECTION_PROXY_TYPE_AUTO or #CONNECTION_PROXY_TYPE_MANUAL, then Proxy will be restored.
505  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
506  * @param[in] profile  The profile handle
507  * @param[in] type  The type of the proxy
508  * @return @c 0 on success, otherwise a negative error value
509  * @retval #CONNECTION_ERROR_NONE  Successful
510  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
511  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
512  * @see connection_update_profile()
513 */
514 int connection_profile_set_proxy_type(connection_profile_h profile, connection_proxy_type_e type);
515
516 /**
517  * @brief Sets the Proxy address.
518  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
519  * @param[in] profile  The profile handle
520  * @param[in] address_family  The address family
521  * @param[in] proxy_address  The proxy address. \n
522  *                      if you set this value to @c NULL, then the existing value will be deleted.
523  * @return @c 0 on success, otherwise a negative error value
524  * @retval #CONNECTION_ERROR_NONE  Successful
525  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
526  * @retval #CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Not supported address family
527  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
528  * @see connection_update_profile()
529 */
530 int connection_profile_set_proxy_address(connection_profile_h profile, connection_address_family_e address_family, const char* proxy_address);
531
532 /**
533  * @brief Called when the state of the profile is changed.
534  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
535  * @param[in] state  The state
536  * @param[in] user_data The user data passed from the callback registration function
537  * @see connection_profile_set_state_changed_cb()
538  * @see connection_profile_unset_state_changed_cb()
539 */
540 typedef void(*connection_profile_state_changed_cb)(connection_profile_state_e state, void* user_data);
541
542 /**
543  * @brief Registers the callback that is called when the state of profile is changed.
544  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
545  * @param[in] profile  The profile handle
546  * @param[in] callback  The callback function to be called
547  * @param[in] user_data The user data passed to the callback function
548  * @return @c 0 on success, 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
552  * @post connection_opened_cb() is invoked when the state of profile is changed.
553  * @see connection_profile_state_changed_cb()
554  * @see connection_profile_unset_state_changed_cb()
555 */
556 int connection_profile_set_state_changed_cb(connection_profile_h profile, connection_profile_state_changed_cb callback, void* user_data);
557
558 /**
559  * @brief Unregisters the callback that is called when the state of profile is changed.
560  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
561  * @param[in] profile  The profile handle
562  * @return @c 0 on success, otherwise a negative error value
563  * @retval #CONNECTION_ERROR_NONE  Successful
564  * @retval #CONNECTION_ERROR_INVALID_PARAMETER   Invalid parameter
565  * @see connection_profile_state_changed_cb()
566  * @see connection_profile_set_state_changed_cb()
567 */
568 int connection_profile_unset_state_changed_cb(connection_profile_h profile);
569
570 /**
571 * @}
572 */
573
574
575 /**
576 * @addtogroup CAPI_NETWORK_CONNECTION_WIFI_PROFILE_MODULE
577 * @{
578 */
579
580 /**
581  * @brief Gets the ESSID (Extended Service Set Identifier).
582  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
583  * @remarks You must release @a essid using free().
584  * @param[in] profile  The profile handle
585  * @param[out] essid  The ESSID
586  * @return @c 0 on success, otherwise a negative error value
587  * @retval #CONNECTION_ERROR_NONE  Successful
588  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
589  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
590  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
591 */
592 int connection_profile_get_wifi_essid(connection_profile_h profile, char** essid);
593
594 /**
595  * @brief Gets the BSSID (Basic Service Set Identifier).
596  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
597  * @remarks You must release @a bssid using free().
598  * @param[in] profile  The profile handle
599  * @param[out] bssid  The BSSID
600  * @return @c 0 on success, otherwise a negative error value
601  * @retval #CONNECTION_ERROR_NONE  Successful
602  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
603  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
604  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
605 */
606 int connection_profile_get_wifi_bssid(connection_profile_h profile, char** bssid);
607
608 /**
609  * @brief Gets the RSSI.
610  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
611  * @param[in] profile  The profile handle
612  * @param[out] rssi  The RSSI
613  * @return @c 0 on success, otherwise a negative error value
614  * @retval #CONNECTION_ERROR_NONE  Successful
615  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
616  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
617 */
618 int connection_profile_get_wifi_rssi(connection_profile_h profile, int* rssi);
619
620 /**
621  * @brief Gets the frequency (MHz).
622  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
623  * @param[in] profile  The profile handle
624  * @param[out] frequency  The frequency
625  * @return @c 0 on success, otherwise a negative error value
626  * @retval #CONNECTION_ERROR_NONE  Successful
627  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
628  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
629 */
630 int connection_profile_get_wifi_frequency(connection_profile_h profile, int* frequency);
631
632 /**
633  * @brief Gets the max speed (Mbps).
634  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
635  * @param[in] profile  The profile handle
636  * @param[out] max_speed  The max speed
637  * @return @c 0 on success, otherwise a negative error value
638  * @retval #CONNECTION_ERROR_NONE  Successful
639  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
640  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
641 */
642 int connection_profile_get_wifi_max_speed(connection_profile_h profile, int* max_speed);
643
644 /**
645  * @brief Gets the security mode of Wi-Fi.
646  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
647  * @param[in] profile  The profile handle
648  * @param[out] type  The type of Wi-Fi security
649  * @return @c 0 on success, otherwise a negative error value
650  * @retval #CONNECTION_ERROR_NONE  Successful
651  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
652  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
653  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
654 */
655 int connection_profile_get_wifi_security_type(connection_profile_h profile, connection_wifi_security_type_e* type);
656
657 /**
658  * @brief Gets the security mode of Wi-Fi.
659  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
660  * @param[in] profile  The profile handle
661  * @param[out] type  The type of Wi-Fi security
662  * @return @c 0 on success, otherwise a negative error value
663  * @retval #CONNECTION_ERROR_NONE  Successful
664  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
665  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
666  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
667 */
668 int connection_profile_get_wifi_encryption_type(connection_profile_h profile, connection_wifi_encryption_type_e* type);
669
670 /**
671  * @brief Checks whether passphrase is required.
672  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
673  * @remarks This function is not valid if security type is #CONNECTION_WIFI_SECURITY_TYPE_EAP.
674  * @param[in] profile  The profile handle
675  * @param[out] required  @c true if a passphrase is required, otherwise @c false if a passphrase is not required.
676  * @return @c 0 on success, otherwise a negative error value
677  * @retval #CONNECTION_ERROR_NONE  Successful
678  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
679  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
680 */
681 int connection_profile_is_wifi_passphrase_required(connection_profile_h profile, bool* required);
682
683 /**
684  * @brief Sets the passphrase of the Wi-Fi WPA.
685  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
686  * @param[in] profile  The profile handle
687  * @param[in] passphrase  The passphrase of Wi-Fi security
688  * @return @c 0 on success, otherwise a negative error value
689  * @retval #CONNECTION_ERROR_NONE  Successful
690  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
691  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
692  * @see connection_update_profile()
693 */
694 int connection_profile_set_wifi_passphrase(connection_profile_h profile, const char* passphrase);
695
696 /**
697  * @brief Checks whether the WPS (Wi-Fi Protected Setup) is supported.
698  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
699  * @remarks If WPS is supported, you can connect the access point with WPS by wifi_connect_with_wps().
700  * @param[in] profile  The profile handle
701  * @param[out] supported  @c true if WPS is supported, otherwise @c false if WPS is not supported.
702  * @return @c 0 on success, otherwise negative error value
703  * @retval #CONNECTION_ERROR_NONE  Successful
704  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
705  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
706 */
707 int connection_profile_is_wifi_wps_supported(connection_profile_h profile, bool* supported);
708
709 /**
710 * @}
711 */
712
713
714 /**
715 * @addtogroup CAPI_NETWORK_CONNECTION_CELLULAR_PROFILE_MODULE
716 * @{
717 */
718
719 /**
720  * @brief Gets the service type.
721  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
722  * @param[in] profile  The profile handle
723  * @param[out] type  The type of the cellular service
724  * @return @c 0 on success, otherwise a negative error value
725  * @retval #CONNECTION_ERROR_NONE  Successful
726  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
727  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
728  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
729 */
730 int connection_profile_get_cellular_service_type(connection_profile_h profile, connection_cellular_service_type_e* type);
731
732 /**
733  * @brief Gets the APN (access point name).
734  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
735  * @remarks You must release @a apn using free().
736  * @param[in] profile  The profile handle
737  * @param[out] apn  The name of the APN
738  * @return @c 0 on success, otherwise a negative error value
739  * @retval #CONNECTION_ERROR_NONE  Successful
740  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
741  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
742  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
743 */
744 int connection_profile_get_cellular_apn(connection_profile_h profile, char** apn);
745
746 /**
747  * @brief Gets the authentication information.
748  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
749  * @remarks You must release @a user_name and @a password using free().
750  * @param[in] profile  The profile handle
751  * @param[out] type  The type of the authentication
752  * @param[out] user_name  The user name
753  * @param[out] password  The password
754  * @return @c 0 on success, otherwise a negative error value
755  * @retval #CONNECTION_ERROR_NONE  Successful
756  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
757  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
758  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
759  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
760 */
761 int connection_profile_get_cellular_auth_info(connection_profile_h profile, connection_cellular_auth_type_e* type, char** user_name, char** password);
762
763 /**
764  * @brief Gets the home URL.
765  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
766  * @remarks You must release @a home_url using free().
767  * @param[in] profile  The profile handle
768  * @param[out] home_url  The home URL
769  * @return @c 0 on success, otherwise a negative error value
770  * @retval #CONNECTION_ERROR_NONE  Successful
771  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
772  * @retval #CONNECTION_ERROR_OUT_OF_MEMORY  Out of memory
773  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
774 */
775 int connection_profile_get_cellular_home_url(connection_profile_h profile, char** home_url);
776
777 /**
778  * @brief Gets the cellular pdn type.
779  * @since_tizen 3.0
780  * @param[in] profile The profile handle
781  * @param[out] type The cellular pdn type
782  * @return @c 0 on success, otherwise negative error value
783  * @retval #CONNECTION_ERROR_NONE Successful
784  * @retval #CONNECTION_ERROR_INVALID_PARAMETER   Invalid parameter
785  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
786  * @retval #CONNECTION_ERROR_NOT_SUPPORTED     Not Supported
787 */
788 int connection_profile_get_cellular_pdn_type(connection_profile_h profile, connection_cellular_pdn_type_e* type);
789
790 /**
791  * @brief Gets the cellular roam pdn type.
792  * @since_tizen 3.0
793  * @param[in] profile The profile handle
794  * @param[out] type The cellular pdn type
795  * @return @c 0 on success, otherwise negative error value
796  * @retval #CONNECTION_ERROR_NONE Successful
797  * @retval #CONNECTION_ERROR_INVALID_PARAMETER   Invalid parameter
798  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
799  * @retval #CONNECTION_ERROR_NOT_SUPPORTED     Not Supported
800 */
801 int connection_profile_get_cellular_roam_pdn_type(connection_profile_h profile, connection_cellular_pdn_type_e* type);
802
803 /**
804  * @brief Checks wheter the connection is in roaming state.
805  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
806  * @param[in] profile  The profile handle
807  * @param[out] is_roaming  @c true if the cellular is roaming, otherwise @c false if it is not roaming.
808  * @return @c 0 on success, otherwise a negative error value
809  * @retval #CONNECTION_ERROR_NONE  Successful
810  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
811  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
812 */
813 int connection_profile_is_cellular_roaming(connection_profile_h profile, bool* is_roaming);
814
815 /**
816  * @brief Checks whether the profile is hidden.
817  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
818  * @param[in] profile  The profile handle
819  * @param[out] is_hidden @c ture if the profile is in hidden, otherwise @c false if the profile is not hidden.
820  * @return @c 0 on success, otherwise a negative error value
821  * @retval #CONNECTION_ERROR_NONE  Successful
822  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
823  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
824 */
825 int connection_profile_is_cellular_hidden(connection_profile_h profile, bool* is_hidden);
826
827 /**
828  * @brief Checks whether the profile is editable.
829  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
830  * @param[in] profile  The profile handle
831  * @param[out] is_editable  @c true if the profile is editable, otherwise @c false if the profile is not editable.
832  * @return @c 0 on success, otherwise a negative error value
833  * @retval #CONNECTION_ERROR_NONE  Successful
834  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
835  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
836 */
837 int connection_profile_is_cellular_editable(connection_profile_h profile, bool* is_editable);
838
839 /**
840  * @brief Checks whether the profile is default.
841  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
842  * @param[in] profile  The profile handle
843  * @param[out] is_default  @c true if the profile is default, otherwise @c false if the profile is not default.
844  * @return @c 0 on success, otherwise a negative error value
845  * @retval #CONNECTION_ERROR_NONE  Successful
846  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
847  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
848 */
849 int connection_profile_is_cellular_default(connection_profile_h profile, bool* is_default);
850
851 /**
852  * @brief Sets the service type.
853  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
854  * @param[in] profile  The profile handle
855  * @param[in] service_type  The type of cellular service
856  * @return @c 0 on success, otherwise a negative error value
857  * @retval #CONNECTION_ERROR_NONE  Successful
858  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
859  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
860  * @see connection_update_profile()
861 */
862 int connection_profile_set_cellular_service_type(connection_profile_h profile, connection_cellular_service_type_e service_type);
863
864 /**
865  * @brief Sets the APN (Access Point Name).
866  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
867  * @param[in] profile  The profile handle
868  * @param[in] apn  The name of APN
869  * @return @c 0 on success, otherwise a negative error value
870  * @retval #CONNECTION_ERROR_NONE  Successful
871  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
872  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
873  * @see connection_update_profile()
874 */
875 int connection_profile_set_cellular_apn(connection_profile_h profile, const char* apn);
876
877 /**
878  * @brief Sets the Authentication information.
879  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
880  * @param[in] profile  The profile handle
881  * @param[in] type  The type of the authentication
882  * @param[in] user_name  The user name
883  * @param[in] password  The password
884  * @return @c 0 on success, otherwise a negative error value
885  * @retval #CONNECTION_ERROR_NONE  Successful
886  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
887  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
888  * @see connection_update_profile()
889 */
890 int connection_profile_set_cellular_auth_info(connection_profile_h profile, connection_cellular_auth_type_e type, const char* user_name, const char* password);
891
892 /**
893  * @brief Sets the home URL.
894  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
895  * @param[in] profile  The profile handle
896  * @param[in] home_url  The home URL
897  * @return @c 0 on success, otherwise a negative error value
898  * @retval #CONNECTION_ERROR_NONE  Successful
899  * @retval #CONNECTION_ERROR_INVALID_PARAMETER  Invalid parameter
900  * @retval #CONNECTION_ERROR_NOT_SUPPORTED      Not supported
901  * @see connection_update_profile()
902 */
903 int connection_profile_set_cellular_home_url(connection_profile_h profile, const char* home_url);
904
905 /**
906  * @brief Sets the cellular pdn type.
907  * @since_tizen 3.0
908  * @param[in] profile The profile handle
909  * @param[in] type The cellular pdn type
910  * @return @c 0 on success, otherwise 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
915 */
916 int connection_profile_set_cellular_pdn_type(connection_profile_h profile, connection_cellular_pdn_type_e type);
917
918 /**
919  * @brief Sets the cellular roam pdn type.
920  * @since_tizen 3.0
921  * @param[in] profile The profile handle
922  * @param[in] type The cellular pdn type
923  * @return @c 0 on success, otherwise negative error value
924  * @retval #CONNECTION_ERROR_NONE Successful
925  * @retval #CONNECTION_ERROR_INVALID_PARAMETER   Invalid parameter
926  * @retval #CONNECTION_ERROR_OPERATION_FAILED  Operation failed
927  * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission Denied
928  * @retval #CONNECTION_ERROR_NOT_SUPPORTED     Not Supported
929 */
930 int connection_profile_set_cellular_roam_pdn_type(connection_profile_h profile, connection_cellular_pdn_type_e type);
931
932 /**
933 * @}
934 */
935
936
937 #ifdef __cplusplus
938 }
939
940 #endif
941
942 #endif /* __TIZEN_NETWORK_CONNECTION_PROFILE_H__ */