gio: Add missing (nullable) annotations to GDrive, GMount, GVolume

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1354
This commit is contained in:
Philip Withnall 2018-03-21 15:19:07 +00:00
parent f92d179f77
commit 41ec0b9c60
3 changed files with 18 additions and 14 deletions

View File

@ -613,7 +613,7 @@ g_drive_poll_for_media_finish (GDrive *drive,
*
* Gets the identifier of the given kind for @drive.
*
* Returns: a newly allocated string containing the
* Returns: (nullable) (transfer full): a newly allocated string containing the
* requested identfier, or %NULL if the #GDrive
* doesn't have this kind of identifier.
*/
@ -921,7 +921,7 @@ g_drive_stop_finish (GDrive *drive,
*
* Gets the sort key for @drive, if any.
*
* Returns: Sorting key for @drive or %NULL if no such key is available.
* Returns: (nullable): Sorting key for @drive or %NULL if no such key is available.
*
* Since: 2.32
*/

View File

@ -255,7 +255,8 @@ g_mount_get_symbolic_icon (GMount *mount)
* considered an opaque string. Returns %NULL if there is no UUID
* available.
*
* Returns: the UUID for @mount or %NULL if no UUID can be computed.
* Returns: (nullable) (transfer full): the UUID for @mount or %NULL if no UUID
* can be computed.
* The returned string should be freed with g_free()
* when no longer needed.
**/
@ -276,8 +277,9 @@ g_mount_get_uuid (GMount *mount)
* @mount: a #GMount.
*
* Gets the volume for the @mount.
*
* Returns: (transfer full): a #GVolume or %NULL if @mount is not associated with a volume.
*
* Returns: (transfer full) (nullable): a #GVolume or %NULL if @mount is not
* associated with a volume.
* The returned object should be unreffed with
* g_object_unref() when no longer needed.
**/
@ -302,7 +304,8 @@ g_mount_get_volume (GMount *mount)
* This is a convenience method for getting the #GVolume and then
* using that object to get the #GDrive.
*
* Returns: (transfer full): a #GDrive or %NULL if @mount is not associated with a volume or a drive.
* Returns: (transfer full) (nullable): a #GDrive or %NULL if @mount is not
* associated with a volume or a drive.
* The returned object should be unreffed with
* g_object_unref() when no longer needed.
**/
@ -1037,7 +1040,7 @@ g_mount_unshadow (GMount *mount)
*
* Gets the sort key for @mount, if any.
*
* Returns: Sorting key for @mount or %NULL if no such key is available.
* Returns: (nullable): Sorting key for @mount or %NULL if no such key is available.
*
* Since: 2.32
*/

View File

@ -195,7 +195,8 @@ g_volume_get_symbolic_icon (GVolume *volume)
* considered an opaque string. Returns %NULL if there is no UUID
* available.
*
* Returns: the UUID for @volume or %NULL if no UUID can be computed.
* Returns: (nullable) (transfer full): the UUID for @volume or %NULL if no UUID
* can be computed.
* The returned string should be freed with g_free()
* when no longer needed.
*/
@ -216,8 +217,8 @@ g_volume_get_uuid (GVolume *volume)
* @volume: a #GVolume
*
* Gets the drive for the @volume.
*
* Returns: (transfer full): a #GDrive or %NULL if @volume is not
*
* Returns: (transfer full) (nullable): a #GDrive or %NULL if @volume is not
* associated with a drive. The returned object should be unreffed
* with g_object_unref() when no longer needed.
*/
@ -238,8 +239,8 @@ g_volume_get_drive (GVolume *volume)
* @volume: a #GVolume
*
* Gets the mount for the @volume.
*
* Returns: (transfer full): a #GMount or %NULL if @volume isn't mounted.
*
* Returns: (transfer full) (nullable): a #GMount or %NULL if @volume isn't mounted.
* The returned object should be unreffed with g_object_unref()
* when no longer needed.
*/
@ -565,7 +566,7 @@ g_volume_eject_with_operation_finish (GVolume *volume,
* See the [introduction][volume-identifier] for more
* information about volume identifiers.
*
* Returns: a newly allocated string containing the
* Returns: (nullable) (transfer full): a newly allocated string containing the
* requested identfier, or %NULL if the #GVolume
* doesn't have this kind of identifier
*/
@ -666,7 +667,7 @@ g_volume_get_activation_root (GVolume *volume)
*
* Gets the sort key for @volume, if any.
*
* Returns: Sorting key for @volume or %NULL if no such key is available
* Returns: (nullable): Sorting key for @volume or %NULL if no such key is available
*
* Since: 2.32
*/