summaryrefslogtreecommitdiff
path: root/noncore/tools/remote/remote.cpp
Unidiff
Diffstat (limited to 'noncore/tools/remote/remote.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/tools/remote/remote.cpp61
1 files changed, 8 insertions, 53 deletions
diff --git a/noncore/tools/remote/remote.cpp b/noncore/tools/remote/remote.cpp
index 35d06bc..67fc57d 100644
--- a/noncore/tools/remote/remote.cpp
+++ b/noncore/tools/remote/remote.cpp
@@ -38,68 +38,23 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
38 38
39 39
40/*void reconnect(int &fd)
41{
42 //struct sockaddr_un addr;
43
44 addr.sun_family=AF_UNIX;
45 strcpy(addr.sun_path,"/dev/lircd");
46 fd = socket(AF_UNIX, SOCK_STREAM, 0);
47
48 if(connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1)
49 {
50 QMessageBox *mb = new QMessageBox("error",
51 "couldnt connect to socket",
52 QMessageBox::NoIcon,
53 QMessageBox::Ok,
54 QMessageBox::NoButton,
55 QMessageBox::NoButton);
56 mb->exec();
57 }
58}
59*/
60
61int main( int argc, char **argv ) 40int main( int argc, char **argv )
62{ 41{
63 QPEApplication a( argc, argv ); 42 QPEApplication a( argc, argv );
64 MainView w; 43 MainView w;
44 a.setMainWidget( &w );
45 QPEApplication::showWidget( &w );
65 46
66 int fd; 47 LircHandler lh;
67 //struct sockaddr_un addr; 48 if(!lh.isLircdRunning()) {
68 //char read_buffer[BUFFERSIZE+1]; 49 QMessageBox mb("Error!",
69 //char write_buffer[] = "LIST\n"; 50 "Lircd is not running",
70
71 //addr.sun_family=AF_UNIX;
72 //strcpy(addr.sun_path,"/dev/lircd");
73 //fd = socket(AF_UNIX, SOCK_STREAM, 0);
74
75 //printf("fd1: %d\n", fd);
76 /*
77 if(connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1)
78 {
79 QMessageBox *mb = new QMessageBox("error",
80 "couldnt connect to socket",
81 QMessageBox::NoIcon, 51 QMessageBox::NoIcon,
82 QMessageBox::Ok, 52 QMessageBox::Ok,
83 QMessageBox::NoButton, 53 QMessageBox::NoButton,
84 QMessageBox::NoButton); 54 QMessageBox::NoButton);
85 mb->exec(); 55 mb.exec();
86 }
87 */
88
89 //printf("%d\n", write(fd, write_buffer, sizeof(write_buffer) ) );
90
91 //printf("%d\n", read(fd, read_buffer, BUFFERSIZE ) );
92 56
93 //QMessageBox *mbtest = new QMessageBox("lirc test", 57 }
94 // *new QString((const char *) read_buffer),
95 // QMessageBox::NoIcon,
96 // QMessageBox::Ok,
97 // QMessageBox::NoButton,
98 // QMessageBox::NoButton);
99 //mbtest->exec();
100 58
101 a.setMainWidget( &w );
102 w.setIRSocket(fd);
103 QPEApplication::showWidget( &w );
104 return a.exec(); 59 return a.exec();
105} 60}