add_reverse_result


Description:

public void add_reverse_result (HashTable<string,Value?> @params, List<Place>? results, Error? error)

Add a query and corresponding result (or error) to the mock backend, meaning that if it receives a reverse search for params through reverse_resolve (or its asynchronous variants), the mock backend will return the given results or error to the caller.

If a set of params is added to the backend multiple times, the most recently provided results and error will be used.

Exactly one of results and error must be set. Empty result sets are represented as a NOT_SUPPORTED error.

Parameters:

this

a MockBackend

results

result set to return for the query, or null if error is non-%NULL; result sets must be in the same format as returned by resolve

error

error to return for the query, or null if results should be returned instead; errors must match those returned by resolve

params

query parameters to respond to, in the same format as accepted by resolve




2022 vala-language.org