best-match: Add API to query if individual is a favourite
This commit is contained in:
@@ -326,6 +326,29 @@ calls_best_match_has_individual (CallsBestMatch *self)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* calls_best_match_is_favourite:
|
||||
* @self: A #CallsBestMatch
|
||||
*
|
||||
* Returns: %TRUE if there's a matched individual and the individual is
|
||||
* marked as a favourite, %FALSE otherwise.
|
||||
*/
|
||||
gboolean
|
||||
calls_best_match_is_favourite (CallsBestMatch *self)
|
||||
{
|
||||
gboolean fav;
|
||||
|
||||
g_return_val_if_fail (CALLS_IS_BEST_MATCH (self), FALSE);
|
||||
|
||||
if (!self->matched_individual)
|
||||
return FALSE;
|
||||
|
||||
g_object_get (G_OBJECT (self->matched_individual), "favourite", &fav, NULL);
|
||||
|
||||
return fav;
|
||||
}
|
||||
|
||||
|
||||
const char *
|
||||
calls_best_match_get_phone_number (CallsBestMatch *self)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user