summaryrefslogtreecommitdiff
path: root/library/ir.cpp
authoralwin <alwin>2004-03-02 12:21:11 (UTC)
committer alwin <alwin>2004-03-02 12:21:11 (UTC)
commitb6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff)
treed3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /library/ir.cpp
parent0d59c780513da78033f4d9040475dee9db0256d4 (diff)
downloadopie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2
applied the patch generated by the optimize_connect script from
TT.
Diffstat (limited to 'library/ir.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/ir.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/ir.cpp b/library/ir.cpp
index 32c0925..c581eb1 100644
--- a/library/ir.cpp
+++ b/library/ir.cpp
@@ -19,66 +19,66 @@
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "ir.h" 21#include "ir.h"
22 22
23#include "qcopenvelope_qws.h" 23#include "qcopenvelope_qws.h"
24#include "applnk.h" 24#include "applnk.h"
25 25
26/*! 26/*!
27 \class Ir ir.h 27 \class Ir ir.h
28 \brief The Ir class implements basic support for sending objects over an 28 \brief The Ir class implements basic support for sending objects over an
29 infrared communication link. 29 infrared communication link.
30 30
31 Both \link doclnk.html DocLnk\endlink objects and files can be 31 Both \link doclnk.html DocLnk\endlink objects and files can be
32 sent to another device via the infrared link using the send() 32 sent to another device via the infrared link using the send()
33 function. When the send has completed the done() signal is 33 function. When the send has completed the done() signal is
34 emitted. 34 emitted.
35 35
36 The supported() function returns whether the device supports 36 The supported() function returns whether the device supports
37 infrared communication or not. 37 infrared communication or not.
38 38
39 \ingroup qtopiaemb 39 \ingroup qtopiaemb
40*/ 40*/
41 41
42/*! 42/*!
43 Constructs an Ir object. The \a parent and \a name classes are the 43 Constructs an Ir object. The \a parent and \a name classes are the
44 standard QObject parameters. 44 standard QObject parameters.
45*/ 45*/
46Ir::Ir( QObject *parent, const char *name ) 46Ir::Ir( QObject *parent, const char *name )
47 : QObject( parent, name ) 47 : QObject( parent, name )
48{ 48{
49#ifndef QT_NO_COP 49#ifndef QT_NO_COP
50 ch = new QCopChannel( "QPE/Obex" ); 50 ch = new QCopChannel( "QPE/Obex" );
51 connect( ch, SIGNAL(received(const QCString &, const QByteArray &)), 51 connect( ch, SIGNAL(received(const QCString&,const QByteArray&)),
52 this, SLOT(obexMessage( const QCString &, const QByteArray &)) ); 52 this, SLOT(obexMessage(const QCString&,const QByteArray&)) );
53#endif 53#endif
54} 54}
55 55
56/*! 56/*!
57 Returns TRUE if the system supports infrared communication; 57 Returns TRUE if the system supports infrared communication;
58 otherwise returns FALSE. 58 otherwise returns FALSE.
59*/ 59*/
60bool Ir::supported() 60bool Ir::supported()
61{ 61{
62#ifndef QT_NO_COP 62#ifndef QT_NO_COP
63 return QCopChannel::isRegistered( "QPE/Obex" ); 63 return QCopChannel::isRegistered( "QPE/Obex" );
64#endif 64#endif
65} 65}
66 66
67/*! 67/*!
68 Sends the object in file \a fn over the infrared link. The \a 68 Sends the object in file \a fn over the infrared link. The \a
69 description is used in the text shown to the user while sending 69 description is used in the text shown to the user while sending
70 is in progress. The optional \a mimetype parameter specifies the 70 is in progress. The optional \a mimetype parameter specifies the
71 mimetype of the object. If this parameter is not set, it is 71 mimetype of the object. If this parameter is not set, it is
72 determined by the the filename's suffix. 72 determined by the the filename's suffix.
73 73
74 \sa done() 74 \sa done()
75*/ 75*/
76void Ir::send( const QString &fn, const QString &description, const QString &mimetype) 76void Ir::send( const QString &fn, const QString &description, const QString &mimetype)
77{ 77{
78 if ( !filename.isEmpty() ) return; 78 if ( !filename.isEmpty() ) return;
79 filename = fn; 79 filename = fn;
80#ifndef QT_NO_COP 80#ifndef QT_NO_COP
81 QCopEnvelope e("QPE/Obex", "send(QString,QString,QString)"); 81 QCopEnvelope e("QPE/Obex", "send(QString,QString,QString)");
82 e << description << filename << mimetype; 82 e << description << filename << mimetype;
83#endif 83#endif
84} 84}