mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-01 01:07:59 +02:00
eis: remove eis_device_set_name(), use eis_device_configure_name()
For consistency with all configure calls
This commit is contained in:
parent
541dcb415d
commit
c012579c51
2 changed files with 2 additions and 22 deletions
|
|
@ -165,19 +165,6 @@ eis_device_get_region(struct eis_device *device, size_t index)
|
|||
return list_nth_entry(struct eis_region, &device->regions, link, index);
|
||||
}
|
||||
|
||||
_public_ void
|
||||
eis_device_set_name(struct eis_device *device, const char *name)
|
||||
{
|
||||
if (device->state != EIS_DEVICE_STATE_NEW) {
|
||||
log_bug_client(eis_device_get_context(device),
|
||||
"%s: device already (dis)connected\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
free(device->name);
|
||||
device->name = xstrdup(name);
|
||||
}
|
||||
|
||||
_public_ struct eis_client *
|
||||
eis_device_get_client(struct eis_device *device)
|
||||
{
|
||||
|
|
|
|||
11
src/libeis.h
11
src/libeis.h
|
|
@ -605,19 +605,12 @@ eis_device_set_user_data(struct eis_device *eis_device, void *user_data);
|
|||
|
||||
/**
|
||||
* Return the name of the device. The return value of this function may change after
|
||||
* eis_device_set_name(), a caller should keep a copy of it where required rather than the
|
||||
* pointer value.
|
||||
* eis_device_configure_name(), a caller should keep a copy of it where
|
||||
* required rather than the pointer value.
|
||||
*/
|
||||
const char *
|
||||
eis_device_get_name(struct eis_device *device);
|
||||
|
||||
/**
|
||||
* Set the name of the device. This function has no effect if called after
|
||||
* eis_device_connect()
|
||||
*/
|
||||
void
|
||||
eis_device_set_name(struct eis_device *device, const char *name);
|
||||
|
||||
bool
|
||||
eis_device_has_capability(struct eis_device *device,
|
||||
enum eis_device_capability cap);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue