From aa3c2eb76374a62d4cf51e7b78032d834df0bd47 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 7 Jun 2023 15:01:17 +1000 Subject: [PATCH] ei: remove unused ei_pingpong_new() Copy/paste from the callback interface I think, so let's remove it. --- src/libei-pingpong.c | 18 ------------------ src/libei-pingpong.h | 6 ------ 2 files changed, 24 deletions(-) diff --git a/src/libei-pingpong.c b/src/libei-pingpong.c index 3f929f0..cbfd313 100644 --- a/src/libei-pingpong.c +++ b/src/libei-pingpong.c @@ -76,24 +76,6 @@ ei_pingpong_get_interface(struct ei_pingpong *pingpong) { return &interface; } -struct ei_pingpong * -ei_pingpong_new(struct ei *ei, ei_pingpong_func func, void *pingpong_data) -{ - struct ei_pingpong *pingpong = ei_pingpong_create(&ei->object); - - pingpong->proto_object.id = ei_get_new_id(ei); - pingpong->proto_object.implementation = pingpong; - pingpong->proto_object.interface = &ei_pingpong_proto_interface; - pingpong->proto_object.version = VERSION_V(1); - pingpong->pingpong_data = pingpong_data; - ei_register_object(ei, &pingpong->proto_object); - - pingpong->func = func; - list_init(&pingpong->link); - - return pingpong; /* ref owned by caller */ -} - struct ei_pingpong * ei_pingpong_new_for_id(struct ei *ei, object_id_t id, uint32_t version) { diff --git a/src/libei-pingpong.h b/src/libei-pingpong.h index 526f9cc..74c12c7 100644 --- a/src/libei-pingpong.h +++ b/src/libei-pingpong.h @@ -32,8 +32,6 @@ struct ei; struct ei_pingpong; -typedef void (*ei_pingpong_func)(struct ei_pingpong *pingpong, void *pingpong_data, uint32_t proto_data); - /* This is a protocol-only object, not exposed in the API */ struct ei_pingpong { struct object object; @@ -42,7 +40,6 @@ struct ei_pingpong { struct list link; /* for use by the callers, if needed */ - ei_pingpong_func func; void *pingpong_data; /* Note: pingpong-data is attached to the pingpong */ }; @@ -55,8 +52,5 @@ OBJECT_DECLARE_SETTER(ei_pingpong, user_data, void *); OBJECT_DECLARE_REF(ei_pingpong); OBJECT_DECLARE_UNREF(ei_pingpong); -struct ei_pingpong * -ei_pingpong_new(struct ei *ei, ei_pingpong_func func, void *pingpong_data); - struct ei_pingpong * ei_pingpong_new_for_id(struct ei *ei, object_id_t id, uint32_t version);