2 * Network Client Library
4 * Copyright 2012 Samsung Electronics Co., Ltd
6 * Licensed under the Flora License, Version 1.1 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.tizenopensource.org/license
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #ifndef __NETWORK_INFO_H__
21 #define __NETWORK_INFO_H__
25 #include "network-cm-intf.h"
31 /*****************************************************************************
33 *****************************************************************************/
35 /*****************************************************************************
37 *****************************************************************************/
39 #define NET_TECH_LENGTH_MAX 64
41 /*****************************************************************************
43 *****************************************************************************/
47 NETWORK_REQUEST_TYPE_SCAN = 0x00,
48 NETWORK_REQUEST_TYPE_OPEN_CONNECTION,
49 NETWORK_REQUEST_TYPE_CLOSE_CONNECTION,
50 NETWORK_REQUEST_TYPE_WIFI_POWER,
51 NETWORK_REQUEST_TYPE_ENROLL_WPS,
52 NETWORK_REQUEST_TYPE_SPECIFIC_SCAN,
53 NETWORK_REQUEST_TYPE_SET_DEFAULT,
54 NETWORK_REQUEST_TYPE_RESET_DEFAULT,
55 NETWORK_REQUEST_TYPE_MAX
56 } network_async_request_type_t;
61 char ProfileName[NET_PROFILE_NAME_LEN_MAX+1];
62 } network_request_table_t;
65 GDBusConnection *connection;
66 GCancellable *cancellable;
68 guint subscribe_id_connman_state;
69 guint subscribe_id_mesh_state;
70 guint subscribe_id_connman_error;
71 guint subscribe_id_netconfig;
72 guint subscribe_id_netconfig_wifi;
74 net_state_type_t state_table[NET_DEVICE_MAX];
75 network_request_table_t request_table[NETWORK_REQUEST_TYPE_MAX];
77 net_event_cb_t event_callback;
85 char technology[NET_TECH_LENGTH_MAX];
86 char AvailableTechnology;
87 char EnabledTechnology;
88 char ConnectedTechnology;
89 char DefaultTechnology;
91 unsigned char Connected;
92 unsigned char Powered;
93 } network_tech_state_info_t;
96 * This is the profile structure exposed from modman.
100 /** Profile name(path) */
101 char ProfileName[NET_PROFILE_NAME_LEN_MAX+1];
102 /** Service type of this profile context */
103 net_service_type_t ServiceType;
104 /** Pdn type of this profile context */
105 net_pdn_type_e PdnType;
106 /** Roam Pdn type of this profile context */
107 net_pdn_type_e RoamPdnType;
108 /** Network Access Point Name */
109 char Apn[NET_PDP_APN_LEN_MAX+1];
110 /** Authentication info of the PDP profile */
111 net_auth_info_t AuthInfo;
113 char ProxyAddr[NET_PROXY_LEN_MAX+1];
114 /** Browser Home URL or MMS server URL */
115 char HomeURL[NET_HOME_URL_LEN_MAX+1];
116 char Keyword[NET_PDP_APN_LEN_MAX+1];
120 } net_telephony_profile_info_t;
122 /*****************************************************************************
124 *****************************************************************************/
125 gboolean _network_info_is_ref(network_info_t *network_info);
126 void _network_info_ref(network_info_t *network_info);
127 void _network_info_unref(network_info_t *network_info);
133 #endif /* __NETWORK_INFO_H__ */