4 * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
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.
22 * @desc Entity for working with datausage counter.
23 * In plans place to counter.c main counting procedure from main.c
27 #ifndef _RESOURCED_DATAUSAGE_COUNTER_H
28 #define _RESOURCED_DATAUSAGE_COUNTER_H
32 #include "daemon-options.h"
39 #ifndef CONFIG_DATAUSAGE_NFACCT
42 int family_id_restriction;
47 Ecore_Fd_Handler *noti_fd_handler;
49 struct daemon_opts *opts;
50 struct application_stat_tree *result;
51 traffic_stat_tree *in_tree;
52 traffic_stat_tree *out_tree;
53 Ecore_Timer *ecore_timer;
54 Ecore_Fd_Handler *ecore_fd_handler;
55 Ecore_Timer *store_result_timer;
59 * @desc Reschedule existing traffic counter function
60 * Rescheduling logic is following, we will postpone
61 * execution on delay seconds.
63 void reschedule_count_timer(const struct counter_arg *carg, const double delay);
65 struct counter_arg *init_counter_arg(struct daemon_opts *opts);
67 void finalize_carg(struct counter_arg *carg);
69 #ifdef CONFIG_DATAUSAGE_NFACCT
70 GTree *create_nfacct_tree(void);
71 #endif /* CONFIG_DATAUSAGE_NFACCT */
73 #endif /* _RESOURCED_NETWORK_COUNTING_H_ */