Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

volume-monitor.h

Go to the documentation of this file.
00001 // -*- c++ -*- 00002 // Generated by gtkmmproc -- DO NOT MODIFY! 00003 #ifndef _LIBGNOMEVFSMM_VOLUME_MONITOR_H 00004 #define _LIBGNOMEVFSMM_VOLUME_MONITOR_H 00005 00006 #include <glibmm.h> 00007 00008 /* Copyright 2003 gnome-vfsmm Development Team 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Library General Public 00012 * License as published by the Free Software Foundation; either 00013 * version 2 of the License, or (at your option) any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Library General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Library General Public 00021 * License along with this library; if not, write to the Free 00022 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00023 */ 00024 00025 00026 #include <libgnomevfsmm/drive.h> 00027 #include <libgnomevfsmm/volume.h> 00028 00029 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00030 typedef struct _GnomeVFSVolumeMonitor GnomeVFSVolumeMonitor; 00031 typedef struct _GnomeVFSVolumeMonitorClass GnomeVFSVolumeMonitorClass; 00032 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00033 00034 00035 namespace Gnome 00036 { 00037 00038 namespace Vfs 00039 { class VolumeMonitor_Class; } // namespace Vfs 00040 00041 } // namespace Gnome 00042 namespace Gnome 00043 { 00044 00045 namespace Vfs 00046 { 00047 00048 00049 class VolumeMonitor : public Glib::Object 00050 { 00051 00052 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00053 00054 public: 00055 typedef VolumeMonitor CppObjectType; 00056 typedef VolumeMonitor_Class CppClassType; 00057 typedef GnomeVFSVolumeMonitor BaseObjectType; 00058 typedef GnomeVFSVolumeMonitorClass BaseClassType; 00059 00060 private: friend class VolumeMonitor_Class; 00061 static CppClassType volumemonitor_class_; 00062 00063 private: 00064 // noncopyable 00065 VolumeMonitor(const VolumeMonitor&); 00066 VolumeMonitor& operator=(const VolumeMonitor&); 00067 00068 protected: 00069 explicit VolumeMonitor(const Glib::ConstructParams& construct_params); 00070 explicit VolumeMonitor(GnomeVFSVolumeMonitor* castitem); 00071 00072 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00073 00074 public: 00075 virtual ~VolumeMonitor(); 00076 00077 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00078 static GType get_type() G_GNUC_CONST; 00079 static GType get_base_type() G_GNUC_CONST; 00080 #endif 00081 00083 GnomeVFSVolumeMonitor* gobj() { return reinterpret_cast<GnomeVFSVolumeMonitor*>(gobject_); } 00084 00086 const GnomeVFSVolumeMonitor* gobj() const { return reinterpret_cast<GnomeVFSVolumeMonitor*>(gobject_); } 00087 00089 GnomeVFSVolumeMonitor* gobj_copy(); 00090 00091 private: 00092 00093 00094 public: 00095 00096 static Glib::RefPtr<VolumeMonitor> create(); 00097 00098 00099 Glib::ListHandle< Glib::RefPtr<Volume> > get_mounted_volumes(); 00100 00101 Glib::ListHandle< Glib::RefPtr<const Volume> > get_mounted_volumes() const; 00102 00103 00104 Glib::ListHandle< Glib::RefPtr<Drive> > get_connected_drives(); 00105 00106 Glib::ListHandle< Glib::RefPtr<const Drive> > get_connected_drives() const; 00107 00108 00109 Glib::RefPtr<Volume> get_volume(const Glib::ustring& path); 00110 00111 Glib::RefPtr<const Volume> get_volume(const Glib::ustring& path) const; 00112 00113 Glib::RefPtr<Volume> get_volume(gulong id); 00114 00115 Glib::RefPtr<const Volume> get_volume(gulong id) const; 00116 00117 Glib::RefPtr<Drive> get_drive(gulong id); 00118 00119 Glib::RefPtr<const Drive> get_drive(gulong id) const; 00120 00121 00122 Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_volume_mounted(); 00123 00124 00125 Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_volume_pre_unmount(); 00126 00127 00128 Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_volume_unmounted(); 00129 00130 00131 Glib::SignalProxy1< void,const Glib::RefPtr<Drive>& > signal_drive_connected(); 00132 00133 00134 Glib::SignalProxy1< void,const Glib::RefPtr<Drive>& > signal_drive_disconnected(); 00135 00136 00137 public: 00138 00139 public: 00140 //C++ methods used to invoke GTK+ virtual functions: 00141 00142 protected: 00143 //GTK+ Virtual Functions (override these to change behaviour): 00144 00145 //Default Signal Handlers:: 00146 virtual void on_volume_mounted(const Glib::RefPtr<Volume>& volume); 00147 virtual void on_volume_pre_unmount(const Glib::RefPtr<Volume>& volume); 00148 virtual void on_volume_unmounted(const Glib::RefPtr<Volume>& volume); 00149 virtual void on_drive_connected(const Glib::RefPtr<Drive>& drive); 00150 virtual void on_drive_disconnected(const Glib::RefPtr<Drive>& drive); 00151 00152 00153 }; 00154 00155 00156 } // namespace Vfs 00157 } // namespace Gnome 00158 00159 00160 namespace Glib 00161 { 00167 Glib::RefPtr<Gnome::Vfs::VolumeMonitor> wrap(GnomeVFSVolumeMonitor* object, bool take_copy = false); 00168 } 00169 00170 00171 #endif /* _LIBGNOMEVFSMM_VOLUME_MONITOR_H */ 00172

Generated on Sun Jun 20 21:46:20 2004 for libgnomevfsmm by doxygen 1.3.7