summaryrefslogtreecommitdiff
path: root/core/obex/obex.h
Unidiff
Diffstat (limited to 'core/obex/obex.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/obex/obex.h40
1 files changed, 35 insertions, 5 deletions
diff --git a/core/obex/obex.h b/core/obex/obex.h
index 5993976..36ff29a 100644
--- a/core/obex/obex.h
+++ b/core/obex/obex.h
@@ -1,41 +1,71 @@
1/*
2               =. This file is part of the OPIE Project
3             .=l. Copyright (c) 2002 Maximilian Reiss <max.reiss@gmx.de>
4           .>+-=
5 _;:,     .>    :=|. This library is free software; you can
6.> <,   >  .   <= redistribute it and/or modify it under
7:=1 )Y*s>-.--   : the terms of the GNU Library General Public
8.="- .-=="i,     .._ License as published by the Free Software
9 - .   .-<_>     .<> Foundation; version 2 of the License.
10     ._= =}       :
11    .%+i>       _;_.
12    .i_,=:_.      -<s. This library is distributed in the hope that
13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
14    : ..    .:,     . . . without even the implied warranty of
15    =_        +     =;=| MERCHANTABILITY or FITNESS FOR A
16  _.=:.       :    :=>: PARTICULAR PURPOSE. See the GNU
17..}^=.=       =       ; Library General Public License for more
18++=   -.     .     .: details.
19 :     =  ...= . :.=-
20 -.   .:....=;==+<; You should have received a copy of the GNU
21  -_. . .   )=.  = Library General Public License along with
22   --        :-= this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA.
1 26
27*/
28/*
29 * The Infrared OBEX handling class declaration
30 */
2 31
3#ifndef OpieObex_H 32#ifndef OpieObex_H
4#define OpieObex_H 33#define OpieObex_H
5 34
35#include "obexbase.h"
6#include <qobject.h> 36#include <qobject.h>
7 37
8namespace Opie {namespace Core {class OProcess;}} 38namespace Opie {namespace Core {class OProcess;}}
9class QCopChannel; 39class QCopChannel;
10namespace OpieObex { 40namespace OpieObex {
11 class Obex : public QObject { 41 class Obex : public ObexBase {
12 Q_OBJECT 42 Q_OBJECT
13 public: 43 public:
14 /** 44 /**
15 * Obex c'tor look 45 * Obex c'tor look
16 */ 46 */
17 Obex( QObject *parent, const char* name); 47 Obex( QObject *parent, const char* name);
18 /** 48 /**
19 * d'tor 49 * d'tor
20 */ 50 */
21 ~Obex(); 51 ~Obex();
22 52
23 /** 53 /**
24 * Starting listening to irda after enabled by the applet 54 * Starting listening to irda after enabled by the applet
25 * a signal gets emitted when received a file 55 * a signal gets emitted when received a file
26 */ 56 */
27 void receive(); 57 virtual void receive();
28 void send( const QString& ); 58 virtual void send(const QString& filename, const QString& addr);
29 void setReceiveEnabled( bool = false ); 59 virtual void setReceiveEnabled( bool = false );
30 signals: 60 signals:
31 61
32 /** 62 /**
33 * a signal 63 * a signal
34 * @param path The path to the received file 64 * @param path The path to the received file
35 */ 65 */
36 void receivedFile( const QString& path); 66 void receivedFile( const QString& path);
37 /** 67 /**
38 * error signal if the program couldn't be started or the 68 * error signal if the program couldn't be started or the
39 * the connection timed out 69 * the connection timed out
40 */ 70 */
41 void error( int ); 71 void error( int );
@@ -60,25 +90,25 @@ namespace OpieObex {
60 90
61private slots: 91private slots:
62 92
63 /** 93 /**
64 * send over palm obex 94 * send over palm obex
65 */ 95 */
66 96
67 //void send(const QString&); 97 //void send(const QString&);
68 98
69 // the process exited 99 // the process exited
70 void slotExited(Opie::Core::OProcess* proc) ; 100 void slotExited(Opie::Core::OProcess* proc) ;
71 void slotStdOut(Opie::Core::OProcess*, char*, int); 101 void slotStdOut(Opie::Core::OProcess*, char*, int);
72 void slotError(); 102 virtual void slotError();
73 103
74 private: 104 private:
75 void sendNow(); 105 void sendNow();
76 QString parseOut(); 106 QString parseOut();
77 void received(); 107 void received();
78 void sendEnd(); 108 void sendEnd();
79 109
80 }; 110 };
81}; 111};
82 112
83 113
84#endif 114#endif