Change the ppd_action_probe() return type to PpdProbeResult

This commit is contained in:
Mario Limonciello 2024-02-02 11:23:47 -06:00 committed by Marco Trevisan
parent 15ce19d623
commit 002255cbdd
3 changed files with 4 additions and 4 deletions

View file

@ -1061,7 +1061,7 @@ start_profile_drivers (PpdApp *data)
g_debug ("Handling action '%s'", ppd_action_get_action_name (action));
if (!ppd_action_probe (action)) {
if (ppd_action_probe (action) == PPD_PROBE_RESULT_FAIL) {
g_debug ("probe () failed for action '%s', skipping",
ppd_action_get_action_name (action));
g_object_unref (object);

View file

@ -125,13 +125,13 @@ ppd_action_init (PpdAction *self)
{
}
gboolean
PpdProbeResult
ppd_action_probe (PpdAction *action)
{
g_return_val_if_fail (PPD_IS_ACTION (action), FALSE);
if (!PPD_ACTION_GET_CLASS (action)->probe)
return TRUE;
return PPD_PROBE_RESULT_SUCCESS;
return PPD_ACTION_GET_CLASS (action)->probe (action);
}

View file

@ -35,7 +35,7 @@ struct _PpdActionClass
};
#ifndef __GTK_DOC_IGNORE__
gboolean ppd_action_probe (PpdAction *action);
PpdProbeResult ppd_action_probe (PpdAction *action);
gboolean ppd_action_activate_profile (PpdAction *action, PpdProfile profile, GError **error);
const char *ppd_action_get_action_name (PpdAction *action);
#endif