From 6861aaf9af59727abc89cb7c70bc8f6a3143fbbe Mon Sep 17 00:00:00 2001 From: Christoph Weitkamp Date: Mon, 21 Jun 2021 22:08:35 +0200 Subject: [PATCH] Added service references to DynamicCommandDescriptionProvider and DynamicStateDescriptionProvider to support publishing ChannelDescriptionChangedEvent (#10717) Signed-off-by: Christoph Weitkamp --- .../internal/KodiDynamicCommandDescriptionProvider.java | 7 ++++++- .../kodi/internal/KodiDynamicStateDescriptionProvider.java | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.kodi/src/main/java/org/openhab/binding/kodi/internal/KodiDynamicCommandDescriptionProvider.java b/bundles/org.openhab.binding.kodi/src/main/java/org/openhab/binding/kodi/internal/KodiDynamicCommandDescriptionProvider.java index e297e9297de35..6968ebc78d42c 100644 --- a/bundles/org.openhab.binding.kodi/src/main/java/org/openhab/binding/kodi/internal/KodiDynamicCommandDescriptionProvider.java +++ b/bundles/org.openhab.binding.kodi/src/main/java/org/openhab/binding/kodi/internal/KodiDynamicCommandDescriptionProvider.java @@ -13,8 +13,10 @@ package org.openhab.binding.kodi.internal; import org.eclipse.jdt.annotation.NonNullByDefault; +import org.openhab.core.events.EventPublisher; import org.openhab.core.thing.binding.BaseDynamicCommandDescriptionProvider; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; +import org.openhab.core.thing.link.ItemChannelLinkRegistry; import org.openhab.core.thing.type.DynamicCommandDescriptionProvider; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; @@ -29,8 +31,11 @@ @NonNullByDefault public class KodiDynamicCommandDescriptionProvider extends BaseDynamicCommandDescriptionProvider { @Activate - public KodiDynamicCommandDescriptionProvider( + public KodiDynamicCommandDescriptionProvider(final @Reference EventPublisher eventPublisher, // + final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, // final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + this.eventPublisher = eventPublisher; + this.itemChannelLinkRegistry = itemChannelLinkRegistry; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; } } diff --git a/bundles/org.openhab.binding.kodi/src/main/java/org/openhab/binding/kodi/internal/KodiDynamicStateDescriptionProvider.java b/bundles/org.openhab.binding.kodi/src/main/java/org/openhab/binding/kodi/internal/KodiDynamicStateDescriptionProvider.java index b2e20f43b0ff0..8a9504c62f11a 100644 --- a/bundles/org.openhab.binding.kodi/src/main/java/org/openhab/binding/kodi/internal/KodiDynamicStateDescriptionProvider.java +++ b/bundles/org.openhab.binding.kodi/src/main/java/org/openhab/binding/kodi/internal/KodiDynamicStateDescriptionProvider.java @@ -13,8 +13,10 @@ package org.openhab.binding.kodi.internal; import org.eclipse.jdt.annotation.NonNullByDefault; +import org.openhab.core.events.EventPublisher; import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider; import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; +import org.openhab.core.thing.link.ItemChannelLinkRegistry; import org.openhab.core.thing.type.DynamicStateDescriptionProvider; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; @@ -29,8 +31,11 @@ @NonNullByDefault public class KodiDynamicStateDescriptionProvider extends BaseDynamicStateDescriptionProvider { @Activate - public KodiDynamicStateDescriptionProvider( + public KodiDynamicStateDescriptionProvider(final @Reference EventPublisher eventPublisher, // + final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, // final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + this.eventPublisher = eventPublisher; + this.itemChannelLinkRegistry = itemChannelLinkRegistry; this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; } }