summaryrefslogtreecommitdiff
authorzecke <zecke>2002-06-12 16:37:52 (UTC)
committer zecke <zecke>2002-06-12 16:37:52 (UTC)
commitac707e366de561cabc8074b62025d143200869d7 (patch) (side-by-side diff)
treead30bac3657fde6e664e7784eb34873989e94699
parent9b87f7a2f2de6b5c1bad4f35f76fc7a0fd1ad021 (diff)
downloadopie-ac707e366de561cabc8074b62025d143200869d7.zip
opie-ac707e366de561cabc8074b62025d143200869d7.tar.gz
opie-ac707e366de561cabc8074b62025d143200869d7.tar.bz2
OBEX time
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/obex/obex.cc32
-rw-r--r--core/applets/obex/obex.h10
-rw-r--r--core/applets/obex/obex.pro8
-rw-r--r--core/applets/obex/obeximpl.cc25
-rw-r--r--core/applets/obex/obeximpl.h5
5 files changed, 44 insertions, 36 deletions
diff --git a/core/applets/obex/obex.cc b/core/applets/obex/obex.cc
index f2ceff8..582ebbc 100644
--- a/core/applets/obex/obex.cc
+++ b/core/applets/obex/obex.cc
@@ -2,3 +2,3 @@
-#include "kprocess.h"
+#include <opie/oprocess.h>
#include "obex.h"
@@ -19,12 +19,12 @@ Obex::~Obex() {
void Obex::receive() {
- m_rec = new KProcess();
+ m_rec = new OProcess();
*m_rec << "irobex_palm3";
// connect to the necessary slots
- connect(m_rec, SIGNAL(processExited(KProcess*) ),
- this, SLOT(slotExited(KProcess*) ) );
+ connect(m_rec, SIGNAL(processExited(OProcess*) ),
+ this, SLOT(slotExited(OProcess*) ) );
- connect(m_rec, SIGNAL(receivedStdout(KProcess*, char*, int ) ),
- this, SLOT(slotStdOut(KProcess*, char*, int) ) );
+ connect(m_rec, SIGNAL(receivedStdout(OProcess*, char*, int ) ),
+ this, SLOT(slotStdOut(OProcess*, char*, int) ) );
- if(!m_rec->start(KProcess::NotifyOnExit, KProcess::AllOutput) ) {
+ if(!m_rec->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) {
qWarning("could not start :(");
@@ -44,4 +44,4 @@ void Obex::sendNow(){
}
- // KProcess inititialisation
- m_send = new KProcess();
+ // OProcess inititialisation
+ m_send = new OProcess();
*m_send << "irobex_palm3";
@@ -50,8 +50,8 @@ void Obex::sendNow(){
// connect to slots Exited and and StdOut
- connect(m_send, SIGNAL(processExited(KProcess*) ),
- this, SLOT(slotExited(KProcess*)) );
- connect(m_send, SIGNAL(receivedStdout(KProcess*, char*, int )),
- this, SLOT(slotStdOut(KProcess*, char*, int) ) );
+ connect(m_send, SIGNAL(processExited(OProcess*) ),
+ this, SLOT(slotExited(OProcess*)) );
+ connect(m_send, SIGNAL(receivedStdout(OProcess*, char*, int )),
+ this, SLOT(slotStdOut(OProcess*, char*, int) ) );
// now start it
- if (!m_send->start(/*KProcess::NotifyOnExit, KProcess::AllOutput*/ ) ) {
+ if (!m_send->start(/*OProcess::NotifyOnExit, OProcess::AllOutput*/ ) ) {
m_count = 15;
@@ -64,3 +64,3 @@ void Obex::sendNow(){
-void Obex::slotExited(KProcess* proc ){
+void Obex::slotExited(OProcess* proc ){
if (proc == m_rec ) { // recieve process
@@ -71,3 +71,3 @@ void Obex::slotExited(KProcess* proc ){
}
-void Obex::slotStdOut(KProcess* proc, char* buf, int len){
+void Obex::slotStdOut(OProcess* proc, char* buf, int len){
if ( proc == m_rec ) { // only recieve
diff --git a/core/applets/obex/obex.h b/core/applets/obex/obex.h
index 17b8141..4e78015 100644
--- a/core/applets/obex/obex.h
+++ b/core/applets/obex/obex.h
@@ -7,3 +7,3 @@
-class KProcess;
+class OProcess;
class QCopChannel;
@@ -55,4 +55,4 @@ namespace OpieObex {
QString m_outp;
- KProcess *m_send;
- KProcess *m_rec;
+ OProcess *m_send;
+ OProcess *m_rec;
@@ -67,4 +67,4 @@ namespace OpieObex {
// the process exited
- void slotExited(KProcess* proc) ;
- void slotStdOut(KProcess*, char*, int);
+ void slotExited(OProcess* proc) ;
+ void slotStdOut(OProcess*, char*, int);
diff --git a/core/applets/obex/obex.pro b/core/applets/obex/obex.pro
index ce07ac9..72ad78f 100644
--- a/core/applets/obex/obex.pro
+++ b/core/applets/obex/obex.pro
@@ -2,9 +2,9 @@ TEMPLATE = lib
CONFIG += qt warn_on release
-HEADERS = kprocess.h kprocctrl.h obex.h
-SOURCES = kprocess.cpp kprocctrl.cpp obex.cc
+HEADERS = obex.h obeximpl.h
+SOURCES = obex.cc obeximpl.cc
TARGET = obex
-DESTDIR = ../../plugins/applets
+DESTDIR = ../../plugins/obex
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += ../$(OPIEDIR)/include
-LIBS += -lqpe
+LIBS += -lqpe -lopie
VERSION = 0.0.1
diff --git a/core/applets/obex/obeximpl.cc b/core/applets/obex/obeximpl.cc
index a3004ab..fa2a30a 100644
--- a/core/applets/obex/obeximpl.cc
+++ b/core/applets/obex/obeximpl.cc
@@ -1,2 +1,4 @@
+#include <qdatastream.h>
+#include <qpe/qcom.h>
@@ -5,2 +7,4 @@
+
+
using namespace OpieObex;
@@ -8,7 +12,8 @@ using namespace OpieObex;
ObexImpl::ObexImpl( )
- : QObject {
+ : QObject() {
// register to a channel
+ qWarning( "c'tor" );
m_obex = new Obex(this, "obex");
m_chan = new QCopChannel("QPE/Obex" );
- cconnect(m_chan, SIGNAL(received(const QCString&, const QByteArray& ) ),
+ connect(m_chan, SIGNAL(received(const QCString&, const QByteArray& ) ),
this, SLOT(slotMessage(const QCString&, const QByteArray&) ) );
@@ -21,3 +26,3 @@ QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
*iface = 0;
- if( uuid == IID_QUknown )
+ if( uuid == IID_QUnknown )
*iface = this;
@@ -26,2 +31,3 @@ QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
+ qWarning("query" );
if(*iface )
@@ -32,3 +38,4 @@ QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) {
- QDataStrean stream( data, IO_ReadOnly );
+ QDataStream stream( data, IO_ReadOnly );
+ qWarning("Message %s", msg.data() );
if(msg == "send(QString,QString,QString)" ) {
@@ -39,6 +46,6 @@ void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) {
m_obex->send(filename );
- QCopEnvelope e ("QPE/Obex", "done(QString)" ):
- e << filename;
- }else if( ) {
-
+ QCopEnvelope e ("QPE/Obex", "done(QString)" );
+ e << filename;
+ }else if(msg == "receive(bool)" ) {
+ ;
}
@@ -48,3 +55,3 @@ Q_EXPORT_INTERFACE()
{
- Q_CREATE_INSTANCE( IrdaAppletImpl )
+ Q_CREATE_INSTANCE( ObexImpl )
}
diff --git a/core/applets/obex/obeximpl.h b/core/applets/obex/obeximpl.h
index 996627b..d5159e1 100644
--- a/core/applets/obex/obeximpl.h
+++ b/core/applets/obex/obeximpl.h
@@ -4,2 +4,3 @@
+#include <qobject.h>
#include "../obexinterface.h"
@@ -9,3 +10,3 @@ namespace OpieObex {
class Obex;
- class ObexImpl : public ObexInterface, public QObject {
+ class ObexImpl : public QObject, public ObexInterface {
Q_OBJECT
@@ -13,3 +14,3 @@ namespace OpieObex {
ObexImpl();
- virtual ObexImpl();
+ virtual ~ObexImpl();
QRESULT queryInterface( const QUuid&, QUnknownInterface** );