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

Generated on Tue Aug 22 09:07:07 2006 for libgnomevfsmm by  doxygen 1.4.7