File indexing completed on 2025-01-18 10:00:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #ifndef __G_VOLUME_H__
0025 #define __G_VOLUME_H__
0026
0027 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0028 #error "Only <gio/gio.h> can be included directly."
0029 #endif
0030
0031 #include <gio/giotypes.h>
0032
0033 G_BEGIN_DECLS
0034
0035
0036
0037
0038
0039
0040
0041
0042 #define G_VOLUME_IDENTIFIER_KIND_HAL_UDI "hal-udi" GIO_DEPRECATED_MACRO_IN_2_58
0043
0044
0045
0046
0047
0048
0049 #define G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE "unix-device"
0050
0051
0052
0053
0054
0055
0056 #define G_VOLUME_IDENTIFIER_KIND_LABEL "label"
0057
0058
0059
0060
0061
0062
0063 #define G_VOLUME_IDENTIFIER_KIND_UUID "uuid"
0064
0065
0066
0067
0068
0069
0070 #define G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT "nfs-mount"
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085 #define G_VOLUME_IDENTIFIER_KIND_CLASS "class"
0086
0087
0088 #define G_TYPE_VOLUME (g_volume_get_type ())
0089 #define G_VOLUME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_VOLUME, GVolume))
0090 #define G_IS_VOLUME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_VOLUME))
0091 #define G_VOLUME_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_VOLUME, GVolumeIface))
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126 typedef struct _GVolumeIface GVolumeIface;
0127
0128 struct _GVolumeIface
0129 {
0130 GTypeInterface g_iface;
0131
0132
0133
0134 void (* changed) (GVolume *volume);
0135 void (* removed) (GVolume *volume);
0136
0137
0138
0139 char * (* get_name) (GVolume *volume);
0140 GIcon * (* get_icon) (GVolume *volume);
0141 char * (* get_uuid) (GVolume *volume);
0142 GDrive * (* get_drive) (GVolume *volume);
0143 GMount * (* get_mount) (GVolume *volume);
0144 gboolean (* can_mount) (GVolume *volume);
0145 gboolean (* can_eject) (GVolume *volume);
0146 void (* mount_fn) (GVolume *volume,
0147 GMountMountFlags flags,
0148 GMountOperation *mount_operation,
0149 GCancellable *cancellable,
0150 GAsyncReadyCallback callback,
0151 gpointer user_data);
0152 gboolean (* mount_finish) (GVolume *volume,
0153 GAsyncResult *result,
0154 GError **error);
0155 void (* eject) (GVolume *volume,
0156 GMountUnmountFlags flags,
0157 GCancellable *cancellable,
0158 GAsyncReadyCallback callback,
0159 gpointer user_data);
0160 gboolean (* eject_finish) (GVolume *volume,
0161 GAsyncResult *result,
0162 GError **error);
0163
0164 char * (* get_identifier) (GVolume *volume,
0165 const char *kind);
0166 char ** (* enumerate_identifiers) (GVolume *volume);
0167
0168 gboolean (* should_automount) (GVolume *volume);
0169
0170 GFile * (* get_activation_root) (GVolume *volume);
0171
0172 void (* eject_with_operation) (GVolume *volume,
0173 GMountUnmountFlags flags,
0174 GMountOperation *mount_operation,
0175 GCancellable *cancellable,
0176 GAsyncReadyCallback callback,
0177 gpointer user_data);
0178 gboolean (* eject_with_operation_finish) (GVolume *volume,
0179 GAsyncResult *result,
0180 GError **error);
0181
0182 const gchar * (* get_sort_key) (GVolume *volume);
0183 GIcon * (* get_symbolic_icon) (GVolume *volume);
0184 };
0185
0186 GIO_AVAILABLE_IN_ALL
0187 GType g_volume_get_type (void) G_GNUC_CONST;
0188
0189 GIO_AVAILABLE_IN_ALL
0190 char * g_volume_get_name (GVolume *volume);
0191 GIO_AVAILABLE_IN_ALL
0192 GIcon * g_volume_get_icon (GVolume *volume);
0193 GIO_AVAILABLE_IN_ALL
0194 GIcon * g_volume_get_symbolic_icon (GVolume *volume);
0195 GIO_AVAILABLE_IN_ALL
0196 char * g_volume_get_uuid (GVolume *volume);
0197 GIO_AVAILABLE_IN_ALL
0198 GDrive * g_volume_get_drive (GVolume *volume);
0199 GIO_AVAILABLE_IN_ALL
0200 GMount * g_volume_get_mount (GVolume *volume);
0201 GIO_AVAILABLE_IN_ALL
0202 gboolean g_volume_can_mount (GVolume *volume);
0203 GIO_AVAILABLE_IN_ALL
0204 gboolean g_volume_can_eject (GVolume *volume);
0205 GIO_AVAILABLE_IN_ALL
0206 gboolean g_volume_should_automount (GVolume *volume);
0207 GIO_AVAILABLE_IN_ALL
0208 void g_volume_mount (GVolume *volume,
0209 GMountMountFlags flags,
0210 GMountOperation *mount_operation,
0211 GCancellable *cancellable,
0212 GAsyncReadyCallback callback,
0213 gpointer user_data);
0214 GIO_AVAILABLE_IN_ALL
0215 gboolean g_volume_mount_finish (GVolume *volume,
0216 GAsyncResult *result,
0217 GError **error);
0218 GIO_DEPRECATED_FOR(g_volume_eject_with_operation)
0219 void g_volume_eject (GVolume *volume,
0220 GMountUnmountFlags flags,
0221 GCancellable *cancellable,
0222 GAsyncReadyCallback callback,
0223 gpointer user_data);
0224
0225 GIO_DEPRECATED_FOR(g_volume_eject_with_operation_finish)
0226 gboolean g_volume_eject_finish (GVolume *volume,
0227 GAsyncResult *result,
0228 GError **error);
0229 GIO_AVAILABLE_IN_ALL
0230 char * g_volume_get_identifier (GVolume *volume,
0231 const char *kind);
0232 GIO_AVAILABLE_IN_ALL
0233 char ** g_volume_enumerate_identifiers (GVolume *volume);
0234
0235 GIO_AVAILABLE_IN_ALL
0236 GFile * g_volume_get_activation_root (GVolume *volume);
0237
0238 GIO_AVAILABLE_IN_ALL
0239 void g_volume_eject_with_operation (GVolume *volume,
0240 GMountUnmountFlags flags,
0241 GMountOperation *mount_operation,
0242 GCancellable *cancellable,
0243 GAsyncReadyCallback callback,
0244 gpointer user_data);
0245 GIO_AVAILABLE_IN_ALL
0246 gboolean g_volume_eject_with_operation_finish (GVolume *volume,
0247 GAsyncResult *result,
0248 GError **error);
0249
0250 GIO_AVAILABLE_IN_2_32
0251 const gchar *g_volume_get_sort_key (GVolume *volume);
0252
0253 G_END_DECLS
0254
0255 #endif