2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.kodi.internal;
15 import java.util.EventListener;
16 import java.util.List;
18 import org.eclipse.jdt.annotation.Nullable;
19 import org.openhab.binding.kodi.internal.model.KodiAudioStream;
20 import org.openhab.binding.kodi.internal.model.KodiSubtitle;
21 import org.openhab.binding.kodi.internal.model.KodiSystemProperties;
22 import org.openhab.binding.kodi.internal.protocol.KodiConnection;
23 import org.openhab.core.library.types.RawType;
26 * Interface which has to be implemented by a class in order to get status
27 * updates from a {@link KodiConnection}
29 * @author Paul Frank - Initial contribution
30 * @author Christoph Weitkamp - Added channels for opening PVR TV or Radio streams
31 * @author Christoph Weitkamp - Improvements for playing audio notifications
33 public interface KodiEventListener extends EventListener {
43 enum KodiPlaylistState {
52 void updateConnectionState(boolean connected);
54 void updateScreenSaverState(boolean screenSaverActive);
56 void updateInputRequestedState(boolean inputRequested);
58 void updatePlaylistState(KodiPlaylistState playlistState);
60 void updateVolume(int volume);
62 void updatePlayerState(KodiState state);
64 void updateMuted(boolean muted);
66 void updateMediaID(int mediaid);
68 void updateUniqueIDDouban(String uniqueid);
70 void updateUniqueIDImdb(String uniqueid);
72 void updateUniqueIDTmdb(String uniqueid);
74 void updateUniqueIDImdbtvshow(String uniqueid);
76 void updateUniqueIDTmdbtvshow(String uniqueid);
78 void updateUniqueIDTmdbepisode(String uniqueid);
80 void updateTitle(String title);
82 void updateOriginalTitle(String originaltitle);
84 void updateShowTitle(String title);
86 void updateAlbum(String album);
88 void updateArtistList(List<String> artistList);
90 void updateMediaType(String mediaType);
92 void updateGenreList(List<String> genreList);
94 void updatePVRChannel(String channel);
96 void updateThumbnail(@Nullable RawType thumbnail);
98 void updateFanart(@Nullable RawType fanart);
100 void updateAudioStreamOptions(List<KodiAudioStream> audioStreamList);
102 void updateAudioCodec(String codec);
104 void updateAudioName(String name);
106 void updateAudioIndex(int index);
108 void updateAudioChannels(int channels);
110 void updateAudioLanguage(String language);
112 void updateVideoCodec(String codec);
114 void updateVideoIndex(int index);
116 void updateVideoWidth(int width);
118 void updateVideoHeight(int height);
120 void updateSubtitleOptions(List<KodiSubtitle> subtitleList);
122 void updateSubtitleEnabled(boolean enabled);
124 void updateSubtitleIndex(int index);
126 void updateSubtitleName(String name);
128 void updateSubtitleLanguage(String language);
130 void updateCurrentTime(long currentTime);
132 void updateCurrentTimePercentage(double currentTimePercentage);
134 void updateDuration(long duration);
136 void updateSystemProperties(@Nullable KodiSystemProperties systemProperties);
138 void updateEpisode(int episode);
140 void updateSeason(int season);
142 void updateMediaFile(String mediafile);
144 void updateRating(double rating);
146 void updateUserRating(double rating);
148 void updateMpaa(String mpaa);
150 void updateCurrentProfile(String profile);