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