stlab.adobe.com Adobe Systems Incorporated

platform_file_monitor_impl.hpp

Go to the documentation of this file.
00001 /*
00002     Copyright 2005-2007 Adobe Systems Incorporated
00003     Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
00004     or a copy at http://stlab.adobe.com/licenses.html)
00005 */
00006 
00007 /****************************************************************************************************/
00008 
00009 #ifndef ADOBE_PLATFORM_FILE_MONITOR_IMPL_HPP
00010 #define ADOBE_PLATFORM_FILE_MONITOR_IMPL_HPP
00011 
00012 /****************************************************************************************************/
00013 
00014 #include <sys/event.h>
00015 #include <sys/stat.h>
00016 #include <sys/fcntl.h>
00017 #include <unistd.h>
00018 
00019 /****************************************************************************************************/
00020 
00021 namespace adobe {
00022 
00023 /****************************************************************************************************/
00024 
00025 struct file_monitor_platform_data_t
00026 {
00027     file_monitor_platform_data_t();
00028 
00029     file_monitor_platform_data_t(const file_monitor_path_type& path, const file_monitor_callback_t& proc);
00030 
00031     file_monitor_platform_data_t(const file_monitor_platform_data_t& rhs);
00032 
00033     ~file_monitor_platform_data_t();
00034 
00035     file_monitor_platform_data_t& operator = (const file_monitor_platform_data_t& rhs);
00036 
00037     void set_path(const file_monitor_path_type& path);
00038 
00039     void connect();
00040 
00041     void disconnect();
00042 
00043     file_monitor_path_type  path_m;
00044     file_monitor_callback_t proc_m;
00045     std::time_t             last_write_m;
00046     int                     fd_m;
00047     struct kevent           evt_m;
00048 };
00049 
00050 /****************************************************************************************************/
00051 
00052 } // namespace adobe
00053 
00054 /****************************************************************************************************/
00055 
00056 #endif
00057 
00058 /****************************************************************************************************/

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google