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.yamahareceiver.internal.protocol;
15 import static java.util.stream.Collectors.toSet;
16 import static org.openhab.binding.yamahareceiver.internal.YamahaReceiverBindingConstants.Inputs.*;
18 import java.io.IOException;
20 import java.util.stream.Stream;
23 * The navigation control protocol interface
25 * @author David Graeff - Initial contribution
26 * @author Tomasz Maruszak - refactoring
28 public interface InputWithNavigationControl extends IStateUpdatable {
30 * List all inputs that are compatible with this kind of control
32 Set<String> SUPPORTED_INPUTS = Stream
33 .of(INPUT_NET_RADIO, INPUT_NET_RADIO_LEGACY, INPUT_USB, INPUT_IPOD_USB, INPUT_DOCK, INPUT_PC, INPUT_NAPSTER,
34 INPUT_PANDORA, INPUT_SIRIUS, INPUT_RHAPSODY, INPUT_IPOD, INPUT_HD_RADIO)
40 * @throws ReceivedMessageParseException, IOException
42 void goBack() throws ReceivedMessageParseException, IOException;
47 * @throws ReceivedMessageParseException, IOException
49 void goUp() throws IOException, ReceivedMessageParseException;
54 * @throws ReceivedMessageParseException, IOException
56 void goDown() throws IOException, ReceivedMessageParseException;
59 * Navigate left. Not for all zones or functions available.
61 * @throws ReceivedMessageParseException, IOException
63 void goLeft() throws IOException, ReceivedMessageParseException;
66 * Navigate right. Not for all zones or functions available.
68 * @throws ReceivedMessageParseException, IOException
70 void goRight() throws IOException, ReceivedMessageParseException;
73 * Select current item. Not for all zones or functions available.
75 * @throws ReceivedMessageParseException, IOException
77 void selectCurrentItem() throws IOException, ReceivedMessageParseException;
80 * Navigate to root menu
82 * @throws ReceivedMessageParseException, IOException
84 boolean goToRoot() throws IOException, ReceivedMessageParseException;
87 * Navigate to the given page. The Yamaha protocol separates list of items into pages.
89 * @param page The page, starting with 1.
91 * @throws ReceivedMessageParseException
93 void goToPage(int page) throws IOException, ReceivedMessageParseException;
96 * Provide a full path to the menu and menu item
100 * @throws ReceivedMessageParseException
102 void selectItemFullPath(String fullPath) throws IOException, ReceivedMessageParseException;