3 #ifndef _LIBGNOMEVFSMM_DRIVE_H 4 #define _LIBGNOMEVFSMM_DRIVE_H 29 #ifndef DOXYGEN_SHOULD_SKIP_THIS 30 typedef struct _GnomeVFSDrive GnomeVFSDrive;
31 typedef struct _GnomeVFSDriveClass GnomeVFSDriveClass;
39 {
class Drive_Class; }
51 class Drive :
public Glib::Object
54 #ifndef DOXYGEN_SHOULD_SKIP_THIS 57 typedef Drive CppObjectType;
58 typedef Drive_Class CppClassType;
59 typedef GnomeVFSDrive BaseObjectType;
60 typedef GnomeVFSDriveClass BaseClassType;
62 private:
friend class Drive_Class;
63 static CppClassType drive_class_;
71 explicit Drive(
const Glib::ConstructParams& construct_params);
72 explicit Drive(GnomeVFSDrive* castitem);
79 #ifndef DOXYGEN_SHOULD_SKIP_THIS 80 static GType get_type() G_GNUC_CONST;
81 static GType get_base_type() G_GNUC_CONST;
85 GnomeVFSDrive*
gobj() {
return reinterpret_cast<GnomeVFSDrive*
>(gobject_); }
88 const GnomeVFSDrive*
gobj()
const {
return reinterpret_cast<GnomeVFSDrive*
>(gobject_); }
91 GnomeVFSDrive* gobj_copy();
101 typedef sigc::slot<void, bool, const Glib::ustring&, const Glib::ustring&>
OpSlot;
104 gulong get_id()
const;
111 Glib::RefPtr<Volume> get_mounted_volume();
116 Glib::RefPtr<const Volume> get_mounted_volume()
const;
119 Glib::ListHandle< Glib::RefPtr<Volume> > get_mounted_volumes();
121 Glib::ListHandle< Glib::RefPtr<const Volume> > get_mounted_volumes()
const;
124 Glib::ustring get_device_path()
const;
126 Glib::ustring get_activation_uri()
const;
128 Glib::ustring get_display_name()
const;
132 Glib::ustring get_hal_udi()
const;
134 bool is_user_visible()
const;
136 bool is_connected()
const;
138 bool is_mounted()
const;
142 static int compare(
const Glib::RefPtr<const Drive>& a,
const Glib::RefPtr<const Drive>& b);
148 void mount(
const OpSlot& slot);
149 void unmount(
const OpSlot& slot);
150 void eject(
const OpSlot& slot);
159 Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_mounted();
167 Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_pre_unmount();
175 Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_unmounted();
182 #ifdef GLIBMM_VFUNCS_ENABLED 183 #endif //GLIBMM_VFUNCS_ENABLED 187 #ifdef GLIBMM_VFUNCS_ENABLED 188 #endif //GLIBMM_VFUNCS_ENABLED 191 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 192 virtual void on_mounted(
const Glib::RefPtr<Volume>& volume);
193 virtual void on_pre_unmount(
const Glib::RefPtr<Volume>& volume);
194 virtual void on_unmounted(
const Glib::RefPtr<Volume>& volume);
195 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 215 Glib::RefPtr<Gnome::Vfs::Drive> wrap(GnomeVFSDrive*
object,
bool take_copy =
false);
Definition: address.h:119
const GnomeVFSDrive * gobj() const
Provides access to the underlying C GObject.
Definition: drive.h:88
sigc::slot< void, bool, const Glib::ustring &, const Glib::ustring & > OpSlot
For instance, void on_operation(bool succeeded, const Glib::ustring& error, const Glib::ustring& deta...
Definition: drive.h:101
Glib::ustring get_icon(const Glib::ustring &mime_type)
Query the MIME database for an icon representing the specified MIME type.
GnomeVFSDrive * gobj()
Provides access to the underlying C GObject.
Definition: drive.h:85