summaryrefslogtreecommitdiff
path: root/library/ir.cpp
Unidiff
Diffstat (limited to 'library/ir.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/ir.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/library/ir.cpp b/library/ir.cpp
index a7cf7b1..b5b726d 100644
--- a/library/ir.cpp
+++ b/library/ir.cpp
@@ -1,75 +1,73 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 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 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 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 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. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "ir.h" 21#include "ir.h"
22 22
23#include <qstring.h> 23#include <qstring.h>
24#ifdef QWS
25#include "qcopenvelope_qws.h" 24#include "qcopenvelope_qws.h"
26#include <qcopchannel_qws.h> 25#include <qcopchannel_qws.h>
27#endif
28#include "applnk.h" 26#include "applnk.h"
29 27
30/*! 28/*!
31 \class Ir ir.h 29 \class Ir ir.h
32 \brief The Ir class implements basic support for sending objects over an 30 \brief The Ir class implements basic support for sending objects over an
33 infrared communication link. 31 infrared communication link.
34 32
35 Both \link doclnk.html DocLnk\endlink objects and files can be 33 Both \link doclnk.html DocLnk\endlink objects and files can be
36 sent to another device via the infrared link using the send() 34 sent to another device via the infrared link using the send()
37 function. When the send has completed the done() signal is 35 function. When the send has completed the done() signal is
38 emitted. 36 emitted.
39 37
40 The supported() function returns whether the device supports 38 The supported() function returns whether the device supports
41 infrared communication or not. 39 infrared communication or not.
42 40
43 \ingroup qtopiaemb 41 \ingroup qtopiaemb
44*/ 42*/
45 43
46/*! 44/*!
47 Constructs an Ir object. The \a parent and \a name classes are the 45 Constructs an Ir object. The \a parent and \a name classes are the
48 standard QObject parameters. 46 standard QObject parameters.
49*/ 47*/
50Ir::Ir( QObject *parent, const char *name ) 48Ir::Ir( QObject *parent, const char *name )
51 : QObject( parent, name ) 49 : QObject( parent, name )
52{ 50{
53#ifndef QT_NO_COP 51#ifndef QT_NO_COP
54 ch = new QCopChannel( "QPE/Obex" ); 52 ch = new QCopChannel( "QPE/Obex" );
55 connect( ch, SIGNAL(received(const QCString &, const QByteArray &)), 53 connect( ch, SIGNAL(received(const QCString &, const QByteArray &)),
56 this, SLOT(obexMessage( const QCString &, const QByteArray &)) ); 54 this, SLOT(obexMessage( const QCString &, const QByteArray &)) );
57#endif 55#endif
58} 56}
59 57
60/*! 58/*!
61 Returns TRUE if the system supports infrared communication; 59 Returns TRUE if the system supports infrared communication;
62 otherwise returns FALSE. 60 otherwise returns FALSE.
63*/ 61*/
64bool Ir::supported() 62bool Ir::supported()
65{ 63{
66#ifndef QT_NO_COP 64#ifndef QT_NO_COP
67 return QCopChannel::isRegistered( "QPE/Obex" ); 65 return QCopChannel::isRegistered( "QPE/Obex" );
68#endif 66#endif
69} 67}
70 68
71/*! 69/*!
72 Sends the object in file \a fn over the infrared link. The \a 70 Sends the object in file \a fn over the infrared link. The \a
73 description is used in the text shown to the user while sending 71 description is used in the text shown to the user while sending
74 is in progress. The optional \a mimetype parameter specifies the 72 is in progress. The optional \a mimetype parameter specifies the
75 mimetype of the object. If this parameter is not set, it is 73 mimetype of the object. If this parameter is not set, it is