is_valid


Description:

[ Version ( deprecated = true , deprecated_since = "2.46" , since = "2.20" ) ]
public static bool is_valid (AsyncResult result, Object? source, void* source_tag)

Warning: is_valid is deprecated since 2.46.

Ensures that the data passed to the _finish function of an async operation is consistent.

Note:

Use Task and is_valid instead.

Three checks are performed.

First, result is checked to ensure that it is really a SimpleAsyncResult . Second, source is checked to ensure that it matches the source object of result. Third, source_tag is checked to ensure that it is equal to the source_tag argument given to SimpleAsyncResult (which, by convention, is a pointer to the _async function corresponding to the _finish function from which this function is called). (Alternatively, if either source_tag or result's source tag is null, then the source tag check is skipped.)

Parameters:

result

the AsyncResult passed to the _finish function.

source

the Object passed to the _finish function.

source_tag

the asynchronous function.

Returns:

TRUE if all checks passed or FALSE if any failed.




2022 vala-language.org