-rw-r--r-- | library/ir.cpp | 4 |
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 | |||
@@ -3,98 +3,98 @@ | |||
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 "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 | */ |
46 | Ir::Ir( QObject *parent, const char *name ) | 46 | Ir::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 | */ |
60 | bool Ir::supported() | 60 | bool 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 | */ |
76 | void Ir::send( const QString &fn, const QString &description, const QString &mimetype) | 76 | void 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 | } |
85 | 85 | ||
86 | /*! | 86 | /*! |
87 | \overload | 87 | \overload |
88 | 88 | ||
89 | Uses the DocLnk::file() and DocLnk::type() of \a doc. | 89 | Uses the DocLnk::file() and DocLnk::type() of \a doc. |
90 | 90 | ||
91 | \sa done() | 91 | \sa done() |
92 | */ | 92 | */ |
93 | void Ir::send( const DocLnk &doc, const QString &description ) | 93 | void Ir::send( const DocLnk &doc, const QString &description ) |
94 | { | 94 | { |
95 | send( doc.file(), description, doc.type() ); | 95 | send( doc.file(), description, doc.type() ); |
96 | } | 96 | } |
97 | 97 | ||
98 | /*! | 98 | /*! |
99 | \fn Ir::done( Ir *ir ); | 99 | \fn Ir::done( Ir *ir ); |
100 | 100 | ||