3 * Copyright (C) 2016-2020 William Morrow
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public
16 * License along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
25 #include "remotecontrol.h"
30 #define X10_POWER 0x0074
32 #define X10_DVD 0x0185
33 #define X10_WWW 0x0096
34 #define X10_BOOK 0x009c
35 #define X10_EDIT 0x00b0
36 #define X10_VOLDN 0x0072
37 #define X10_VOLUP 0x0073
38 #define X10_MUTE 0x0071
39 #define X10_CH_DN 0x0193
40 #define X10_CH_UP 0x0192
50 #define X10_MENU 0x008b
52 #define X10_SETUP 0x008d
56 #define X10_PROPS 0x0082
60 #define X10_SCRN 0x0177
64 #define X10_REW 0x00a8
65 #define X10_PLAY 0x00cf
66 #define X10_FWD 0x00d0
67 #define X10_REC 0x00a7
68 #define X10_STOP 0x00a6
69 #define X10_PAUSE 0x0077
72 //#define X10_NEXT 0x0000
73 //#define X10_PREV 0x0000
74 //#define X10_INFO 0x0000
75 //#define X10_HOME 0x0000
76 //#define X10_END 0x0000
77 //#define X10_SELECT 0x0000
81 class X10TV : public Thread
84 X10TV(MWindow *mwindow, int *ifd, int nfds);
89 static int open_usb_inputs(int vendor, int product, int &version,
91 static X10TV *probe(MWindow *mwindow);
93 void handle_event(int fd);
94 int check_menu_keys(int code);
95 virtual int process_code() { return 1; }
106 class X10TVCWindowHandler : public RemoteHandler
109 X10TVCWindowHandler(X10TV *wintv, RemoteControl *remote_control);
110 int x10tv_process_code(int code);
111 int process_key(int key);
112 int is_x10tv() { return 1; }
117 class X10TVRecordHandler : public RemoteHandler
120 X10TVRecordHandler(X10TV *wintv, RemoteControl *remote_control);
121 int wintv_process_code(int code);
122 int process_key(int key);
123 int is_x10tv() { return 1; }