/src/ntopng/include/PeriodicScript.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * |
3 | | * (C) 2013-24 - ntop.org |
4 | | * |
5 | | * |
6 | | * This program is free software; you can redistribute it and/or modify |
7 | | * it under the terms of the GNU General Public License as published by |
8 | | * the Free Software Foundation; either version 3 of the License, or |
9 | | * (at your option) any later version. |
10 | | * |
11 | | * This program is distributed in the hope that it will be useful, |
12 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | | * GNU General Public License for more details. |
15 | | * |
16 | | * You should have received a copy of the GNU General Public License |
17 | | * along with this program; if not, write to the Free Software Foundation, |
18 | | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | | * |
20 | | */ |
21 | | |
22 | | #ifndef _PERIODIC_SCRIPT_H_ |
23 | | #define _PERIODIC_SCRIPT_H_ |
24 | | |
25 | | #include "ntop_includes.h" |
26 | | |
27 | | class PeriodicScript { |
28 | | private: |
29 | | const char *path; |
30 | | u_int32_t periodicity; |
31 | | u_int32_t max_duration_secs; |
32 | | ThreadPool *pool; |
33 | | bool align_to_localtime; |
34 | | bool exclude_viewed_interfaces; |
35 | | bool exclude_pcap_dump_interfaces; |
36 | | |
37 | | public: |
38 | | PeriodicScript(const char *_path, u_int32_t _periodicity_seconds = 0, |
39 | | u_int32_t _max_duration_seconds = 0, |
40 | | bool _align_to_localtime = false, |
41 | | bool _exclude_viewed_interfaces = false, |
42 | | bool _exclude_pcap_dump_interfaces = false, |
43 | | ThreadPool *_pool = NULL); |
44 | | ~PeriodicScript(); |
45 | | |
46 | 0 | inline u_int32_t getPeriodicity() { return (periodicity); }; |
47 | 0 | inline bool excludeViewedIfaces() { return (exclude_viewed_interfaces); }; |
48 | 0 | inline bool excludePcap() { return (exclude_pcap_dump_interfaces); }; |
49 | 0 | inline bool alignToLocalTime() { return (align_to_localtime); }; |
50 | 0 | inline const char *getPath() { return (path); }; |
51 | 0 | inline u_int32_t getMaxDuration() { return (max_duration_secs); }; |
52 | 0 | inline ThreadPool *getPool() { return (pool); }; |
53 | | }; |
54 | | |
55 | | #endif /* _PERIODIC_SCRIPT_H_ */ |