]> git.basschouten.com Git - openhab-addons.git/blob
575948a58f3f1de983cb3ef8005cca3d932721e1
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.kodi.internal;
14
15 import java.util.EventListener;
16 import java.util.List;
17
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;
24
25 /**
26  * Interface which has to be implemented by a class in order to get status
27  * updates from a {@link KodiConnection}
28  *
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
32  */
33 public interface KodiEventListener extends EventListener {
34     enum KodiState {
35         PLAY,
36         PAUSE,
37         END,
38         STOP,
39         REWIND,
40         FASTFORWARD
41     }
42
43     enum KodiPlaylistState {
44         ADD,
45         ADDED,
46         INSERT,
47         REMOVE,
48         REMOVED,
49         CLEAR
50     }
51
52     void updateConnectionState(boolean connected);
53
54     void updateScreenSaverState(boolean screenSaverActive);
55
56     void updateInputRequestedState(boolean inputRequested);
57
58     void updatePlaylistState(KodiPlaylistState playlistState);
59
60     void updateVolume(int volume);
61
62     void updatePlayerState(KodiState state);
63
64     void updateMuted(boolean muted);
65
66     void updateMediaID(int mediaid);
67
68     void updateUniqueIDDouban(String uniqueid);
69
70     void updateUniqueIDImdb(String uniqueid);
71
72     void updateUniqueIDTmdb(String uniqueid);
73
74     void updateUniqueIDImdbtvshow(String uniqueid);
75
76     void updateUniqueIDTmdbtvshow(String uniqueid);
77
78     void updateUniqueIDTmdbepisode(String uniqueid);
79
80     void updateTitle(String title);
81
82     void updateOriginalTitle(String originaltitle);
83
84     void updateShowTitle(String title);
85
86     void updateAlbum(String album);
87
88     void updateArtistList(List<String> artistList);
89
90     void updateMediaType(String mediaType);
91
92     void updateGenreList(List<String> genreList);
93
94     void updatePVRChannel(String channel);
95
96     void updateThumbnail(@Nullable RawType thumbnail);
97
98     void updateFanart(@Nullable RawType fanart);
99
100     void updateAudioStreamOptions(List<KodiAudioStream> audioStreamList);
101
102     void updateAudioCodec(String codec);
103
104     void updateAudioName(String name);
105
106     void updateAudioIndex(int index);
107
108     void updateAudioChannels(int channels);
109
110     void updateAudioLanguage(String language);
111
112     void updateVideoCodec(String codec);
113
114     void updateVideoIndex(int index);
115
116     void updateVideoWidth(int width);
117
118     void updateVideoHeight(int height);
119
120     void updateSubtitleOptions(List<KodiSubtitle> subtitleList);
121
122     void updateSubtitleEnabled(boolean enabled);
123
124     void updateSubtitleIndex(int index);
125
126     void updateSubtitleName(String name);
127
128     void updateSubtitleLanguage(String language);
129
130     void updateCurrentTime(long currentTime);
131
132     void updateCurrentTimePercentage(double currentTimePercentage);
133
134     void updateDuration(long duration);
135
136     void updateSystemProperties(@Nullable KodiSystemProperties systemProperties);
137
138     void updateEpisode(int episode);
139
140     void updateSeason(int season);
141
142     void updateMediaFile(String mediafile);
143
144     void updateRating(double rating);
145
146     void updateUserRating(double rating);
147
148     void updateMpaa(String mpaa);
149
150     void updateCurrentProfile(String profile);
151 }