00001
00002
00003 #ifndef _LIBGNOMEVFSMM_VOLUME_H
00004 #define _LIBGNOMEVFSMM_VOLUME_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include <libgnomevfsmm/enums.h>
00028
00029 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00030 typedef struct _GnomeVFSVolume GnomeVFSVolume;
00031 typedef struct _GnomeVFSVolumeClass GnomeVFSVolumeClass;
00032 #endif
00033
00034
00035 namespace Gnome
00036 {
00037
00038 namespace Vfs
00039 { class Volume_Class; }
00040
00041 }
00042 namespace Gnome
00043 {
00044
00045 namespace Vfs
00046 {
00047
00048 class Drive;
00049
00050
00051 class Volume : public Glib::Object
00052 {
00053
00054 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00055
00056 public:
00057 typedef Volume CppObjectType;
00058 typedef Volume_Class CppClassType;
00059 typedef GnomeVFSVolume BaseObjectType;
00060 typedef GnomeVFSVolumeClass BaseClassType;
00061
00062 private: friend class Volume_Class;
00063 static CppClassType volume_class_;
00064
00065 private:
00066
00067 Volume(const Volume&);
00068 Volume& operator=(const Volume&);
00069
00070 protected:
00071 explicit Volume(const Glib::ConstructParams& construct_params);
00072 explicit Volume(GnomeVFSVolume* castitem);
00073
00074 #endif
00075
00076 public:
00077 virtual ~Volume();
00078
00079 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00080 static GType get_type() G_GNUC_CONST;
00081 static GType get_base_type() G_GNUC_CONST;
00082 #endif
00083
00085 GnomeVFSVolume* gobj() { return reinterpret_cast<GnomeVFSVolume*>(gobject_); }
00086
00088 const GnomeVFSVolume* gobj() const { return reinterpret_cast<GnomeVFSVolume*>(gobject_); }
00089
00091 GnomeVFSVolume* gobj_copy();
00092
00093 private:
00094
00095
00096 public:
00097
00101 typedef sigc::slot<void, bool, Glib::ustring, Glib::ustring> OpSlot;
00102
00103
00104 gulong get_id() const;
00105
00106 VolumeType get_volume_type() const;
00107
00108 DeviceType get_device_type() const;
00109
00110 Glib::RefPtr<Drive> get_drive() const;
00111
00112 Glib::ustring get_device_path() const;
00113
00114 Glib::ustring get_activation_uri() const;
00115
00116 Glib::ustring get_filesystem_type() const;
00117
00118 Glib::ustring get_display_name() const;
00119
00120 Glib::ustring get_icon() const;
00121
00122 Glib::ustring get_hal_udi() const;
00123
00124 bool is_user_visible() const;
00125
00126 bool is_read_only() const;
00127
00128 bool is_mounted() const;
00129
00130 bool handles_trash() const;
00131
00132
00133 static int compare(const Glib::RefPtr<const Volume>& a, const Glib::RefPtr<const Volume>& b);
00134
00135
00136 void unmount(const OpSlot& slot);
00137 void eject(const OpSlot& slot);
00138
00139
00140 static void connect_to_server(const Glib::ustring& uri, const Glib::ustring& display_name, const Glib::ustring& icon);
00141
00142
00143 public:
00144
00145 public:
00146
00147 #ifdef GLIBMM_VFUNCS_ENABLED
00148 #endif //GLIBMM_VFUNCS_ENABLED
00149
00150 protected:
00151
00152 #ifdef GLIBMM_VFUNCS_ENABLED
00153 #endif //GLIBMM_VFUNCS_ENABLED
00154
00155
00156
00157
00158 };
00159
00160
00161 }
00162 }
00163
00164
00165 namespace Glib
00166 {
00172 Glib::RefPtr<Gnome::Vfs::Volume> wrap(GnomeVFSVolume* object, bool take_copy = false);
00173 }
00174
00175
00176 #endif
00177