/usr/include/gnome-disk-utility/gdu/gdu-device.h is in libgdu-dev 3.0.2-2ubuntu7.
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 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
/* gdu-device.h
*
* Copyright (C) 2007 David Zeuthen
*
* 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 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#if !defined (__GDU_INSIDE_GDU_H) && !defined (GDU_COMPILATION)
#error "Only <gdu/gdu.h> can be included directly, this file may disappear or change contents."
#endif
#ifndef __GDU_DEVICE_H
#define __GDU_DEVICE_H
#include <unistd.h>
#include <sys/types.h>
#include <gdu/gdu-types.h>
#include <gdu/gdu-callbacks.h>
G_BEGIN_DECLS
#define GDU_TYPE_DEVICE (gdu_device_get_type ())
#define GDU_DEVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDU_TYPE_DEVICE, GduDevice))
#define GDU_DEVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GDU_DEVICE, GduDeviceClass))
#define GDU_IS_DEVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDU_TYPE_DEVICE))
#define GDU_IS_DEVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDU_TYPE_DEVICE))
#define GDU_DEVICE_GET_CLASS(k) (G_TYPE_INSTANCE_GET_CLASS ((k), GDU_TYPE_DEVICE, GduDeviceClass))
typedef struct _GduDeviceClass GduDeviceClass;
typedef struct _GduDevicePrivate GduDevicePrivate;
struct _GduDevice
{
GObject parent;
/* private */
GduDevicePrivate *priv;
};
struct _GduDeviceClass
{
GObjectClass parent_class;
/* signals */
void (*changed) (GduDevice *device);
void (*job_changed) (GduDevice *device);
void (*removed) (GduDevice *device);
};
GType gdu_device_get_type (void);
const char *gdu_device_get_object_path (GduDevice *device);
GduDevice *gdu_device_find_parent (GduDevice *device);
GduPool *gdu_device_get_pool (GduDevice *device);
dev_t gdu_device_get_dev (GduDevice *device);
guint64 gdu_device_get_detection_time (GduDevice *device);
guint64 gdu_device_get_media_detection_time (GduDevice *device);
const char *gdu_device_get_device_file (GduDevice *device);
const char *gdu_device_get_device_file_presentation (GduDevice *device);
guint64 gdu_device_get_size (GduDevice *device);
guint64 gdu_device_get_block_size (GduDevice *device);
gboolean gdu_device_is_removable (GduDevice *device);
gboolean gdu_device_is_media_available (GduDevice *device);
gboolean gdu_device_is_media_change_detected (GduDevice *device);
gboolean gdu_device_is_media_change_detection_polling (GduDevice *device);
gboolean gdu_device_is_media_change_detection_inhibitable (GduDevice *device);
gboolean gdu_device_is_media_change_detection_inhibited (GduDevice *device);
gboolean gdu_device_is_read_only (GduDevice *device);
gboolean gdu_device_is_system_internal (GduDevice *device);
gboolean gdu_device_is_partition (GduDevice *device);
gboolean gdu_device_is_partition_table (GduDevice *device);
gboolean gdu_device_is_drive (GduDevice *device);
gboolean gdu_device_is_optical_disc (GduDevice *device);
gboolean gdu_device_is_luks (GduDevice *device);
gboolean gdu_device_is_luks_cleartext (GduDevice *device);
gboolean gdu_device_is_linux_md_component (GduDevice *device);
gboolean gdu_device_is_linux_md (GduDevice *device);
gboolean gdu_device_is_linux_lvm2_lv (GduDevice *device);
gboolean gdu_device_is_linux_lvm2_pv (GduDevice *device);
gboolean gdu_device_is_linux_dmmp (GduDevice *device);
gboolean gdu_device_is_linux_dmmp_component (GduDevice *device);
gboolean gdu_device_is_linux_loop (GduDevice *device);
gboolean gdu_device_is_mounted (GduDevice *device);
const char *gdu_device_get_mount_path (GduDevice *device);
char **gdu_device_get_mount_paths (GduDevice *device);
uid_t gdu_device_get_mounted_by_uid (GduDevice *device);
gboolean gdu_device_get_presentation_hide (GduDevice *device);
gboolean gdu_device_get_presentation_nopolicy (GduDevice *device);
const char *gdu_device_get_presentation_name (GduDevice *device);
const char *gdu_device_get_presentation_icon_name (GduDevice *device);
gboolean gdu_device_job_in_progress (GduDevice *device);
const char *gdu_device_job_get_id (GduDevice *device);
uid_t gdu_device_job_get_initiated_by_uid (GduDevice *device);
gboolean gdu_device_job_is_cancellable (GduDevice *device);
double gdu_device_job_get_percentage (GduDevice *device);
const char *gdu_device_id_get_usage (GduDevice *device);
const char *gdu_device_id_get_type (GduDevice *device);
const char *gdu_device_id_get_version (GduDevice *device);
const char *gdu_device_id_get_label (GduDevice *device);
const char *gdu_device_id_get_uuid (GduDevice *device);
const char *gdu_device_partition_get_slave (GduDevice *device);
const char *gdu_device_partition_get_scheme (GduDevice *device);
const char *gdu_device_partition_get_type (GduDevice *device);
const char *gdu_device_partition_get_label (GduDevice *device);
const char *gdu_device_partition_get_uuid (GduDevice *device);
char **gdu_device_partition_get_flags (GduDevice *device);
int gdu_device_partition_get_number (GduDevice *device);
guint64 gdu_device_partition_get_offset (GduDevice *device);
guint64 gdu_device_partition_get_size (GduDevice *device);
guint64 gdu_device_partition_get_alignment_offset (GduDevice *device);
const char *gdu_device_partition_table_get_scheme (GduDevice *device);
int gdu_device_partition_table_get_count (GduDevice *device);
const char *gdu_device_luks_get_holder (GduDevice *device);
const char *gdu_device_luks_cleartext_get_slave (GduDevice *device);
uid_t gdu_device_luks_cleartext_unlocked_by_uid (GduDevice *device);
const char *gdu_device_drive_get_vendor (GduDevice *device);
const char *gdu_device_drive_get_model (GduDevice *device);
const char *gdu_device_drive_get_revision (GduDevice *device);
const char *gdu_device_drive_get_serial (GduDevice *device);
const char *gdu_device_drive_get_wwn (GduDevice *device);
const char *gdu_device_drive_get_connection_interface (GduDevice *device);
guint64 gdu_device_drive_get_connection_speed (GduDevice *device);
char **gdu_device_drive_get_media_compatibility (GduDevice *device);
const gchar *gdu_device_get_automount_hint(GduDevice *device);
const char *gdu_device_drive_get_media (GduDevice *device);
gboolean gdu_device_drive_get_is_media_ejectable (GduDevice *device);
gboolean gdu_device_drive_get_requires_eject (GduDevice *device);
gboolean gdu_device_drive_get_can_detach (GduDevice *device);
gboolean gdu_device_drive_get_can_spindown (GduDevice *device);
gboolean gdu_device_drive_get_is_rotational (GduDevice *device);
guint gdu_device_drive_get_rotation_rate (GduDevice *device);
const char *gdu_device_drive_get_write_cache (GduDevice *device);
const char *gdu_device_drive_get_adapter (GduDevice *device);
char **gdu_device_drive_get_ports (GduDevice *device);
char **gdu_device_drive_get_similar_devices (GduDevice *device);
gboolean gdu_device_optical_disc_get_is_blank (GduDevice *device);
gboolean gdu_device_optical_disc_get_is_appendable (GduDevice *device);
gboolean gdu_device_optical_disc_get_is_closed (GduDevice *device);
guint gdu_device_optical_disc_get_num_tracks (GduDevice *device);
guint gdu_device_optical_disc_get_num_audio_tracks (GduDevice *device);
guint gdu_device_optical_disc_get_num_sessions (GduDevice *device);
const char *gdu_device_linux_md_component_get_level (GduDevice *device);
int gdu_device_linux_md_component_get_position (GduDevice *device);
int gdu_device_linux_md_component_get_num_raid_devices (GduDevice *device);
const char *gdu_device_linux_md_component_get_uuid (GduDevice *device);
const char *gdu_device_linux_md_component_get_home_host (GduDevice *device);
const char *gdu_device_linux_md_component_get_name (GduDevice *device);
const char *gdu_device_linux_md_component_get_version (GduDevice *device);
const char *gdu_device_linux_md_component_get_holder (GduDevice *device);
char **gdu_device_linux_md_component_get_state (GduDevice *device);
const char *gdu_device_linux_md_get_state (GduDevice *device);
const char *gdu_device_linux_md_get_level (GduDevice *device);
int gdu_device_linux_md_get_num_raid_devices (GduDevice *device);
const char *gdu_device_linux_md_get_uuid (GduDevice *device);
const char *gdu_device_linux_md_get_home_host (GduDevice *device);
const char *gdu_device_linux_md_get_name (GduDevice *device);
const char *gdu_device_linux_md_get_version (GduDevice *device);
char **gdu_device_linux_md_get_slaves (GduDevice *device);
gboolean gdu_device_linux_md_is_degraded (GduDevice *device);
const char *gdu_device_linux_md_get_sync_action (GduDevice *device);
double gdu_device_linux_md_get_sync_percentage (GduDevice *device);
guint64 gdu_device_linux_md_get_sync_speed (GduDevice *device);
const char *gdu_device_linux_lvm2_lv_get_name (GduDevice *device);
const char *gdu_device_linux_lvm2_lv_get_uuid (GduDevice *device);
const char *gdu_device_linux_lvm2_lv_get_group_name (GduDevice *device);
const char *gdu_device_linux_lvm2_lv_get_group_uuid (GduDevice *device);
const char *gdu_device_linux_lvm2_pv_get_uuid (GduDevice *device);
guint gdu_device_linux_lvm2_pv_get_num_metadata_areas (GduDevice *device);
const char *gdu_device_linux_lvm2_pv_get_group_name (GduDevice *device);
const char *gdu_device_linux_lvm2_pv_get_group_uuid (GduDevice *device);
guint64 gdu_device_linux_lvm2_pv_get_group_size (GduDevice *device);
guint64 gdu_device_linux_lvm2_pv_get_group_unallocated_size (GduDevice *device);
guint64 gdu_device_linux_lvm2_pv_get_group_extent_size (GduDevice *device);
guint64 gdu_device_linux_lvm2_pv_get_group_sequence_number (GduDevice *device);
gchar **gdu_device_linux_lvm2_pv_get_group_physical_volumes (GduDevice *device);
gchar **gdu_device_linux_lvm2_pv_get_group_logical_volumes (GduDevice *device);
const char *gdu_device_linux_dmmp_component_get_holder (GduDevice *device);
const char *gdu_device_linux_dmmp_get_name (GduDevice *device);
char **gdu_device_linux_dmmp_get_slaves (GduDevice *device);
const char *gdu_device_linux_dmmp_get_parameters (GduDevice *device);
const char *gdu_device_linux_loop_get_filename (GduDevice *device);
gboolean gdu_device_drive_ata_smart_get_is_available (GduDevice *device);
guint64 gdu_device_drive_ata_smart_get_time_collected (GduDevice *device);
const gchar *gdu_device_drive_ata_smart_get_status (GduDevice *device);
gconstpointer gdu_device_drive_ata_smart_get_blob (GduDevice *device, gsize *out_size);
/* ---------------------------------------------------------------------------------------------------- */
gboolean gdu_device_should_ignore (GduDevice *device);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_filesystem_mount (GduDevice *device,
gchar **options,
GduDeviceFilesystemMountCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_filesystem_unmount (GduDevice *device,
GduDeviceFilesystemUnmountCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_filesystem_check (GduDevice *device,
GduDeviceFilesystemCheckCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_partition_delete (GduDevice *device,
GduDevicePartitionDeleteCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_partition_modify (GduDevice *device,
const char *type,
const char *label,
char **flags,
GduDevicePartitionModifyCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_partition_table_create (GduDevice *device,
const char *scheme,
GduDevicePartitionTableCreateCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_luks_unlock (GduDevice *device,
const char *secret,
GduDeviceLuksUnlockCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_luks_lock (GduDevice *device,
GduDeviceLuksLockCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_luks_change_passphrase (GduDevice *device,
const char *old_secret,
const char *new_secret,
GduDeviceLuksChangePassphraseCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_filesystem_set_label (GduDevice *device,
const char *new_label,
GduDeviceFilesystemSetLabelCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_drive_ata_smart_initiate_selftest (GduDevice *device,
const char *test,
GduDeviceDriveAtaSmartInitiateSelftestCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_drive_ata_smart_refresh_data (GduDevice *device,
GduDeviceDriveAtaSmartRefreshDataCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_linux_md_stop (GduDevice *device,
GduDeviceLinuxMdStopCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_linux_md_check (GduDevice *device,
gchar **options,
GduDeviceLinuxMdCheckCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_linux_md_add_spare (GduDevice *device,
const char *component_objpath,
GduDeviceLinuxMdAddSpareCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_linux_md_expand (GduDevice *device,
GPtrArray *component_objpaths,
GduDeviceLinuxMdExpandCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_linux_md_remove_component (GduDevice *device,
const char *component_objpath,
GduDeviceLinuxMdRemoveComponentCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_filesystem_create (GduDevice *device,
const char *fstype,
const char *fslabel,
const char *encrypt_passphrase,
gboolean fs_take_ownership,
GduDeviceFilesystemCreateCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_partition_create (GduDevice *device,
guint64 offset,
guint64 size,
const char *type,
const char *label,
char **flags,
const char *fstype,
const char *fslabel,
const char *encrypt_passphrase,
gboolean fs_take_ownership,
GduDevicePartitionCreateCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_cancel_job (GduDevice *device,
GduDeviceCancelJobCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_filesystem_list_open_files (GduDevice *device,
GduDeviceFilesystemListOpenFilesCompletedFunc callback,
gpointer user_data);
GList *gdu_device_filesystem_list_open_files_sync (GduDevice *device,
GError **error);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_drive_eject (GduDevice *device,
GduDeviceDriveEjectCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_drive_detach (GduDevice *device,
GduDeviceDriveDetachCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_drive_poll_media (GduDevice *device,
GduDeviceDrivePollMediaCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_drive_benchmark (GduDevice *device,
gboolean do_write_benchmark,
const gchar* const * options,
GduDeviceDriveBenchmarkCompletedFunc callback,
gpointer user_data);
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_linux_lvm2_lv_stop (GduDevice *device,
GduDeviceLinuxLvm2LVStopCompletedFunc callback,
gpointer user_data);
G_END_DECLS
#endif /* __GDU_DEVICE_H */
|