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

drive.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBGNOMEVFSMM_DRIVE_H
00004 #define _LIBGNOMEVFSMM_DRIVE_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/enums.h>
00027 
00028 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00029 typedef struct _GnomeVFSDrive GnomeVFSDrive;
00030 typedef struct _GnomeVFSDriveClass GnomeVFSDriveClass;
00031 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00032 
00033 
00034 namespace Gnome
00035 {
00036 
00037 namespace Vfs
00038 { class Drive_Class; } // namespace Vfs
00039 
00040 } // namespace Gnome
00041 namespace Gnome
00042 {
00043 
00044 namespace Vfs
00045 {
00046 
00047 class Volume;
00048 
00049 
00050 class Drive : public Glib::Object
00051 {
00052   
00053 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00054 
00055 public:
00056   typedef Drive CppObjectType;
00057   typedef Drive_Class CppClassType;
00058   typedef GnomeVFSDrive BaseObjectType;
00059   typedef GnomeVFSDriveClass BaseClassType;
00060 
00061 private:  friend class Drive_Class;
00062   static CppClassType drive_class_;
00063 
00064 private:
00065   // noncopyable
00066   Drive(const Drive&);
00067   Drive& operator=(const Drive&);
00068 
00069 protected:
00070   explicit Drive(const Glib::ConstructParams& construct_params);
00071   explicit Drive(GnomeVFSDrive* castitem);
00072 
00073 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00074 
00075 public:
00076   virtual ~Drive();
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   GnomeVFSDrive*       gobj()       { return reinterpret_cast<GnomeVFSDrive*>(gobject_); }
00085 
00087   const GnomeVFSDrive* gobj() const { return reinterpret_cast<GnomeVFSDrive*>(gobject_); }
00088 
00090   GnomeVFSDrive* gobj_copy();
00091 
00092 private:
00093 
00094   
00095 public:
00096             
00100   typedef sigc::slot<void, bool, const Glib::ustring&, const Glib::ustring&> OpSlot;
00101   
00102   
00103   gulong get_id() const;
00104   
00105   DeviceType get_device_type() const;
00106   
00107   Glib::RefPtr<Volume> get_mounted_volume();
00108   
00109   Glib::RefPtr<const Volume> get_mounted_volume() const;
00110   
00111   Glib::ustring get_device_path() const;
00112   
00113   Glib::ustring get_activation_uri() const;
00114   
00115   Glib::ustring get_display_name() const;
00116   
00117   Glib::ustring get_icon() const;
00118   
00119   Glib::ustring get_hal_udi() const;
00120   
00121   bool is_user_visible() const;
00122   
00123   bool is_connected() const;
00124   
00125   bool is_mounted() const;
00126 
00127   //We could wrap this as operator==() instead, but that would need RefPtr::operator*. murrayc.
00128   
00129   static int compare(const Glib::RefPtr<const Drive>& a, const Glib::RefPtr<const Drive>& b);
00130   
00131 
00132   void mount(const OpSlot& slot);
00133   void unmount(const OpSlot& slot);
00134   void eject(const OpSlot& slot);
00135 
00136   
00137   Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_mounted();
00138 
00139   
00140   Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_pre_unmount();
00141 
00142   
00143   Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_unmounted();
00144 
00145 
00146 public:
00147 
00148 public:
00149   //C++ methods used to invoke GTK+ virtual functions:
00150 
00151 protected:
00152   //GTK+ Virtual Functions (override these to change behaviour):
00153 
00154   //Default Signal Handlers::
00155   virtual void on_mounted(const Glib::RefPtr<Volume>& volume);
00156   virtual void on_pre_unmount(const Glib::RefPtr<Volume>& volume);
00157   virtual void on_unmounted(const Glib::RefPtr<Volume>& volume);
00158 
00159 
00160 };
00161   
00162 
00163 } // namespace Vfs
00164 } // namespace Gnome
00165 
00166 
00167 namespace Glib
00168 {
00174   Glib::RefPtr<Gnome::Vfs::Drive> wrap(GnomeVFSDrive* object, bool take_copy = false);
00175 }
00176 
00177 
00178 #endif /* _LIBGNOMEVFSMM_DRIVE_H */
00179 

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