libgnomevfsmm 2.26.0
drive.h
Go to the documentation of this file.
1// -*- c++ -*-
2// Generated by gtkmmproc -- DO NOT MODIFY!
3#ifndef _LIBGNOMEVFSMM_DRIVE_H
4#define _LIBGNOMEVFSMM_DRIVE_H
5
6
7#include <glibmm.h>
8
9/* Copyright 2003 gnome-vfsmm Development Team
10 *
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
15 *
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free
23 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
25
26
27#include <libgnomevfsmm/enums.h>
28
29#ifndef DOXYGEN_SHOULD_SKIP_THIS
30typedef struct _GnomeVFSDrive GnomeVFSDrive;
31typedef struct _GnomeVFSDriveClass GnomeVFSDriveClass;
32#endif /* DOXYGEN_SHOULD_SKIP_THIS */
33
34
35namespace Gnome
36{
37
38namespace Vfs
39{ class Drive_Class; } // namespace Vfs
40
41} // namespace Gnome
42namespace Gnome
43{
44
45namespace Vfs
46{
47
48class Volume;
49
50
51class Drive : public Glib::Object
52{
53
54#ifndef DOXYGEN_SHOULD_SKIP_THIS
55
56public:
57 typedef Drive CppObjectType;
58 typedef Drive_Class CppClassType;
59 typedef GnomeVFSDrive BaseObjectType;
60 typedef GnomeVFSDriveClass BaseClassType;
61
62private: friend class Drive_Class;
63 static CppClassType drive_class_;
64
65private:
66 // noncopyable
67 Drive(const Drive&);
68 Drive& operator=(const Drive&);
69
70protected:
71 explicit Drive(const Glib::ConstructParams& construct_params);
72 explicit Drive(GnomeVFSDrive* castitem);
73
74#endif /* DOXYGEN_SHOULD_SKIP_THIS */
75
76public:
77 virtual ~Drive();
78
79#ifndef DOXYGEN_SHOULD_SKIP_THIS
80 static GType get_type() G_GNUC_CONST;
81 static GType get_base_type() G_GNUC_CONST;
82#endif
83
85 GnomeVFSDrive* gobj() { return reinterpret_cast<GnomeVFSDrive*>(gobject_); }
86
88 const GnomeVFSDrive* gobj() const { return reinterpret_cast<GnomeVFSDrive*>(gobject_); }
89
91 GnomeVFSDrive* gobj_copy();
92
93private:
94
95
96public:
97
101 typedef sigc::slot<void, bool, const Glib::ustring&, const Glib::ustring&> OpSlot;
102
103
104 gulong get_id() const;
105
107
111 Glib::RefPtr<Volume> get_mounted_volume();
112
116 Glib::RefPtr<const Volume> get_mounted_volume() const;
117
118
119 Glib::ListHandle< Glib::RefPtr<Volume> > get_mounted_volumes();
120
121 Glib::ListHandle< Glib::RefPtr<const Volume> > get_mounted_volumes() const;
122
123
124 Glib::ustring get_device_path() const;
125
126 Glib::ustring get_activation_uri() const;
127
128 Glib::ustring get_display_name() const;
129
130 Glib::ustring get_icon() const;
131
132 Glib::ustring get_hal_udi() const;
133
134 bool is_user_visible() const;
135
136 bool is_connected() const;
137
138 bool is_mounted() const;
139
140 //We could wrap this as operator==() instead, but that would need RefPtr::operator*. murrayc.
141
142 static int compare(const Glib::RefPtr<const Drive>& a, const Glib::RefPtr<const Drive>& b);
143
144
145 // These methods are not available in gnome-vfs on WIN32
146#ifndef G_OS_WIN32
147
148 void mount(const OpSlot& slot);
149 void unmount(const OpSlot& slot);
150 void eject(const OpSlot& slot);
151#endif // G_OS_WIN32
152
153
159 Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_mounted();
160
161
167 Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_pre_unmount();
168
169
175 Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_unmounted();
176
177
178public:
179
180public:
181 //C++ methods used to invoke GTK+ virtual functions:
182#ifdef GLIBMM_VFUNCS_ENABLED
183#endif //GLIBMM_VFUNCS_ENABLED
184
185protected:
186 //GTK+ Virtual Functions (override these to change behaviour):
187#ifdef GLIBMM_VFUNCS_ENABLED
188#endif //GLIBMM_VFUNCS_ENABLED
189
190 //Default Signal Handlers::
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
196
197
198};
199
200
201} // namespace Vfs
202} // namespace Gnome
203
204
205namespace Glib
206{
215 Glib::RefPtr<Gnome::Vfs::Drive> wrap(GnomeVFSDrive* object, bool take_copy = false);
216}
217
218
219#endif /* _LIBGNOMEVFSMM_DRIVE_H */
220
Definition drive.h:52
Glib::ustring get_activation_uri() const
Glib::SignalProxy1< void, const Glib::RefPtr< Volume > & > signal_unmounted()
Glib::ustring get_hal_udi() const
void mount(const OpSlot &slot)
void eject(const OpSlot &slot)
Glib::SignalProxy1< void, const Glib::RefPtr< Volume > & > signal_pre_unmount()
bool is_connected() const
DeviceType get_device_type() const
bool is_user_visible() const
virtual void on_unmounted(const Glib::RefPtr< Volume > &volume)
virtual void on_mounted(const Glib::RefPtr< Volume > &volume)
GnomeVFSDrive * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
Glib::ListHandle< Glib::RefPtr< const Volume > > get_mounted_volumes() const
GnomeVFSDrive * gobj()
Provides access to the underlying C GObject.
Definition drive.h:85
gulong get_id() const
void unmount(const OpSlot &slot)
Glib::SignalProxy1< void, const Glib::RefPtr< Volume > & > signal_mounted()
virtual void on_pre_unmount(const Glib::RefPtr< Volume > &volume)
static int compare(const Glib::RefPtr< const Drive > &a, const Glib::RefPtr< const Drive > &b)
Glib::ListHandle< Glib::RefPtr< Volume > > get_mounted_volumes()
Glib::ustring get_icon() const
Glib::RefPtr< Volume > get_mounted_volume()
Glib::RefPtr< Gnome::Vfs::Drive > wrap(GnomeVFSDrive *object, bool take_copy=false)
A Glib::wrap() method for this object.
bool is_mounted() const
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_display_name() const
const GnomeVFSDrive * gobj() const
Provides access to the underlying C GObject.
Definition drive.h:88
Glib::ustring get_device_path() const
Glib::RefPtr< const Volume > get_mounted_volume() const
DeviceType
Definition enums.h:743
Definition address.h:120
Definition address.h:37