libgnomevfsmm 2.26.0
|
00001 #ifndef _LIBGNOMEVFSMM_MONITOR_HANDLE_H 00002 #define _LIBGNOMEVFSMM_MONITOR_HANDLE_H 00003 00004 #include <glibmm.h> 00005 00006 /* Copyright 2003 gnome-vfsmm Development Team 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2.1 of the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free 00020 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00021 */ 00022 00023 #include <libgnomevfsmm/enums.h> 00024 #include <libgnomevfsmm/exception.h> 00025 #include <libgnomevfs/gnome-vfs-monitor.h> 00026 00027 00028 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00029 typedef struct GnomeVFSMonitorHandle GnomeVFSMonitorHandle; 00030 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00031 00032 00033 namespace Gnome 00034 { 00035 00036 namespace Vfs 00037 { 00038 00039 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00040 namespace 00041 { 00042 00043 class SignalProxy_Monitor; 00044 00045 } 00046 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00047 00048 class MonitorHandle 00049 { 00050 public: 00051 MonitorHandle(); 00052 virtual ~MonitorHandle(); 00053 00055 typedef sigc::slot<void, const MonitorHandle&, const Glib::ustring&, const Glib::ustring&, MonitorEventType> SlotMonitor; 00056 00057 #ifdef GLIBMM_EXCEPTIONS_ENABLED 00058 void add(const Glib::ustring& text_uri, MonitorType type, const SlotMonitor& slot) throw(exception); 00059 void cancel() throw(exception); 00060 #else 00061 void add(const Glib::ustring& text_uri, MonitorType type, const SlotMonitor& slot, std::auto_ptr<Gnome::Vfs::exception>& error); 00062 void cancel(std::auto_ptr<Gnome::Vfs::exception>& error); 00063 #endif //GLIBMM_EXCEPTIONS_ENABLED 00064 00065 GnomeVFSMonitorHandle** gobj_addr(); 00066 GnomeVFSMonitorHandle* gobj(); 00067 const GnomeVFSMonitorHandle* gobj() const; 00068 00069 private: 00070 00071 GnomeVFSMonitorHandle* gobj_; 00072 SignalProxy_Monitor* proxy_; 00073 }; 00074 00075 } // namespace Vfs 00076 } // namespace Gnome 00077 00078 #endif /* _LIBGNOMEVFSMM_MONITOR_HANDLE_H */ 00079