2 Copyright 2004-2020 Chris Tallon; 2012 Marten Richter
4 This file is part of VOMP.
6 VOMP is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 VOMP is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with VOMP. If not, see <https://www.gnu.org/licenses/>.
23 #include <libcec/cec.h>
27 class InputCEC : public Input
33 bool handlesVolume() { return cechandlesvolume; };
37 void changePowerState(bool poweron);
39 bool loadOptionsfromServer(VDR* vdr);
40 bool saveOptionstoServer();
41 bool addOptionsToPanes(int panenumber,Options *options,WOptionPane* pane);
42 bool handleOptionChanges(Option* option);
46 void InitHWCListwithDefaults();
47 UCHAR TranslateHWCFixed(int code);
49 bool cechandlesvolume{};
51 CEC::ICECAdapter* cec_adap{};
52 CEC::libcec_configuration cec_config;
53 CEC::ICECCallbacks cec_callbacks;
55 void incomingCECkey(int keys);
56 void incomingPowerkey(UCHAR key);
58 static InputCEC* instance;
59 static void cecLogMessage(void *param, const CEC::cec_log_message* message);
60 static void cecKeyPress(void*param, const CEC::cec_keypress* key);
61 static void cecCommand(void *param, const CEC::cec_command* command);
62 static void cecConfigurationChanged(void *param, const CEC::libcec_configuration* config);
63 static void cecSourceActivated(void*param, const CEC::cec_logical_address address, const uint8_t activated);