File indexing completed on 2025-01-18 09:59:58
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_MOUNT_H__
0025 #define __G_MOUNT_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 #define G_TYPE_MOUNT (g_mount_get_type ())
0036 #define G_MOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_MOUNT, GMount))
0037 #define G_IS_MOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_MOUNT))
0038 #define G_MOUNT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_MOUNT, GMountIface))
0039
0040 typedef struct _GMountIface GMountIface;
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077 struct _GMountIface
0078 {
0079 GTypeInterface g_iface;
0080
0081
0082
0083 void (* changed) (GMount *mount);
0084 void (* unmounted) (GMount *mount);
0085
0086
0087
0088 GFile * (* get_root) (GMount *mount);
0089 char * (* get_name) (GMount *mount);
0090 GIcon * (* get_icon) (GMount *mount);
0091 char * (* get_uuid) (GMount *mount);
0092 GVolume * (* get_volume) (GMount *mount);
0093 GDrive * (* get_drive) (GMount *mount);
0094 gboolean (* can_unmount) (GMount *mount);
0095 gboolean (* can_eject) (GMount *mount);
0096
0097 void (* unmount) (GMount *mount,
0098 GMountUnmountFlags flags,
0099 GCancellable *cancellable,
0100 GAsyncReadyCallback callback,
0101 gpointer user_data);
0102 gboolean (* unmount_finish) (GMount *mount,
0103 GAsyncResult *result,
0104 GError **error);
0105
0106 void (* eject) (GMount *mount,
0107 GMountUnmountFlags flags,
0108 GCancellable *cancellable,
0109 GAsyncReadyCallback callback,
0110 gpointer user_data);
0111 gboolean (* eject_finish) (GMount *mount,
0112 GAsyncResult *result,
0113 GError **error);
0114
0115 void (* remount) (GMount *mount,
0116 GMountMountFlags flags,
0117 GMountOperation *mount_operation,
0118 GCancellable *cancellable,
0119 GAsyncReadyCallback callback,
0120 gpointer user_data);
0121 gboolean (* remount_finish) (GMount *mount,
0122 GAsyncResult *result,
0123 GError **error);
0124
0125 void (* guess_content_type) (GMount *mount,
0126 gboolean force_rescan,
0127 GCancellable *cancellable,
0128 GAsyncReadyCallback callback,
0129 gpointer user_data);
0130 gchar ** (* guess_content_type_finish) (GMount *mount,
0131 GAsyncResult *result,
0132 GError **error);
0133 gchar ** (* guess_content_type_sync) (GMount *mount,
0134 gboolean force_rescan,
0135 GCancellable *cancellable,
0136 GError **error);
0137
0138
0139 void (* pre_unmount) (GMount *mount);
0140
0141 void (* unmount_with_operation) (GMount *mount,
0142 GMountUnmountFlags flags,
0143 GMountOperation *mount_operation,
0144 GCancellable *cancellable,
0145 GAsyncReadyCallback callback,
0146 gpointer user_data);
0147 gboolean (* unmount_with_operation_finish) (GMount *mount,
0148 GAsyncResult *result,
0149 GError **error);
0150
0151 void (* eject_with_operation) (GMount *mount,
0152 GMountUnmountFlags flags,
0153 GMountOperation *mount_operation,
0154 GCancellable *cancellable,
0155 GAsyncReadyCallback callback,
0156 gpointer user_data);
0157 gboolean (* eject_with_operation_finish) (GMount *mount,
0158 GAsyncResult *result,
0159 GError **error);
0160 GFile * (* get_default_location) (GMount *mount);
0161
0162 const gchar * (* get_sort_key) (GMount *mount);
0163 GIcon * (* get_symbolic_icon) (GMount *mount);
0164 };
0165
0166 GIO_AVAILABLE_IN_ALL
0167 GType g_mount_get_type (void) G_GNUC_CONST;
0168
0169 GIO_AVAILABLE_IN_ALL
0170 GFile * g_mount_get_root (GMount *mount);
0171 GIO_AVAILABLE_IN_ALL
0172 GFile * g_mount_get_default_location (GMount *mount);
0173 GIO_AVAILABLE_IN_ALL
0174 char * g_mount_get_name (GMount *mount);
0175 GIO_AVAILABLE_IN_ALL
0176 GIcon * g_mount_get_icon (GMount *mount);
0177 GIO_AVAILABLE_IN_ALL
0178 GIcon * g_mount_get_symbolic_icon (GMount *mount);
0179 GIO_AVAILABLE_IN_ALL
0180 char * g_mount_get_uuid (GMount *mount);
0181 GIO_AVAILABLE_IN_ALL
0182 GVolume * g_mount_get_volume (GMount *mount);
0183 GIO_AVAILABLE_IN_ALL
0184 GDrive * g_mount_get_drive (GMount *mount);
0185 GIO_AVAILABLE_IN_ALL
0186 gboolean g_mount_can_unmount (GMount *mount);
0187 GIO_AVAILABLE_IN_ALL
0188 gboolean g_mount_can_eject (GMount *mount);
0189
0190 GIO_DEPRECATED_FOR(g_mount_unmount_with_operation)
0191 void g_mount_unmount (GMount *mount,
0192 GMountUnmountFlags flags,
0193 GCancellable *cancellable,
0194 GAsyncReadyCallback callback,
0195 gpointer user_data);
0196
0197 GIO_DEPRECATED_FOR(g_mount_unmount_with_operation_finish)
0198 gboolean g_mount_unmount_finish (GMount *mount,
0199 GAsyncResult *result,
0200 GError **error);
0201
0202 GIO_DEPRECATED_FOR(g_mount_eject_with_operation)
0203 void g_mount_eject (GMount *mount,
0204 GMountUnmountFlags flags,
0205 GCancellable *cancellable,
0206 GAsyncReadyCallback callback,
0207 gpointer user_data);
0208
0209 GIO_DEPRECATED_FOR(g_mount_eject_with_operation_finish)
0210 gboolean g_mount_eject_finish (GMount *mount,
0211 GAsyncResult *result,
0212 GError **error);
0213
0214 GIO_AVAILABLE_IN_ALL
0215 void g_mount_remount (GMount *mount,
0216 GMountMountFlags flags,
0217 GMountOperation *mount_operation,
0218 GCancellable *cancellable,
0219 GAsyncReadyCallback callback,
0220 gpointer user_data);
0221 GIO_AVAILABLE_IN_ALL
0222 gboolean g_mount_remount_finish (GMount *mount,
0223 GAsyncResult *result,
0224 GError **error);
0225
0226 GIO_AVAILABLE_IN_ALL
0227 void g_mount_guess_content_type (GMount *mount,
0228 gboolean force_rescan,
0229 GCancellable *cancellable,
0230 GAsyncReadyCallback callback,
0231 gpointer user_data);
0232 GIO_AVAILABLE_IN_ALL
0233 gchar ** g_mount_guess_content_type_finish (GMount *mount,
0234 GAsyncResult *result,
0235 GError **error);
0236 GIO_AVAILABLE_IN_ALL
0237 gchar ** g_mount_guess_content_type_sync (GMount *mount,
0238 gboolean force_rescan,
0239 GCancellable *cancellable,
0240 GError **error);
0241
0242 GIO_AVAILABLE_IN_ALL
0243 gboolean g_mount_is_shadowed (GMount *mount);
0244 GIO_AVAILABLE_IN_ALL
0245 void g_mount_shadow (GMount *mount);
0246 GIO_AVAILABLE_IN_ALL
0247 void g_mount_unshadow (GMount *mount);
0248
0249 GIO_AVAILABLE_IN_ALL
0250 void g_mount_unmount_with_operation (GMount *mount,
0251 GMountUnmountFlags flags,
0252 GMountOperation *mount_operation,
0253 GCancellable *cancellable,
0254 GAsyncReadyCallback callback,
0255 gpointer user_data);
0256 GIO_AVAILABLE_IN_ALL
0257 gboolean g_mount_unmount_with_operation_finish (GMount *mount,
0258 GAsyncResult *result,
0259 GError **error);
0260
0261 GIO_AVAILABLE_IN_ALL
0262 void g_mount_eject_with_operation (GMount *mount,
0263 GMountUnmountFlags flags,
0264 GMountOperation *mount_operation,
0265 GCancellable *cancellable,
0266 GAsyncReadyCallback callback,
0267 gpointer user_data);
0268 GIO_AVAILABLE_IN_ALL
0269 gboolean g_mount_eject_with_operation_finish (GMount *mount,
0270 GAsyncResult *result,
0271 GError **error);
0272
0273 GIO_AVAILABLE_IN_ALL
0274 const gchar *g_mount_get_sort_key (GMount *mount);
0275
0276 G_END_DECLS
0277
0278 #endif