Initialize Tizen 2.3
[framework/connectivity/mobileap-agent.git] / include / mobileap_common.h
1 /*
2  * mobileap-agent
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18 #ifndef __MOBILEAP_COMMON_H__
19 #define __MOBILEAP_COMMON_H__
20
21 #include <glib.h>
22
23 #include "mobileap_agent.h"
24
25 gint _slist_find_station_by_interface(gconstpointer a, gconstpointer b);
26 gint _slist_find_station_by_mac(gconstpointer a, gconstpointer b);
27 gint _slist_find_station_by_ip_addr(gconstpointer a, gconstpointer b);
28
29 void _emit_mobileap_dbus_signal(TetheringObject *obj,
30                 mobile_ap_sig_e num, const gchar *message);
31 void _send_dbus_station_info(const char *member,
32                 mobile_ap_station_info_t *info);
33 void _update_station_count(int count);
34 int _add_station_info(mobile_ap_station_info_t *info);
35 int _remove_station_info(gconstpointer data, GCompareFunc func);
36 int _remove_station_info_all(mobile_ap_type_e type);
37 int _get_station_info(gconstpointer data, GCompareFunc func,
38                 mobile_ap_station_info_t **si);
39 int _get_station_count(gconstpointer data, GCompareFunc func, int *count);
40 int _station_info_foreach(GFunc func, void *user_data);
41 int _add_data_usage_rule(const char *src, const char *dest);
42 int _del_data_usage_rule(const char *src, const char *dest);
43 int _get_data_usage(const char *src, const char *dest, unsigned long long *tx, unsigned long long *rx);
44 int _execute_command(const char *cmd);
45 int _get_tethering_type_from_ip(const char *ip, mobile_ap_type_e *type);
46
47 #endif /* __MOBILEAP_COMMON_H__ */