gio: Introduce get_sort_key() methods on GDrive, GVolume and GMount

This is needed to implement efficient and predictable proxy volume
monitors, see

 https://bugzilla.gnome.org/show_bug.cgi?id=661711

for details.

Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
David Zeuthen
2011-10-13 16:53:44 -04:00
parent 4a25d21bd0
commit 915e2238c4
8 changed files with 96 additions and 0 deletions

View File

@@ -101,6 +101,7 @@ G_BEGIN_DECLS
* 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.
**/
@@ -159,6 +160,8 @@ struct _GVolumeIface
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;
@@ -209,6 +212,8 @@ gboolean g_volume_eject_with_operation_finish (GVolume *volume,
GAsyncResult *result,
GError **error);
const gchar *g_volume_get_sort_key (GVolume *volume);
G_END_DECLS
#endif /* __G_VOLUME_H__ */