/usr/include/giomm-2.4/giomm/volumemonitor.h is in libglibmm-2.4-dev 2.56.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 | // Generated by gmmproc 2.54.1 -- DO NOT MODIFY!
#ifndef _GIOMM_VOLUMEMONITOR_H
#define _GIOMM_VOLUMEMONITOR_H
#include <giommconfig.h>
#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>
/* Copyright (C) 2007 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/drive.h>
#include <giomm/volume.h>
#include <giomm/mount.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
using GVolumeMonitor = struct _GVolumeMonitor;
using GVolumeMonitorClass = struct _GVolumeMonitorClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Gio
{ class VolumeMonitor_Class; } // namespace Gio
#endif //DOXYGEN_SHOULD_SKIP_THIS
namespace Gio
{
/** Monitors a file or directory for changes.
* VolumeMonitor is for listing the user-interesting devices and volumes on the
* computer. In other words, what a file selector or file manager would show in
* a sidebar.
*
* @newin{2,16}
*/
class VolumeMonitor : public Glib::Object
{
#ifndef DOXYGEN_SHOULD_SKIP_THIS
public:
using CppObjectType = VolumeMonitor;
using CppClassType = VolumeMonitor_Class;
using BaseObjectType = GVolumeMonitor;
using BaseClassType = GVolumeMonitorClass;
// noncopyable
VolumeMonitor(const VolumeMonitor&) = delete;
VolumeMonitor& operator=(const VolumeMonitor&) = delete;
private: friend class VolumeMonitor_Class;
static CppClassType volumemonitor_class_;
protected:
explicit VolumeMonitor(const Glib::ConstructParams& construct_params);
explicit VolumeMonitor(GVolumeMonitor* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
VolumeMonitor(VolumeMonitor&& src) noexcept;
VolumeMonitor& operator=(VolumeMonitor&& src) noexcept;
~VolumeMonitor() noexcept override;
/** Get the GType for this class, for use with the underlying GObject type system.
*/
static GType get_type() G_GNUC_CONST;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GObject.
GVolumeMonitor* gobj() { return reinterpret_cast<GVolumeMonitor*>(gobject_); }
///Provides access to the underlying C GObject.
const GVolumeMonitor* gobj() const { return reinterpret_cast<GVolumeMonitor*>(gobject_); }
///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
GVolumeMonitor* gobj_copy();
private:
protected:
public:
/** Gets the volume monitor used by gio.
*
* @return A reference to the VolumeMonitor used by gio. Call
* Glib::object_unref() when done with it.
*/
static Glib::RefPtr<VolumeMonitor> get();
/** Gets a list of drives connected to the system.
*
* @return A List of connected Drive objects.
*/
Glib::ListHandle< Glib::RefPtr<Drive> > get_connected_drives();
/** Gets a list of the volumes on the system.
*
* @return A List of Volume objects.
*/
Glib::ListHandle< Glib::RefPtr<Volume> > get_volumes();
/** Gets a list of the mounts on the system.
*
* @return A List of Mount objects.
*/
Glib::ListHandle< Glib::RefPtr<Mount> > get_mounts();
/** Finds a Volume object by its UUID (see g_volume_get_uuid())
*
* @param uuid The UUID to look for.
* @return A Volume or <tt>nullptr</tt> if no such volume is available.
* Free the returned object with Glib::object_unref().
*/
Glib::RefPtr<Volume> get_volume_for_uuid(const std::string& uuid);
/** Finds a Mount object by its UUID (see g_mount_get_uuid())
*
* @param uuid The UUID to look for.
* @return A Mount or <tt>nullptr</tt> if no such mount is available.
* Free the returned object with Glib::object_unref().
*/
Glib::RefPtr<Mount> get_mount_for_uuid(const std::string& uuid);
#ifndef GIOMM_DISABLE_DEPRECATED
/** This function should be called by any VolumeMonitor
* implementation when a new Mount object is created that is not
* associated with a Volume object. It must be called just before
* emitting the @a mount_added signal.
*
* If the return value is not <tt>nullptr</tt>, the caller must associate the
* returned Volume object with the Mount. This involves returning
* it in its g_mount_get_volume() implementation. The caller must
* also listen for the "removed" signal on the returned object
* and give up its reference when handling that signal
*
* Similary, if implementing g_volume_monitor_adopt_orphan_mount(),
* the implementor must take a reference to @a mount and return it in
* its g_volume_get_mount() implemented. Also, the implementor must
* listen for the "unmounted" signal on @a mount and give up its
* reference upon handling that signal.
*
* There are two main use cases for this function.
*
* One is when implementing a user space file system driver that reads
* blocks of a block device that is already represented by the native
* volume monitor (for example a CD Audio file system driver). Such
* a driver will generate its own Mount object that needs to be
* associated with the Volume object that represents the volume.
*
* The other is for implementing a VolumeMonitor whose sole purpose
* is to return Volume objects representing entries in the users
* "favorite servers" list or similar.
*
* Deprecated: 2.20: Instead of using this function, VolumeMonitor
* implementations should instead create shadow mounts with the URI of
* the mount they intend to adopt. See the proxy volume monitor in
* gvfs for an example of this. Also see g_mount_is_shadowed(),
* g_mount_shadow() and g_mount_unshadow() functions.
*
* @deprecated Instead of using this function, create shadow mounts with the URI of the mount you intend to adopt.
*
* @param mount A Mount object to find a parent for.
* @return The Volume object that is the parent for @a mount or <tt>nullptr</tt>
* if no wants to adopt the Mount.
*/
static Glib::RefPtr<Volume> adopt_orphan_mount(const Glib::RefPtr<Mount>& mount);
#endif // GIOMM_DISABLE_DEPRECATED
/**
* @par Slot Prototype:
* <tt>void on_my_%volume_added(const Glib::RefPtr<Volume>& volume)</tt>
*
* Flags: Run Last
*
* Emitted when a mountable volume is added to the system.
*
* @param volume A Volume that was added.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Volume>& > signal_volume_added();
/**
* @par Slot Prototype:
* <tt>void on_my_%volume_removed(const Glib::RefPtr<Volume>& volume)</tt>
*
* Flags: Run Last
*
* Emitted when a mountable volume is removed from the system.
*
* @param volume A Volume that was removed.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Volume>& > signal_volume_removed();
/**
* @par Slot Prototype:
* <tt>void on_my_%volume_changed(const Glib::RefPtr<Volume>& volume)</tt>
*
* Flags: Run Last
*
* Emitted when mountable volume is changed.
*
* @param volume A Volume that changed.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Volume>& > signal_volume_changed();
/**
* @par Slot Prototype:
* <tt>void on_my_%mount_added(const Glib::RefPtr<Mount>& mount)</tt>
*
* Flags: Run Last
*
* Emitted when a mount is added.
*
* @param mount A Mount that was added.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Mount>& > signal_mount_added();
/**
* @par Slot Prototype:
* <tt>void on_my_%mount_removed(const Glib::RefPtr<Mount>& mount)</tt>
*
* Flags: Run Last
*
* Emitted when a mount is removed.
*
* @param mount A Mount that was removed.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Mount>& > signal_mount_removed();
/**
* @par Slot Prototype:
* <tt>void on_my_%mount_pre_unmount(const Glib::RefPtr<Mount>& mount)</tt>
*
* Flags: Run Last
*
* May be emitted when a mount is about to be removed.
*
* This signal depends on the backend and is only emitted if
* GIO was used to unmount.
*
* @param mount A Mount that is being unmounted.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Mount>& > signal_mount_pre_unmount();
/**
* @par Slot Prototype:
* <tt>void on_my_%mount_changed(const Glib::RefPtr<Mount>& mount)</tt>
*
* Flags: Run Last
*
* Emitted when a mount changes.
*
* @param mount A Mount that changed.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Mount>& > signal_mount_changed();
/**
* @par Slot Prototype:
* <tt>void on_my_%drive_connected(const Glib::RefPtr<Drive>& drive)</tt>
*
* Flags: Run Last
*
* Emitted when a drive is connected to the system.
*
* @param drive A Drive that was connected.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Drive>& > signal_drive_connected();
/**
* @par Slot Prototype:
* <tt>void on_my_%drive_disconnected(const Glib::RefPtr<Drive>& drive)</tt>
*
* Flags: Run Last
*
* Emitted when a drive is disconnected from the system.
*
* @param drive A Drive that was disconnected.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Drive>& > signal_drive_disconnected();
/**
* @par Slot Prototype:
* <tt>void on_my_%drive_changed(const Glib::RefPtr<Drive>& drive)</tt>
*
* Flags: Run Last
*
* Emitted when a drive changes.
*
* @param drive The drive that changed.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Drive>& > signal_drive_changed();
//TODO: Remove no_default_handler when we can break ABI:
/**
* @par Slot Prototype:
* <tt>void on_my_%drive_eject_button(const Glib::RefPtr<Drive>& drive)</tt>
*
* Flags: Run Last
*
* Emitted when the eject button is pressed on @a drive.
*
* @newin{2,18}
*
* @param drive The drive where the eject button was pressed.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Drive>& > signal_drive_eject_button();
/**
* @par Slot Prototype:
* <tt>void on_my_%drive_stop_button(const Glib::RefPtr<Drive>& drive)</tt>
*
* Flags: Run Last
*
* Emitted when the stop button is pressed on @a drive.
*
* @newin{2,22}
*
* @param drive The drive where the stop button was pressed.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Drive>& > signal_drive_stop_button();
//TODO: Use ListHandle?
//_WRAP_VFUNC(GList* get_volumes(), get_volumes)
//_WRAP_VFUNC(GList* get_mounts(), get_mounts)
//_WRAP_VFUNC(Glib::RefPtr<Volume> get_volume_for_uuid(const std::string& uuid), get_volume_for_uuid)
//_WRAP_VFUNC(Glib::RefPtr<Mount> get_mount_for_uuid(const std::string& uuid), get_mount_for_uuid)
//There are no properties.
public:
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
/// This is a default handler for the signal signal_volume_added().
virtual void on_volume_added(const Glib::RefPtr<Volume>& volume);
/// This is a default handler for the signal signal_volume_removed().
virtual void on_volume_removed(const Glib::RefPtr<Volume>& volume);
/// This is a default handler for the signal signal_volume_changed().
virtual void on_volume_changed(const Glib::RefPtr<Volume>& volume);
/// This is a default handler for the signal signal_mount_added().
virtual void on_mount_added(const Glib::RefPtr<Mount>& mount);
/// This is a default handler for the signal signal_mount_removed().
virtual void on_mount_removed(const Glib::RefPtr<Mount>& mount);
/// This is a default handler for the signal signal_mount_pre_unmount().
virtual void on_mount_pre_unmount(const Glib::RefPtr<Mount>& mount);
/// This is a default handler for the signal signal_mount_changed().
virtual void on_mount_changed(const Glib::RefPtr<Mount>& mount);
/// This is a default handler for the signal signal_drive_connected().
virtual void on_drive_connected(const Glib::RefPtr<Drive>& drive);
/// This is a default handler for the signal signal_drive_disconnected().
virtual void on_drive_disconnected(const Glib::RefPtr<Drive>& drive);
/// This is a default handler for the signal signal_drive_changed().
virtual void on_drive_changed(const Glib::RefPtr<Drive>& drive);
};
} // namespace Gio
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates Gio::VolumeMonitor
*/
Glib::RefPtr<Gio::VolumeMonitor> wrap(GVolumeMonitor* object, bool take_copy = false);
}
#endif /* _GIOMM_VOLUMEMONITOR_H */
|