libei: remove ei_ prefix from the internal queue functions

An attempt to make things less confusing

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-09-23 17:14:45 +10:00
parent fa179e8778
commit 297fb502f9

View file

@ -144,7 +144,7 @@ ei_event_type_to_string(enum ei_event_type type)
}
static void
ei_queue_event(struct ei *ei, struct ei_event *event)
queue_event(struct ei *ei, struct ei_event *event)
{
log_debug(ei, "queuing event type %s (%d)\n",
ei_event_type_to_string(event->type), event->type);
@ -153,25 +153,25 @@ ei_queue_event(struct ei *ei, struct ei_event *event)
}
static void
ei_queue_connect_event(struct ei *ei)
queue_connect_event(struct ei *ei)
{
struct ei_event *e = ei_event_create(&ei->object);
e->type = EI_EVENT_CONNECT;
ei_queue_event(ei, e);
queue_event(ei, e);
}
static void
ei_queue_disconnect_event(struct ei *ei)
queue_disconnect_event(struct ei *ei)
{
struct ei_event *e = ei_event_create(&ei->object);
e->type = EI_EVENT_DISCONNECT;
ei_queue_event(ei, e);
queue_event(ei, e);
}
static void
ei_queue_added_event(struct ei_device *device)
queue_added_event(struct ei_device *device)
{
struct ei *ei= ei_device_get_context(device);
@ -179,11 +179,11 @@ ei_queue_added_event(struct ei_device *device)
e->type = EI_EVENT_DEVICE_ADDED;
e->device = ei_device_ref(device);
ei_queue_event(ei, e);
queue_event(ei, e);
}
static void
ei_queue_removed_event(struct ei_device *device)
queue_removed_event(struct ei_device *device)
{
struct ei *ei= ei_device_get_context(device);
@ -191,11 +191,11 @@ ei_queue_removed_event(struct ei_device *device)
e->type = EI_EVENT_DEVICE_REMOVED;
e->device = ei_device_ref(device);
ei_queue_event(ei, e);
queue_event(ei, e);
}
static void
ei_queue_suspended_event(struct ei_device *device)
queue_suspended_event(struct ei_device *device)
{
struct ei *ei= ei_device_get_context(device);
@ -203,11 +203,11 @@ ei_queue_suspended_event(struct ei_device *device)
e->type = EI_EVENT_DEVICE_SUSPENDED;
e->device = ei_device_ref(device);
ei_queue_event(ei, e);
queue_event(ei, e);
}
static void
ei_queue_resumed_event(struct ei_device *device)
queue_resumed_event(struct ei_device *device)
{
struct ei *ei= ei_device_get_context(device);
@ -215,7 +215,7 @@ ei_queue_resumed_event(struct ei_device *device)
e->type = EI_EVENT_DEVICE_RESUMED;
e->device = ei_device_ref(device);
ei_queue_event(ei, e);
queue_event(ei, e);
}
static int
@ -311,7 +311,7 @@ ei_disconnect(struct ei *ei)
if (state != EI_STATE_NEW) {
connection_send_disconnect(ei);
ei_queue_disconnect_event(ei);
queue_disconnect_event(ei);
}
ei->state = EI_STATE_DISCONNECTED;
if (ei->source)
@ -342,7 +342,7 @@ ei_remove_device(struct ei_device *device)
int rc = connection_send_remove(ei, device);
if (ei->state == EI_STATE_DISCONNECTING)
ei_queue_removed_event(device);
queue_removed_event(device);
list_remove(&device->link);
ei_device_unref(device);
@ -367,7 +367,7 @@ handle_msg_added(struct ei *ei, uint32_t deviceid, uint32_t capabilities,
if (keymap_from_server)
ei_device_set_keymap(d, keymap_type, keymap_fd, keymap_sz);
ei_device_added(d);
ei_queue_added_event(d);
queue_added_event(d);
return 0;
}
}
@ -387,7 +387,7 @@ handle_msg_removed(struct ei *ei, uint32_t deviceid)
list_for_each(d, &ei->devices, link) {
if (d->id == deviceid) {
ei_queue_removed_event(d);
queue_removed_event(d);
list_remove(&d->link);
ei_device_unref(d);
break;
@ -407,7 +407,7 @@ handle_msg_resumed(struct ei *ei, uint32_t deviceid)
list_for_each(d, &ei->devices, link) {
if (d->id == deviceid) {
ei_device_resumed(d);
ei_queue_resumed_event(d);
queue_resumed_event(d);
break;
}
}
@ -425,7 +425,7 @@ handle_msg_suspended(struct ei *ei, uint32_t deviceid)
list_for_each(d, &ei->devices, link) {
if (d->id == deviceid) {
ei_device_suspended(d);
ei_queue_suspended_event(d);
queue_suspended_event(d);
break;
}
}
@ -512,7 +512,7 @@ connection_connecting_handle_msg(struct ei *ei, struct message *msg)
switch (msg->type) {
case MESSAGE_CONNECTED:
ei->state = EI_STATE_CONNECTED;
ei_queue_connect_event(ei);
queue_connect_event(ei);
break;
case MESSAGE_DISCONNECTED:
rc = -ECANCELED;