mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
committed by
Benjamin Tissoires
parent
b78b5cd73e
commit
faa1a24c25
@@ -29,6 +29,7 @@ The **org.freedesktop.ratbag1.Device** interface provides:
|
||||
- ActiveProfile -> index of the currently active profile in Profiles
|
||||
- Methods:
|
||||
- GetProfileByIndex(uint) -> returns the object path for the given index
|
||||
- Commit() -> commit the changes to the device
|
||||
|
||||
The **org.freedesktop.ratbag1.Profile** interface provides:
|
||||
- Properties:
|
||||
|
||||
@@ -266,6 +266,18 @@ static int ratbagd_device_get_profile_by_index(sd_bus_message *m,
|
||||
ratbagd_profile_get_path(profile));
|
||||
}
|
||||
|
||||
static int ratbagd_device_commit(sd_bus_message *m,
|
||||
void *userdata,
|
||||
sd_bus_error *error)
|
||||
{
|
||||
struct ratbagd_device *device = userdata;
|
||||
int r;
|
||||
|
||||
r = ratbag_device_commit(device->lib_device);
|
||||
|
||||
return sd_bus_reply_method_return(m, "u", r);
|
||||
}
|
||||
|
||||
static int
|
||||
ratbagd_device_get_capabilities(sd_bus *bus,
|
||||
const char *path,
|
||||
@@ -320,6 +332,7 @@ const sd_bus_vtable ratbagd_device_vtable[] = {
|
||||
SD_BUS_PROPERTY("Profiles", "ao", ratbagd_device_get_profiles, 0, SD_BUS_VTABLE_PROPERTY_CONST),
|
||||
SD_BUS_PROPERTY("ActiveProfile", "u", ratbagd_device_get_active_profile, 0, 0),
|
||||
SD_BUS_METHOD("GetProfileByIndex", "u", "o", ratbagd_device_get_profile_by_index, SD_BUS_VTABLE_UNPRIVILEGED),
|
||||
SD_BUS_METHOD("Commit", "", "u", ratbagd_device_commit, SD_BUS_VTABLE_UNPRIVILEGED),
|
||||
SD_BUS_VTABLE_END,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user