libgnomevfsmm  2.26.0
volume-monitor.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _LIBGNOMEVFSMM_VOLUME_MONITOR_H
4 #define _LIBGNOMEVFSMM_VOLUME_MONITOR_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/drive.h>
28 #include <libgnomevfsmm/volume.h>
29 
30 #ifndef DOXYGEN_SHOULD_SKIP_THIS
31 typedef struct _GnomeVFSVolumeMonitor GnomeVFSVolumeMonitor;
32 typedef struct _GnomeVFSVolumeMonitorClass GnomeVFSVolumeMonitorClass;
33 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
34 
35 
36 namespace Gnome
37 {
38 
39 namespace Vfs
40 { class VolumeMonitor_Class; } // namespace Vfs
41 
42 } // namespace Gnome
43 namespace Gnome
44 {
45 
46 namespace Vfs
47 {
48 
49 
50 class VolumeMonitor : public Glib::Object
51 {
52 
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
54 
55 public:
56  typedef VolumeMonitor CppObjectType;
57  typedef VolumeMonitor_Class CppClassType;
58  typedef GnomeVFSVolumeMonitor BaseObjectType;
59  typedef GnomeVFSVolumeMonitorClass BaseClassType;
60 
61 private: friend class VolumeMonitor_Class;
62  static CppClassType volumemonitor_class_;
63 
64 private:
65  // noncopyable
67  VolumeMonitor& operator=(const VolumeMonitor&);
68 
69 protected:
70  explicit VolumeMonitor(const Glib::ConstructParams& construct_params);
71  explicit VolumeMonitor(GnomeVFSVolumeMonitor* castitem);
72 
73 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
74 
75 public:
76  virtual ~VolumeMonitor();
77 
78 #ifndef DOXYGEN_SHOULD_SKIP_THIS
79  static GType get_type() G_GNUC_CONST;
80  static GType get_base_type() G_GNUC_CONST;
81 #endif
82 
84  GnomeVFSVolumeMonitor* gobj() { return reinterpret_cast<GnomeVFSVolumeMonitor*>(gobject_); }
85 
87  const GnomeVFSVolumeMonitor* gobj() const { return reinterpret_cast<GnomeVFSVolumeMonitor*>(gobject_); }
88 
90  GnomeVFSVolumeMonitor* gobj_copy();
91 
92 private:
93 
94 
95 public:
96 
97 
98  static Glib::RefPtr<VolumeMonitor> create();
99 
100 
101  Glib::ListHandle< Glib::RefPtr<Volume> > get_mounted_volumes();
102 
103  Glib::ListHandle< Glib::RefPtr<const Volume> > get_mounted_volumes() const;
104 
105 
106  Glib::ListHandle< Glib::RefPtr<Drive> > get_connected_drives();
107 
108  Glib::ListHandle< Glib::RefPtr<const Drive> > get_connected_drives() const;
109 
110 
111  Glib::RefPtr<Volume> get_volume(const Glib::ustring& path);
112 
113  Glib::RefPtr<const Volume> get_volume(const Glib::ustring& path) const;
114 
115  Glib::RefPtr<Volume> get_volume(gulong id);
116 
117  Glib::RefPtr<const Volume> get_volume(gulong id) const;
118 
119  Glib::RefPtr<Drive> get_drive(gulong id);
120 
121  Glib::RefPtr<const Drive> get_drive(gulong id) const;
122 
123 
129  Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_volume_mounted();
130 
131 
137  Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_volume_pre_unmount();
138 
139 
145  Glib::SignalProxy1< void,const Glib::RefPtr<Volume>& > signal_volume_unmounted();
146 
147 
153  Glib::SignalProxy1< void,const Glib::RefPtr<Drive>& > signal_drive_connected();
154 
155 
161  Glib::SignalProxy1< void,const Glib::RefPtr<Drive>& > signal_drive_disconnected();
162 
163 
164 public:
165 
166 public:
167  //C++ methods used to invoke GTK+ virtual functions:
168 #ifdef GLIBMM_VFUNCS_ENABLED
169 #endif //GLIBMM_VFUNCS_ENABLED
170 
171 protected:
172  //GTK+ Virtual Functions (override these to change behaviour):
173 #ifdef GLIBMM_VFUNCS_ENABLED
174 #endif //GLIBMM_VFUNCS_ENABLED
175 
176  //Default Signal Handlers::
177 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
178  virtual void on_volume_mounted(const Glib::RefPtr<Volume>& volume);
179  virtual void on_volume_pre_unmount(const Glib::RefPtr<Volume>& volume);
180  virtual void on_volume_unmounted(const Glib::RefPtr<Volume>& volume);
181  virtual void on_drive_connected(const Glib::RefPtr<Drive>& drive);
182  virtual void on_drive_disconnected(const Glib::RefPtr<Drive>& drive);
183 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
184 
185 
186 };
187 
188 
189 } // namespace Vfs
190 } // namespace Gnome
191 
192 
193 namespace Glib
194 {
203  Glib::RefPtr<Gnome::Vfs::VolumeMonitor> wrap(GnomeVFSVolumeMonitor* object, bool take_copy = false);
204 }
205 
206 
207 #endif /* _LIBGNOMEVFSMM_VOLUME_MONITOR_H */
208 
static Glib::RefPtr< VolumeMonitor > create()
Glib::ListHandle< Glib::RefPtr< Drive > > get_connected_drives()
Glib::ListHandle< Glib::RefPtr< Volume > > get_mounted_volumes()
Glib::SignalProxy1< void, const Glib::RefPtr< Volume > & > signal_volume_pre_unmount()
Glib::SignalProxy1< void, const Glib::RefPtr< Volume > & > signal_volume_unmounted()
virtual void on_volume_mounted(const Glib::RefPtr< Volume > &volume)
Glib::RefPtr< Drive > get_drive(gulong id)
GnomeVFSVolumeMonitor * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it...
virtual void on_volume_unmounted(const Glib::RefPtr< Volume > &volume)
Definition: volume-monitor.h:50
Glib::SignalProxy1< void, const Glib::RefPtr< Drive > & > signal_drive_connected()
Glib::SignalProxy1< void, const Glib::RefPtr< Drive > & > signal_drive_disconnected()
const GnomeVFSVolumeMonitor * gobj() const
Provides access to the underlying C GObject.
Definition: volume-monitor.h:87
virtual void on_drive_disconnected(const Glib::RefPtr< Drive > &drive)
GnomeVFSVolumeMonitor * gobj()
Provides access to the underlying C GObject.
Definition: volume-monitor.h:84
Glib::RefPtr< Volume > get_volume(const Glib::ustring &path)
virtual void on_volume_pre_unmount(const Glib::RefPtr< Volume > &volume)
Glib::SignalProxy1< void, const Glib::RefPtr< Volume > & > signal_volume_mounted()
virtual void on_drive_connected(const Glib::RefPtr< Drive > &drive)