2 * Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
4 * This file is part of CasparCG (www.casparcg.com).
6 * CasparCG 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.
11 * CasparCG 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.
16 * You should have received a copy of the GNU General Public License
17 * along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
19 * Author: Helge Norberg, helge.norberg@svt.se
24 #include "filesystem_monitor.h"
29 * A portable filesystem monitor implementation which periodically polls the
30 * filesystem for changes. Will not react instantly but never misses any
33 * Will create a dedicated thread for each monitor created.
35 class polling_filesystem_monitor_factory : public filesystem_monitor_factory
41 * @param scan_interval_millis The number of milliseconds between each
42 * scheduled scan. Lower values lowers the reaction
43 * time but causes more I/O.
45 polling_filesystem_monitor_factory(int scan_interval_millis = 5000);
46 virtual ~polling_filesystem_monitor_factory();
47 virtual filesystem_monitor::ptr create(
48 const boost::filesystem::wpath& folder_to_watch,
49 filesystem_event events_of_interest_mask,
50 bool report_already_existing,
51 const filesystem_monitor_handler& handler,
52 const initial_files_handler& initial_files_handler);
55 spl::unique_ptr<impl> impl_;