summaryrefslogtreecommitdiff
path: root/library/ir.cpp
Unidiff
Diffstat (limited to 'library/ir.cpp') (more/less context) (show whitespace changes)
-rw-r--r--library/ir.cpp55
1 files changed, 48 insertions, 7 deletions
diff --git a/library/ir.cpp b/library/ir.cpp
index 68345d1..a7cf7b1 100644
--- a/library/ir.cpp
+++ b/library/ir.cpp
@@ -1 +1,21 @@
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#include "ir.h" 21#include "ir.h"
@@ -3,4 +23,6 @@
3#include <qstring.h> 23#include <qstring.h>
24#ifdef QWS
4#include "qcopenvelope_qws.h" 25#include "qcopenvelope_qws.h"
5#include <qcopchannel_qws.h> 26#include <qcopchannel_qws.h>
27#endif
6#include "applnk.h" 28#include "applnk.h"
@@ -12,3 +34,11 @@
12 34
13 The Ir class is a small helper class to enable sending of objects over an infrared communication link. 35 Both \link doclnk.html DocLnk\endlink objects and files can be
36 sent to another device via the infrared link using the send()
37 function. When the send has completed the done() signal is
38 emitted.
39
40 The supported() function returns whether the device supports
41 infrared communication or not.
42
43 \ingroup qtopiaemb
14*/ 44*/
@@ -22,2 +52,3 @@ Ir::Ir( QObject *parent, const char *name )
22{ 52{
53#ifndef QT_NO_COP
23 ch = new QCopChannel( "QPE/Obex" ); 54 ch = new QCopChannel( "QPE/Obex" );
@@ -25,2 +56,3 @@ Ir::Ir( QObject *parent, const char *name )
25 this, SLOT(obexMessage( const QCString &, const QByteArray &)) ); 56 this, SLOT(obexMessage( const QCString &, const QByteArray &)) );
57#endif
26} 58}
@@ -28,3 +60,4 @@ Ir::Ir( QObject *parent, const char *name )
28/*! 60/*!
29 Returns TRUE if the system supports infrared communication. 61 Returns TRUE if the system supports infrared communication;
62 otherwise returns FALSE.
30*/ 63*/
@@ -32,3 +65,5 @@ bool Ir::supported()
32{ 65{
66#ifndef QT_NO_COP
33 return QCopChannel::isRegistered( "QPE/Obex" ); 67 return QCopChannel::isRegistered( "QPE/Obex" );
68#endif
34} 69}
@@ -36,7 +71,9 @@ bool Ir::supported()
36/*! 71/*!
37 Send the object in the file \a fn over the infrared link. 72 Sends the object in file \a fn over the infrared link. The \a
38 The \a description will be shown to the user while 73 description is used in the text shown to the user while sending
39 sending is in progress. 74 is in progress. The optional \a mimetype parameter specifies the
40 The optional \a mimetype parameter specifies the mimetype of the object. If this parameter is not 75 mimetype of the object. If this parameter is not set, it is
41 set, it will be determined by the extension of the filename. 76 determined by the the filename's suffix.
77
78 \sa done()
42*/ 79*/
@@ -46,4 +83,6 @@ void Ir::send( const QString &fn, const QString &description, const QString &mim
46 filename = fn; 83 filename = fn;
84#ifndef QT_NO_COP
47 QCopEnvelope e("QPE/Obex", "send(QString,QString,QString)"); 85 QCopEnvelope e("QPE/Obex", "send(QString,QString,QString)");
48 e << description << filename << mimetype; 86 e << description << filename << mimetype;
87#endif
49} 88}
@@ -54,2 +93,4 @@ void Ir::send( const QString &fn, const QString &description, const QString &mim
54 Uses the DocLnk::file() and DocLnk::type() of \a doc. 93 Uses the DocLnk::file() and DocLnk::type() of \a doc.
94
95 \sa done()
55*/ 96*/