+ return (void *) notification;
+}
+
+BT_HIDDEN
+void bt_notification_packet_end_destroy(struct bt_notification *notif)
+{
+ struct bt_notification_packet_end *packet_end_notif = (void *) notif;
+
+ BT_LIB_LOGD("Destroying packet end notification: %!+n", notif);
+ BT_LIB_LOGD("Putting packet: %!+a", packet_end_notif->packet);
+ BT_OBJECT_PUT_REF_AND_RESET(packet_end_notif->packet);
+ g_free(notif);
+}
+
+BT_HIDDEN
+void bt_notification_packet_end_recycle(struct bt_notification *notif)
+{
+ struct bt_notification_packet_end *packet_end_notif = (void *) notif;
+ struct bt_graph *graph;
+
+ BT_ASSERT(packet_end_notif);
+
+ if (!notif->graph) {
+ bt_notification_packet_end_destroy(notif);
+ return;
+ }
+
+ BT_LIB_LOGD("Recycling packet end notification: %!+n", notif);
+ bt_notification_reset(notif);
+ BT_OBJECT_PUT_REF_AND_RESET(packet_end_notif->packet);
+ graph = notif->graph;
+ notif->graph = NULL;
+ bt_object_pool_recycle_object(&graph->packet_end_notif_pool, notif);
+}
+
+struct bt_packet *bt_notification_packet_end_borrow_packet(
+ struct bt_notification *notification)
+{
+ struct bt_notification_packet_end *packet_end;
+
+ BT_ASSERT_PRE_NON_NULL(notification, "Notification");
+ BT_ASSERT_PRE_NOTIF_IS_TYPE(notification,
+ BT_NOTIFICATION_TYPE_PACKET_END);
+ packet_end = (void *) notification;
+ return packet_end->packet;
+}
+
+const struct bt_packet *bt_notification_packet_end_borrow_packet_const(
+ const struct bt_notification *notification)
+{
+ return bt_notification_packet_end_borrow_packet(
+ (void *) notification);