libratbag: add API for checking if profile is dirty

This commit is contained in:
Yaroslav Chvanov
2023-03-05 13:26:27 +03:00
parent 9f031e58a1
commit 3e42349daa
2 changed files with 19 additions and 0 deletions

View File

@@ -825,6 +825,12 @@ ratbag_profile_is_active(struct ratbag_profile *profile)
return !!profile->is_active;
}
LIBRATBAG_EXPORT bool
ratbag_profile_is_dirty(const struct ratbag_profile *profile)
{
return !!profile->dirty;
}
LIBRATBAG_EXPORT bool
ratbag_profile_is_enabled(const struct ratbag_profile *profile)
{

View File

@@ -702,6 +702,19 @@ ratbag_device_get_profile(struct ratbag_device *device, unsigned int index);
bool
ratbag_profile_is_active(struct ratbag_profile *profile);
/**
* @ingroup profile
*
* Check if the given profile is dirty, that is, the device needs committing
* after having configuration changes.
*
* @param profile A previously initialized ratbag profile
*
* @return non-zero if the profile is dirty, zero otherwise
*/
bool
ratbag_profile_is_dirty(const struct ratbag_profile *profile);
/**
* @ingroup profile
*