This file is indexed.

/usr/include/giomm-2.4/giomm/volume.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
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
// Generated by gmmproc 2.54.1 -- DO NOT MODIFY!
#ifndef _GIOMM_VOLUME_H
#define _GIOMM_VOLUME_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/file.h>
#include <giomm/mountoperation.h>
#include <giomm/mount.h>
//#include <giomm/drive.h>
//#include <giomm/icon.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GVolumeIface GGVolumeIface;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


#ifndef DOXYGEN_SHOULD_SKIP_THIS
using GVolume = struct _GVolume;
using GVolumeClass = struct _GVolumeClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Gio
{ class Volume_Class; } // namespace Gio
#endif // DOXYGEN_SHOULD_SKIP_THIS

namespace Gio
{

// Making a forward declaration here to avoid circular dependency.
// file.hg already includes volume.h.
class File;
class Drive;

/** The Volume interface represents user-visible objects that can be mounted.
 *
 * Mounting a Volume instance is an asynchronous operation. For more information about asynchronous operations, see AsyncReady and SimpleAsyncReady. To
 * mount a GVolume, first call mount(), optionally providing a MountOperation object and a SlotAsyncReady callback.
 *
 * Typically, you will not want to provide a MountOperation if automounting all volumes when a desktop session starts since it's not desirable to
 * put up a lot of dialogs asking for credentials.
 *
 * The callback will be fired when the operation has resolved (either with success or failure), and a AsyncReady structure will be passed to the callback.
 * That callback should then call g_volume_mount_finish() with the GVolume instance and the GAsyncReady data to see if the operation was completed
 * successfully. If an error is present when finish() is called, then it will be filled with any error information.
 *
 * @newin{2,16}
 */

class Volume : public Glib::Interface
{
  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  using CppObjectType = Volume;
  using CppClassType = Volume_Class;
  using BaseObjectType = GVolume;
  using BaseClassType = GVolumeIface;

  // noncopyable
  Volume(const Volume&) = delete;
  Volume& operator=(const Volume&) = delete;

private:
  friend class Volume_Class;
  static CppClassType volume_class_;

#endif /* DOXYGEN_SHOULD_SKIP_THIS */
protected:
  /**
   * You should derive from this class to use it.
   */
  Volume();

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  /** Called by constructors of derived classes. Provide the result of
   * the Class init() function to ensure that it is properly
   * initialized.
   *
   * @param interface_class The Class object for the derived type.
   */
  explicit Volume(const Glib::Interface_Class& interface_class);

public:
  // This is public so that C++ wrapper instances can be
  // created for C instances of unwrapped types.
  // For instance, if an unexpected C type implements the C interface.
  explicit Volume(GVolume* castitem);

protected:
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:

  Volume(Volume&& src) noexcept;
  Volume& operator=(Volume&& src) noexcept;

  ~Volume() noexcept override;

  static void add_interface(GType gtype_implementer);

  /** 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.
  GVolume*       gobj()       { return reinterpret_cast<GVolume*>(gobject_); }

  ///Provides access to the underlying C GObject.
  const GVolume* gobj() const { return reinterpret_cast<GVolume*>(gobject_); }

private:

public:
  
  /** Gets the name of @a volume.
   * 
   * @return The name for the given @a volume.
   */
  std::string get_name() const;
  
  /** Gets the UUID for the @a volume. The reference is typically based on
   * the file system UUID for the volume in question and should be
   * considered an opaque string. Returns <tt>nullptr</tt> if there is no UUID
   * available.
   * 
   * @return The UUID for @a volume or <tt>nullptr</tt> if no UUID can be computed.
   */
  std::string get_uuid() const;

  
  /** Gets the icon for @a volume.
   * 
   * @return A Icon.
   * The returned object should be unreffed with Glib::object_unref()
   * when no longer needed.
   */
  Glib::RefPtr<Icon> get_icon();
  
  /** Gets the icon for @a volume.
   * 
   * @return A Icon.
   * The returned object should be unreffed with Glib::object_unref()
   * when no longer needed.
   */
  Glib::RefPtr<const Icon> get_icon() const;

  
  /** Gets the symbolic icon for @a volume.
   * 
   * @newin{2,34}
   * 
   * @return A Icon.
   * The returned object should be unreffed with Glib::object_unref()
   * when no longer needed.
   */
  Glib::RefPtr<Icon> get_symbolic_icon();
  
  /** Gets the symbolic icon for @a volume.
   * 
   * @newin{2,34}
   * 
   * @return A Icon.
   * The returned object should be unreffed with Glib::object_unref()
   * when no longer needed.
   */
  Glib::RefPtr<const Icon> get_symbolic_icon() const;

  
  /** Gets the drive for the @a volume.
   * 
   * @return A Drive or <tt>nullptr</tt> if @a volume is not
   * associated with a drive. The returned object should be unreffed
   * with Glib::object_unref() when no longer needed.
   */
  Glib::RefPtr<Drive> get_drive();
  
  /** Gets the drive for the @a volume.
   * 
   * @return A Drive or <tt>nullptr</tt> if @a volume is not
   * associated with a drive. The returned object should be unreffed
   * with Glib::object_unref() when no longer needed.
   */
  Glib::RefPtr<const Drive> get_drive() const;

 
  /** Gets the mount for the @a volume.
   * 
   * @return A Mount or <tt>nullptr</tt> if @a volume isn't mounted.
   * The returned object should be unreffed with Glib::object_unref()
   * when no longer needed.
   */
  Glib::RefPtr<Mount> get_mount();
  
  /** Gets the mount for the @a volume.
   * 
   * @return A Mount or <tt>nullptr</tt> if @a volume isn't mounted.
   * The returned object should be unreffed with Glib::object_unref()
   * when no longer needed.
   */
  Glib::RefPtr<const Mount> get_mount() const;

  
  /** Checks if a volume can be mounted.
   * 
   * @return <tt>true</tt> if the @a volume can be mounted. <tt>false</tt> otherwise.
   */
  bool can_mount() const;
  
  /** Checks if a volume can be ejected.
   * 
   * @return <tt>true</tt> if the @a volume can be ejected. <tt>false</tt> otherwise.
   */
  bool can_eject() const;
  
  /** Returns whether the volume should be automatically mounted.
   * 
   * @return <tt>true</tt> if the volume should be automatically mounted.
   */
  bool should_automount() const;

  /** Mounts a volume.
   * This is an asynchronous operation, and is finished by calling mount_finish() with the AsyncResult data returned in the callback slot.
   *
   * @param mount_operation A mount operation.
   * @param slot A callback which will be called when the operation is completed or canceled.
   * @param cancellable A cancellable object which can be used to cancel the operation.
   * @param flags Flags affecting the operation.
   */
  void mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountMountFlags flags = MOUNT_MOUNT_NONE);

  /** Mounts a volume.
   * This is an asynchronous operation, and is finished by calling mount_finish() with the AsyncResult data returned in the callback slot.
   *
   * @param mount_operation A mount operation.
   * @param slot A callback which will be called when the operation is completed or canceled.
   * @param flags Flags affecting the operation.
   */
  void mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, MountMountFlags flags = MOUNT_MOUNT_NONE);

  /** Mounts a volume.
   *
   * @param mount_operation A mount operation.
   * @param flags Flags affecting the operation.
   */
  void mount(const Glib::RefPtr<MountOperation>& mount_operation, MountMountFlags flags = MOUNT_MOUNT_NONE);

  /** Mounts a volume.
   *
   * @param flags Flags affecting the operation.
   */
  void mount(MountMountFlags flags = MOUNT_MOUNT_NONE);

  
  /** Finishes mounting a volume. If any errors occurred during the operation,
   *  @a error will be set to contain the errors and <tt>false</tt> will be returned.
   * 
   * If the mount operation succeeded, g_volume_get_mount() on @a volume
   * is guaranteed to return the mount right after calling this
   * function; there's no need to listen for the 'mount-added' signal on
   * VolumeMonitor.
   * 
   * @param result A AsyncResult.
   * @return <tt>true</tt>, <tt>false</tt> if operation failed.
   * 
   * @throws Glib::Error
   */
  bool mount_finish(const Glib::RefPtr<AsyncResult>& result);

  void eject(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountUnmountFlags flags = MOUNT_UNMOUNT_NONE);
  void eject(const SlotAsyncReady& slot, MountUnmountFlags flags = MOUNT_UNMOUNT_NONE);
  void eject(MountUnmountFlags flags = MOUNT_UNMOUNT_NONE);
  void eject(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountUnmountFlags flags = MOUNT_UNMOUNT_NONE);
  void eject(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, MountUnmountFlags flags = MOUNT_UNMOUNT_NONE);
  void eject(const Glib::RefPtr<MountOperation>& mount_operation, MountUnmountFlags flags = MOUNT_UNMOUNT_NONE);
  
  
  /** Finishes ejecting a volume. If any errors occurred during the operation,
   *  @a error will be set to contain the errors and <tt>false</tt> will be returned.
   * 
   * @newin{2,22}
   * 
   * @param result A AsyncResult.
   * @return <tt>true</tt> if the volume was successfully ejected. <tt>false</tt> otherwise.
   * 
   * @throws Glib::Error
   */
  bool eject_finish(const Glib::RefPtr<AsyncResult>& result);
  

  /** Gets the identifier of the given kind for @a volume. 
   * See the [introduction][volume-identifier] for more
   * information about volume identifiers.
   * 
   * @param kind The kind of identifier to return.
   * @return A newly allocated string containing the
   * requested identfier, or <tt>nullptr</tt> if the Volume
   * doesn't have this kind of identifier.
   */
  std::string get_identifier(const std::string& kind) const;

   
  /** Gets the kinds of [identifiers][volume-identifier] that @a volume has.
   * Use g_volume_get_identifier() to obtain the identifiers themselves.
   * 
   * @return A <tt>nullptr</tt>-terminated array
   * of strings containing kinds of identifiers.
   */
  Glib::StringArrayHandle enumerate_identifiers() const;

  
  /** Gets the activation root for a Volume if it is known ahead of
   * mount time. Returns <tt>nullptr</tt> otherwise. If not <tt>nullptr</tt> and if @a volume
   * is mounted, then the result of g_mount_get_root() on the
   * Mount object obtained from g_volume_get_mount() will always
   * either be equal or a prefix of what this function returns. In
   * other words, in code
   * 
   * 
   * [C example ellipted]
   * then the expression
   * 
   * [C example ellipted]
   * will always be <tt>true</tt>.
   * 
   * Activation roots are typically used in VolumeMonitor
   * implementations to find the underlying mount to shadow, see
   * g_mount_is_shadowed() for more details.
   * 
   * @newin{2,18}
   * 
   * @return The activation root of @a volume
   * or <tt>nullptr</tt>. Use Glib::object_unref() to free.
   */
  Glib::RefPtr<File> get_activation_root();
  
  /** Gets the activation root for a Volume if it is known ahead of
   * mount time. Returns <tt>nullptr</tt> otherwise. If not <tt>nullptr</tt> and if @a volume
   * is mounted, then the result of g_mount_get_root() on the
   * Mount object obtained from g_volume_get_mount() will always
   * either be equal or a prefix of what this function returns. In
   * other words, in code
   * 
   * 
   * [C example ellipted]
   * then the expression
   * 
   * [C example ellipted]
   * will always be <tt>true</tt>.
   * 
   * Activation roots are typically used in VolumeMonitor
   * implementations to find the underlying mount to shadow, see
   * g_mount_is_shadowed() for more details.
   * 
   * @newin{2,18}
   * 
   * @return The activation root of @a volume
   * or <tt>nullptr</tt>. Use Glib::object_unref() to free.
   */
  Glib::RefPtr<const File> get_activation_root() const;

  
  /** Gets the sort key for @a volume, if any.
   * 
   * @newin{2,32}
   * 
   * @return Sorting key for @a volume or <tt>nullptr</tt> if no such key is available.
   */
  Glib::ustring sort_key();

  
  /**
   * @par Slot Prototype:
   * <tt>void on_my_%changed()</tt>
   *
   * Flags: Run Last
   *
   * Emitted when the volume has been changed.
   */

  Glib::SignalProxy< void > signal_changed();

  
  /**
   * @par Slot Prototype:
   * <tt>void on_my_%removed()</tt>
   *
   * Flags: Run Last
   *
   * This signal is emitted when the Volume have been removed. If
   * the recipient is holding references to the object they should
   * release them so the object can be finalized.
   */

  Glib::SignalProxy< void > signal_removed();


  //_WRAP_VFUNC(std::string get_name(), get_name)
  //_WRAP_VFUNC(Glib::RefPtr<Icon> get_icon(), get_icon)
  //_WRAP_VFUNC(std::string get_uuid(), get_uuid)

 
  //_WRAP_VFUNC(Glib::RefPtr<Drive> get_drive(), get_drive)

 
  //_WRAP_VFUNC(Glib::RefPtr<Mount> get_mount(), get_mount)

  //_WRAP_VFUNC(bool can_mount(), can_mount)
  //_WRAP_VFUNC(bool can_eject(), can_eject)
  //_WRAP_VFUNC(void mount_fn(GMountMountFlags flags, GMountOperation* mount_operation, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data), mount_fn) //TODO: Rename to mount()?
  //_WRAP_VFUNC(bool mount_finish(GAsyncResult* result, GError** error), mount_finish)
  //_WRAP_VFUNC(void eject(GMountUnmountFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data), eject)
  //_WRAP_VFUNC(bool eject_finish(GAsyncResult* result, GError** error), eject_finish)

  //_WRAP_VFUNC(std::string get_identifier(const std::string& kind), get_identifier)

  //TODO: Use an ArrayHandle.
  //_WRAP_VFUNC(char** enumerate_identifiers(), enumerate_identifiers)

  //_WRAP_VFUNC(bool should_automount(), should_automount)


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_changed().
  virtual void on_changed();
  /// This is a default handler for the signal signal_removed().
  virtual void on_removed();


};

} // namespace Gio

namespace Glib
{

//Pre-declare this so we can use it in TypeTrait:
Glib::RefPtr<Gio::Volume> wrap(GVolume* object, bool take_copy);

namespace Container_Helpers
{

/** This specialization of TypeTraits exists
 * because the default use of Glib::wrap(GObject*),
 * instead of a specific Glib::wrap(GSomeInterface*),
 * would not return a wrapper for an interface.
 */
template <>
struct TypeTraits< Glib::RefPtr<Gio::Volume> >
{
  using CppType = Glib::RefPtr<Gio::Volume>;
  using CType = GVolume*;
  using CTypeNonConst = GVolume*;

  static CType   to_c_type      (const CppType& item)
  { return Glib::unwrap (item); }

  static CppType to_cpp_type    (const CType& item)
  {
    //Use a specific Glib::wrap() function,
    //because CType has the specific type (not just GObject):
    return Glib::wrap(item, true /* take_copy */);
  }

  static void    release_c_type (CType item)
  {
    GLIBMM_DEBUG_UNREFERENCE(nullptr, item);
    g_object_unref(item);
  }
};

} // Container_Helpers
} // Glib


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::Volume
   */
  Glib::RefPtr<Gio::Volume> wrap(GVolume* object, bool take_copy = false);

} // namespace Glib


#endif /* _GIOMM_VOLUME_H */