g_mount_is_shadowed
g_mount_shadow
g_mount_unshadow
+g_mount_get_sort_key
<SUBSECTION Standard>
G_IS_MOUNT
G_MOUNT
G_VOLUME_IDENTIFIER_KIND_UUID
g_volume_enumerate_identifiers
g_volume_get_identifier
+g_volume_get_sort_key
<SUBSECTION Standard>
G_VOLUME
G_IS_VOLUME
g_drive_stop_finish
g_drive_enumerate_identifiers
g_drive_get_identifier
+g_drive_get_sort_key
<SUBSECTION Standard>
G_DRIVE
G_IS_DRIVE
return (* iface->stop_finish) (drive, result, error);
}
+
+/**
+ * g_drive_get_sort_key:
+ * @drive: A #GDrive.
+ *
+ * Gets the sort key for @drive, if any.
+ *
+ * Returns: Sorting key for @drive or %NULL if no such key is available.
+ *
+ * Since: 2.32
+ */
+const gchar *
+g_drive_get_sort_key (GDrive *drive)
+{
+ const gchar *ret = NULL;
+ GDriveIface *iface;
+
+ g_return_val_if_fail (G_IS_DRIVE (drive), NULL);
+
+ iface = G_DRIVE_GET_IFACE (drive);
+ if (iface->get_sort_key != NULL)
+ ret = iface->get_sort_key (drive);
+
+ return ret;
+}
* @stop_button: Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.
* @eject_with_operation: Starts ejecting a #GDrive using a #GMountOperation. Since 2.22.
* @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
+ * @get_sort_key: Gets a key used for sorting #GDrive instances or %NULL if no such key exists. Since 2.32.
*
* Interface for creating #GDrive implementations.
*/
gboolean (* eject_with_operation_finish) (GDrive *drive,
GAsyncResult *result,
GError **error);
+
+ const gchar * (* get_sort_key) (GDrive *drive);
};
GType g_drive_get_type (void) G_GNUC_CONST;
GAsyncResult *result,
GError **error);
+const gchar *g_drive_get_sort_key (GDrive *drive);
+
G_END_DECLS
#endif /* __G_DRIVE_H__ */
g_drive_stop_finish
g_drive_eject
g_drive_eject_finish
+g_drive_get_sort_key
g_file_attribute_info_list_new
g_file_attribute_info_list_ref
g_file_attribute_info_list_unref
g_mount_unmount_finish
g_mount_eject
g_mount_eject_finish
+g_mount_get_sort_key
g_volume_get_type
g_volume_get_name
g_volume_get_icon
g_volume_get_activation_root
g_volume_eject
g_volume_eject_finish
+g_volume_get_sort_key
g_volume_monitor_get_type
g_volume_monitor_get_connected_drives
g_volume_monitor_get_volume_for_uuid
g_warning ("Shadow ref count on GMount is negative");
G_UNLOCK (priv_lock);
}
+
+/**
+ * g_mount_get_sort_key:
+ * @mount: A #GMount.
+ *
+ * Gets the sort key for @mount, if any.
+ *
+ * Returns: Sorting key for @mount or %NULL if no such key is available.
+ *
+ * Since: 2.32
+ */
+const gchar *
+g_mount_get_sort_key (GMount *mount)
+{
+ const gchar *ret = NULL;
+ GMountIface *iface;
+
+ g_return_val_if_fail (G_IS_MOUNT (mount), NULL);
+
+ iface = G_MOUNT_GET_IFACE (mount);
+ if (iface->get_sort_key != NULL)
+ ret = iface->get_sort_key (mount);
+
+ return ret;
+}
* @eject_with_operation: Starts ejecting a #GMount using a #GMountOperation. Since 2.22.
* @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
* @get_default_location: Gets a #GFile indication a start location that can be use as the entry point for this mount. Since 2.24.
+ * @get_sort_key: Gets a key used for sorting #GMount instance or %NULL if no such key exists. Since 2.32.
*
* Interface for implementing operations for mounts.
**/
GAsyncResult *result,
GError **error);
GFile * (* get_default_location) (GMount *mount);
+
+ const gchar * (* get_sort_key) (GMount *mount);
};
GType g_mount_get_type (void) G_GNUC_CONST;
GAsyncResult *result,
GError **error);
+const gchar *g_mount_get_sort_key (GMount *mount);
+
G_END_DECLS
#endif /* __G_MOUNT_H__ */
return (* iface->get_activation_root) (volume);
}
+
+/**
+ * g_volume_get_sort_key:
+ * @volume: A #GVolume.
+ *
+ * Gets the sort key for @volume, if any.
+ *
+ * Returns: Sorting key for @volume or %NULL if no such key is available.
+ *
+ * Since: 2.32
+ */
+const gchar *
+g_volume_get_sort_key (GVolume *volume)
+{
+ const gchar *ret = NULL;
+ GVolumeIface *iface;
+
+ g_return_val_if_fail (G_IS_VOLUME (volume), NULL);
+
+ iface = G_VOLUME_GET_IFACE (volume);
+ if (iface->get_sort_key != NULL)
+ ret = iface->get_sort_key (volume);
+
+ return ret;
+}
* it is not known.
* @eject_with_operation: Starts ejecting a #GVolume using a #GMountOperation. Since 2.22.
* @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
+ * @get_sort_key: Gets a key used for sorting #GVolume instance or %NULL if no such key exists. Since 2.32.
*
* Interface for implementing operations for mountable volumes.
**/
gboolean (* eject_with_operation_finish) (GVolume *volume,
GAsyncResult *result,
GError **error);
+
+ const gchar * (* get_sort_key) (GVolume *volume);
};
GType g_volume_get_type (void) G_GNUC_CONST;
GAsyncResult *result,
GError **error);
+const gchar *g_volume_get_sort_key (GVolume *volume);
+
G_END_DECLS
#endif /* __G_VOLUME_H__ */