summaryrefslogtreecommitdiff
authorzecke <zecke>2003-08-28 14:35:37 (UTC)
committer zecke <zecke>2003-08-28 14:35:37 (UTC)
commitf837944e9a404c46efc00e4d5851ea13dbb88ef2 (patch) (unidiff)
treeaa1276a41b80d3f42cab855fbcebf9ec48d1795a
parent3f829e499bac92d52a9bbb1ad6b31bb74734287f (diff)
downloadopie-f837944e9a404c46efc00e4d5851ea13dbb88ef2.zip
opie-f837944e9a404c46efc00e4d5851ea13dbb88ef2.tar.gz
opie-f837944e9a404c46efc00e4d5851ea13dbb88ef2.tar.bz2
Make it compile with opie ( use QLibrary )
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/irserver.cpp37
-rw-r--r--core/launcher/irserver.h27
2 files changed, 53 insertions, 11 deletions
diff --git a/core/launcher/irserver.cpp b/core/launcher/irserver.cpp
index 625cb60..579c78c 100644
--- a/core/launcher/irserver.cpp
+++ b/core/launcher/irserver.cpp
@@ -1,9 +1,29 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21
1#include "irserver.h" 22#include "irserver.h"
2 23
3#include <qpe/qlibrary.h> 24#include <qtopia/qlibrary.h>
4#include <qpe/qpeapplication.h> 25#include <qtopia/qpeapplication.h>
5 26
6#include <qtranslator.h> 27#include <qtranslator.h>
7#include <stdlib.h>
8 28
9#include "obexinterface.h" 29#include "obexinterface.h"
@@ -12,8 +32,8 @@
12 32
13IrServer::IrServer( QObject *parent, const char *name ) 33IrServer::IrServer( QObject *parent, const char *name )
14 : QObject( parent, name ) 34 : QObject( parent, name ), obexIface(0)
15{ 35{
16 lib = 0; 36 lib = 0;
17 iface = 0; 37 obexIface = 0;
18 QString path = QPEApplication::qpeDir() + "/plugins/obex/"; 38 QString path = QPEApplication::qpeDir() + "/plugins/obex/";
19 QDir dir( path, "lib*.so" ); 39 QDir dir( path, "lib*.so" );
@@ -23,5 +43,5 @@ IrServer::IrServer( QObject *parent, const char *name )
23 QLibrary *trylib = new QLibrary( path + *it ); 43 QLibrary *trylib = new QLibrary( path + *it );
24 //qDebug("trying lib %s", (path + (*it)).latin1() ); 44 //qDebug("trying lib %s", (path + (*it)).latin1() );
25 if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&iface ) == QS_OK ) { 45 if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&obexIface ) == QS_OK ) {
26 lib = trylib; 46 lib = trylib;
27 //qDebug("found obex lib" ); 47 //qDebug("found obex lib" );
@@ -47,6 +67,7 @@ IrServer::IrServer( QObject *parent, const char *name )
47IrServer::~IrServer() 67IrServer::~IrServer()
48{ 68{
49 if ( iface ) 69 if ( obexIface )
50 iface->release(); 70 obexIface->release();
51 delete lib; 71 delete lib;
52} 72}
73
diff --git a/core/launcher/irserver.h b/core/launcher/irserver.h
index b3434dd..a20f5e9 100644
--- a/core/launcher/irserver.h
+++ b/core/launcher/irserver.h
@@ -1,10 +1,31 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
1#ifndef IRSERVER_H 21#ifndef IRSERVER_H
2#define IRSERVER_H 22#define IRSERVER_H
3 23
24#include <qtopia/global.h>
4#include <qobject.h> 25#include <qobject.h>
5 26
6class QCopChannel; 27class QCopChannel;
7class QLibrary;
8struct ObexInterface; 28struct ObexInterface;
29class QLibrary;
9 30
10class IrServer : public QObject 31class IrServer : public QObject
@@ -16,6 +37,6 @@ public:
16 37
17private: 38private:
18 QLibrary *lib; 39 QLibrary* lib;
19 ObexInterface *iface; 40 ObexInterface *obexIface;
20}; 41};
21 42