Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class 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 bool is_user_visible() const; 00120 00121 bool is_connected() const; 00122 00123 bool is_mounted() const; 00124 00125 //We could wrap this as operator==() instead, but that would need RefPtr::operator*. murrayc. 00126 00127 static int compare(const Glib::RefPtr<const Drive>& a, const Glib::RefPtr<const Drive>& b); 00128 00129 00130 void mount(const OpSlot& slot); 00131 void unmount(const OpSlot& slot); 00132 void eject(const OpSlot& slot); 00133 00134 00135 Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_mounted(); 00136 00137 00138 Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_pre_unmount(); 00139 00140 00141 Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_unmounted(); 00142 00143 00144 public: 00145 00146 public: 00147 //C++ methods used to invoke GTK+ virtual functions: 00148 00149 protected: 00150 //GTK+ Virtual Functions (override these to change behaviour): 00151 00152 //Default Signal Handlers:: 00153 virtual void on_mounted(const Glib::RefPtr<Volume>& volume); 00154 virtual void on_pre_unmount(const Glib::RefPtr<Volume>& volume); 00155 virtual void on_unmounted(const Glib::RefPtr<Volume>& volume); 00156 00157 00158 }; 00159 00160 00161 } // namespace Vfs 00162 } // namespace Gnome 00163 00164 00165 namespace Glib 00166 { 00172 Glib::RefPtr<Gnome::Vfs::Drive> wrap(GnomeVFSDrive* object, bool take_copy = false); 00173 } 00174 00175 00176 #endif /* _LIBGNOMEVFSMM_DRIVE_H */ 00177

Generated on Fri Aug 13 09:26:58 2004 for libgnomevfsmm by doxygen 1.3.7