Dbus service / interface / object names are changed
[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 /* Need translation */
26 #define MH_NOTI_STR     "Connected device (%d)"
27 #define MH_NOTI_TITLE   "Tethering"
28
29 gint _slist_find_station_by_interface(gconstpointer a, gconstpointer b);
30 gint _slist_find_station_by_mac(gconstpointer a, gconstpointer b);
31 gint _slist_find_station_by_ip_addr(gconstpointer a, gconstpointer b);
32
33 void _emit_mobileap_dbus_signal(TetheringObject *obj,
34                 mobile_ap_sig_e num, const gchar *message);
35 void _send_dbus_station_info(const char *member,
36                 mobile_ap_station_info_t *info);
37 void _update_station_count(int count);
38 int _add_station_info(mobile_ap_station_info_t *info);
39 int _remove_station_info(gconstpointer data, GCompareFunc func);
40 int _remove_station_info_all(mobile_ap_type_e type);
41 int _get_station_info(gconstpointer data, GCompareFunc func,
42                 mobile_ap_station_info_t **si);
43 int _get_station_count(gconstpointer data, GCompareFunc func, int *count);
44 int _station_info_foreach(GFunc func, void *user_data);
45 int _add_data_usage_rule(const char *src, const char *dest);
46 int _del_data_usage_rule(const char *src, const char *dest);
47 int _get_data_usage(const char *src, const char *dest, unsigned long long *tx, unsigned long long *rx);
48 int _execute_command(const char *cmd);
49 int _get_tethering_type_from_ip(const char *ip, mobile_ap_type_e *type);
50
51 #endif