author | ar <ar> | 2004-02-21 19:09:12 (UTC) |
---|---|---|
committer | ar <ar> | 2004-02-21 19:09:12 (UTC) |
commit | c7e563cbb26c20807e66dd4284d1ce9cbf8e1419 (patch) (side-by-side diff) | |
tree | e55119af88abe930c1ce492f30efb72c929a730c /noncore/tools/remote/remote.cpp | |
parent | 536f271b1e6a1d1886e96a28524a3503c4c38c4e (diff) | |
download | opie-c7e563cbb26c20807e66dd4284d1ce9cbf8e1419.zip opie-c7e563cbb26c20807e66dd4284d1ce9cbf8e1419.tar.gz opie-c7e563cbb26c20807e66dd4284d1ce9cbf8e1419.tar.bz2 |
improve support for BigScreen
Diffstat (limited to 'noncore/tools/remote/remote.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/tools/remote/remote.cpp | 102 |
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. Copyright (C) 2002 Thomas Stephens - + This 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 version. - + This 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 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 @@ -16,2 +16,5 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +#include "mainview.h" + +/* OPIE */ #include <qpe/qpeapplication.h> @@ -19,2 +22,4 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include <qpe/config.h> + +/* QT */ #include <qpushbutton.h> @@ -25,2 +30,4 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include <qobject.h> + +/* STD */ #include <sys/socket.h> @@ -32,3 +39,2 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -#include "mainview.h" @@ -37,3 +43,3 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // struct sockaddr_un addr; - + addr.sun_family=AF_UNIX; @@ -41,3 +47,3 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA fd = socket(AF_UNIX, SOCK_STREAM, 0); - + if(connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1) @@ -57,44 +63,44 @@ int main( int argc, char **argv ) { - QPEApplication a( argc, argv ); - MainView w; - - int fd; -// struct sockaddr_un addr; -// char read_buffer[BUFFERSIZE+1]; -// char write_buffer[] = "LIST\n"; - -// addr.sun_family=AF_UNIX; -// strcpy(addr.sun_path,"/dev/lircd"); -// fd = socket(AF_UNIX, SOCK_STREAM, 0); - -// printf("fd1: %d\n", fd); -/* - if(connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1) - { - QMessageBox *mb = new QMessageBox("error", - "couldnt connect to socket", - QMessageBox::NoIcon, - QMessageBox::Ok, - QMessageBox::NoButton, - QMessageBox::NoButton); - mb->exec(); - } -*/ - -// printf("%d\n", write(fd, write_buffer, sizeof(write_buffer) ) ); - -// printf("%d\n", read(fd, read_buffer, BUFFERSIZE ) ); - -// QMessageBox *mbtest = new QMessageBox("lirc test", -// *new QString((const char *) read_buffer), -// QMessageBox::NoIcon, -// QMessageBox::Ok, -// QMessageBox::NoButton, -// QMessageBox::NoButton); -// mbtest->exec(); - - a.setMainWidget( &w ); - w.setIRSocket(fd); - w.showMaximized(); - return a.exec(); + QPEApplication a( argc, argv ); + MainView w; + + int fd; + // struct sockaddr_un addr; + // char read_buffer[BUFFERSIZE+1]; + // char write_buffer[] = "LIST\n"; + + // addr.sun_family=AF_UNIX; + // strcpy(addr.sun_path,"/dev/lircd"); + // fd = socket(AF_UNIX, SOCK_STREAM, 0); + + // printf("fd1: %d\n", fd); + /* + if(connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1) + { + QMessageBox *mb = new QMessageBox("error", + "couldnt connect to socket", + QMessageBox::NoIcon, + QMessageBox::Ok, + QMessageBox::NoButton, + QMessageBox::NoButton); + mb->exec(); + } + */ + + // printf("%d\n", write(fd, write_buffer, sizeof(write_buffer) ) ); + + // printf("%d\n", read(fd, read_buffer, BUFFERSIZE ) ); + + // QMessageBox *mbtest = new QMessageBox("lirc test", + // *new QString((const char *) read_buffer), + // QMessageBox::NoIcon, + // QMessageBox::Ok, + // QMessageBox::NoButton, + // QMessageBox::NoButton); + // mbtest->exec(); + + a.setMainWidget( &w ); + w.setIRSocket(fd); + QPEApplication::showWidget( &w ); + return a.exec(); } |