2 * Copyright (c) 2010-2022 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 {
34 public enum KodiState {
43 public enum KodiPlaylistState {
52 void updateConnectionState(boolean connected);
54 void updateScreenSaverState(boolean screenSaveActive);
56 void updatePlaylistState(KodiPlaylistState playlistState);
58 void updateVolume(int volume);
60 void updatePlayerState(KodiState state);
62 void updateMuted(boolean muted);
64 void updateMediaID(int mediaid);
66 void updateUniqueIDDouban(String uniqueid);
68 void updateUniqueIDImdb(String uniqueid);
70 void updateUniqueIDTmdb(String uniqueid);
72 void updateUniqueIDImdbtvshow(String uniqueid);
74 void updateUniqueIDTmdbtvshow(String uniqueid);
76 void updateUniqueIDTmdbepisode(String uniqueid);
78 void updateTitle(String title);
80 void updateOriginalTitle(String originaltitle);
82 void updateShowTitle(String title);
84 void updateAlbum(String album);
86 void updateArtistList(List<String> artistList);
88 void updateMediaType(String mediaType);
90 void updateGenreList(List<String> genreList);
92 void updatePVRChannel(String channel);
94 void updateThumbnail(@Nullable RawType thumbnail);
96 void updateFanart(@Nullable RawType fanart);
98 void updateAudioStreamOptions(List<KodiAudioStream> audioStreamList);
100 void updateAudioCodec(String codec);
102 void updateAudioName(String name);
104 void updateAudioIndex(int index);
106 void updateAudioChannels(int channels);
108 void updateAudioLanguage(String language);
110 void updateVideoCodec(String codec);
112 void updateVideoIndex(int index);
114 void updateVideoWidth(int width);
116 void updateVideoHeight(int height);
118 void updateSubtitleOptions(List<KodiSubtitle> subtitleList);
120 void updateSubtitleEnabled(boolean enabled);
122 void updateSubtitleIndex(int index);
124 void updateSubtitleName(String name);
126 void updateSubtitleLanguage(String language);
128 void updateCurrentTime(long currentTime);
130 void updateCurrentTimePercentage(double currentTimePercentage);
132 void updateDuration(long duration);
134 void updateSystemProperties(@Nullable KodiSystemProperties systemProperties);
136 void updateEpisode(int episode);
138 void updateSeason(int season);
140 void updateMediaFile(String mediafile);
142 void updateRating(double rating);
144 void updateUserRating(double rating);
146 void updateMpaa(String mpaa);
148 void updateCurrentProfile(String profile);