/****************************************************************************** * rcsim - rcsim.c * * simulates the remote control, sends the requested key * * (c) 2003 Carsten Juttner (carjay@gmx.net) * (c) 2009 Stefan Seyfried, add code to use the neutrino socket * (c) 2011 Stefan Seyfried, convert driver/rcinput.h via script to * rcsim.h for automated import of new keys * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * The Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA. * ******************************************************************************/ #include #include #include #include #include #include #include #include #include #include #include #include #define NEUTRINO_SOCKET "/tmp/neutrino.sock" /* those structs / values are stolen from libeventserver */ struct eventHead { unsigned int eventID; unsigned int initiatorID; unsigned int dataSize; }; enum initiators { INITID_CONTROLD, INITID_SECTIONSD, INITID_ZAPIT, INITID_TIMERD, INITID_HTTPD, INITID_NEUTRINO, INITID_GENERIC_INPUT_EVENT_PROVIDER }; #include "rcsim.h" void usage(char *n) { unsigned int keynum = sizeof(keyname) / sizeof(struct key); unsigned int i; #if defined (EVENTDEV) printf("rcsim v1.2\nUsage: %s [