summaryrefslogtreecommitdiff
path: root/noncore/tools/remote/remote.cpp
Unidiff
Diffstat (limited to 'noncore/tools/remote/remote.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/remote/remote.cpp102
1 files changed, 54 insertions, 48 deletions
diff --git a/noncore/tools/remote/remote.cpp b/noncore/tools/remote/remote.cpp
index 7972def..638629f 100644
--- a/noncore/tools/remote/remote.cpp
+++ b/noncore/tools/remote/remote.cpp
@@ -3,3 +3,3 @@ Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie.
3Copyright (C) 2002 Thomas Stephens 3Copyright (C) 2002 Thomas Stephens
4 4
5This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public 5This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
@@ -7,3 +7,3 @@ License as published by the Free Software Foundation; either version 2 of the Li
7version. 7version.
8 8
9This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the 9This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
@@ -11,3 +11,3 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11Public License for more details. 11Public License for more details.
12 12
13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free 13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
@@ -16,2 +16,5 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 16
17#include "mainview.h"
18
19/* OPIE */
17#include <qpe/qpeapplication.h> 20#include <qpe/qpeapplication.h>
@@ -19,2 +22,4 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19#include <qpe/config.h> 22#include <qpe/config.h>
23
24/* QT */
20#include <qpushbutton.h> 25#include <qpushbutton.h>
@@ -25,2 +30,4 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25#include <qobject.h> 30#include <qobject.h>
31
32/* STD */
26#include <sys/socket.h> 33#include <sys/socket.h>
@@ -32,3 +39,2 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32 39
33#include "mainview.h"
34 40
@@ -37,3 +43,3 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
37 //struct sockaddr_un addr; 43 //struct sockaddr_un addr;
38 44
39 addr.sun_family=AF_UNIX; 45 addr.sun_family=AF_UNIX;
@@ -41,3 +47,3 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
41 fd = socket(AF_UNIX, SOCK_STREAM, 0); 47 fd = socket(AF_UNIX, SOCK_STREAM, 0);
42 48
43 if(connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1) 49 if(connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1)
@@ -57,44 +63,44 @@ int main( int argc, char **argv )
57{ 63{
58 QPEApplication a( argc, argv ); 64 QPEApplication a( argc, argv );
59 MainView w; 65 MainView w;
60 66
61 int fd; 67 int fd;
62 //struct sockaddr_un addr; 68 //struct sockaddr_un addr;
63 //char read_buffer[BUFFERSIZE+1]; 69 //char read_buffer[BUFFERSIZE+1];
64 //char write_buffer[] = "LIST\n"; 70 //char write_buffer[] = "LIST\n";
65 71
66 //addr.sun_family=AF_UNIX; 72 //addr.sun_family=AF_UNIX;
67 //strcpy(addr.sun_path,"/dev/lircd"); 73 //strcpy(addr.sun_path,"/dev/lircd");
68 //fd = socket(AF_UNIX, SOCK_STREAM, 0); 74 //fd = socket(AF_UNIX, SOCK_STREAM, 0);
69 75
70 //printf("fd1: %d\n", fd); 76 //printf("fd1: %d\n", fd);
71/* 77 /*
72 if(connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1) 78 if(connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1)
73 { 79 {
74 QMessageBox *mb = new QMessageBox("error", 80 QMessageBox *mb = new QMessageBox("error",
75 "couldnt connect to socket", 81 "couldnt connect to socket",
76 QMessageBox::NoIcon, 82 QMessageBox::NoIcon,
77 QMessageBox::Ok, 83 QMessageBox::Ok,
78 QMessageBox::NoButton, 84 QMessageBox::NoButton,
79 QMessageBox::NoButton); 85 QMessageBox::NoButton);
80 mb->exec(); 86 mb->exec();
81 } 87 }
82*/ 88 */
83 89
84 //printf("%d\n", write(fd, write_buffer, sizeof(write_buffer) ) ); 90 //printf("%d\n", write(fd, write_buffer, sizeof(write_buffer) ) );
85 91
86 //printf("%d\n", read(fd, read_buffer, BUFFERSIZE ) ); 92 //printf("%d\n", read(fd, read_buffer, BUFFERSIZE ) );
87 93
88 //QMessageBox *mbtest = new QMessageBox("lirc test", 94 //QMessageBox *mbtest = new QMessageBox("lirc test",
89 // *new QString((const char *) read_buffer), 95 // *new QString((const char *) read_buffer),
90 // QMessageBox::NoIcon, 96 // QMessageBox::NoIcon,
91 // QMessageBox::Ok, 97 // QMessageBox::Ok,
92 // QMessageBox::NoButton, 98 // QMessageBox::NoButton,
93 // QMessageBox::NoButton); 99 // QMessageBox::NoButton);
94 //mbtest->exec(); 100 //mbtest->exec();
95 101
96 a.setMainWidget( &w ); 102 a.setMainWidget( &w );
97 w.setIRSocket(fd); 103 w.setIRSocket(fd);
98 w.showMaximized(); 104 QPEApplication::showWidget( &w );
99 return a.exec(); 105 return a.exec();
100} 106}