Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File 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   
00097   static Glib::RefPtr<VolumeMonitor> create();
00098   
00099   
00100   Glib::ListHandle< Glib::RefPtr<Volume> > get_mounted_volumes();
00101   
00102   Glib::ListHandle< Glib::RefPtr<const Volume> > get_mounted_volumes() const;
00103 
00104   
00105   Glib::ListHandle< Glib::RefPtr<Drive> > get_connected_drives();
00106   
00107   Glib::ListHandle< Glib::RefPtr<const Drive> > get_connected_drives() const;
00108 
00109   
00110   Glib::RefPtr<Volume> get_volume(const Glib::ustring& path);
00111   
00112   Glib::RefPtr<const Volume> get_volume(const Glib::ustring& path) const;
00113   
00114   Glib::RefPtr<Volume> get_volume(gulong id);
00115   
00116   Glib::RefPtr<const Volume> get_volume(gulong id) const;
00117   
00118   Glib::RefPtr<Drive> get_drive(gulong id);
00119   
00120   Glib::RefPtr<const Drive> get_drive(gulong id) const;
00121 
00122   
00123   Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_volume_mounted();
00124 
00125   
00126   Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_volume_pre_unmount();
00127 
00128   
00129   Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_volume_unmounted();
00130 
00131 
00132   Glib::SignalProxy1< void,const Glib::RefPtr<Drive>& > signal_drive_connected();
00133 
00134   
00135   Glib::SignalProxy1< void,const Glib::RefPtr<Drive>& > signal_drive_disconnected();
00136 
00137 
00138 public:
00139 
00140 public:
00141   //C++ methods used to invoke GTK+ virtual functions:
00142 
00143 protected:
00144   //GTK+ Virtual Functions (override these to change behaviour):
00145 
00146   //Default Signal Handlers::
00147   virtual void on_volume_mounted(const Glib::RefPtr<Volume>& volume);
00148   virtual void on_volume_pre_unmount(const Glib::RefPtr<Volume>& volume);
00149   virtual void on_volume_unmounted(const Glib::RefPtr<Volume>& volume);
00150   virtual void on_drive_connected(const Glib::RefPtr<Drive>& drive);
00151   virtual void on_drive_disconnected(const Glib::RefPtr<Drive>& drive);
00152 
00153 
00154 };
00155   
00156 
00157 } // namespace Vfs
00158 } // namespace Gnome
00159 
00160 
00161 namespace Glib
00162 {
00168   Glib::RefPtr<Gnome::Vfs::VolumeMonitor> wrap(GnomeVFSVolumeMonitor* object, bool take_copy = false);
00169 }
00170 
00171 
00172 #endif /* _LIBGNOMEVFSMM_VOLUME_MONITOR_H */
00173 

Generated on Mon Mar 7 11:19:50 2005 for libgnomevfsmm by  doxygen 1.3.9.1