00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include <qwidget.h>
00018 #include <qlistbox.h>
00019 #include <qstring.h>
00020 #include <qstringlist.h>
00021 #include <qlayout.h>
00022 #include <qpushbutton.h>
00023 #include <qmessagebox.h>
00024
00025 #include <stdio.h>
00026 #include <stdlib.h>
00027 #include <string.h>
00028 #include <sys/socket.h>
00029 #include <sys/types.h>
00030 #include <sys/un.h>
00031 #include <unistd.h>
00032 #include <errno.h>
00033
00034 #include "recorddialog.h"
00035
00036 #define PACKET_SIZE 256
00037 #define TIMEOUT 3
00038
00039 class LearnTab : public QWidget
00040 {
00041 Q_OBJECT
00042 public:
00043 LearnTab(QWidget *parent=0, const char *name=0);
00044 const char *readPacket();
00045 QStringList getRemotes();
00046 public slots:
00047 void add();
00048 void edit();
00049 void del();
00050 private:
00051 QListBox *remotesBox;
00052 int fd;
00053 int timeout;
00054 struct sockaddr_un addr;
00055 };