author | korovkin <korovkin> | 2006-07-06 16:28:08 (UTC) |
---|---|---|
committer | korovkin <korovkin> | 2006-07-06 16:28:08 (UTC) |
commit | 43cd66c08de4447998028179d20fd4817aaf16ca (patch) (unidiff) | |
tree | 87888aadc3398c3c633e332cda46d92bb0522d6a /core/obex/obex.cpp | |
parent | adcfc6f4afe184a9eb6fbf458616494dfe0dadda (diff) | |
download | opie-43cd66c08de4447998028179d20fd4817aaf16ca.zip opie-43cd66c08de4447998028179d20fd4817aaf16ca.tar.gz opie-43cd66c08de4447998028179d20fd4817aaf16ca.tar.bz2 |
Added OBEX Push functionality for Bluetooth.
- Added ObexBase - asic class for IR and BT Obex
- Added ObexServer - OBEX Push server.
-rw-r--r-- | core/obex/obex.cpp | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/core/obex/obex.cpp b/core/obex/obex.cpp index 36634ec..95c561a 100644 --- a/core/obex/obex.cpp +++ b/core/obex/obex.cpp | |||
@@ -1 +1,31 @@ | |||
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. | ||
26 | |||
27 | */ | ||
28 | /* | ||
29 | * The Infrared OBEX handling class implementation | ||
30 | */ | ||
1 | 31 | ||
@@ -18,3 +48,3 @@ using namespace Opie::Core; | |||
18 | Obex::Obex( QObject *parent, const char* name ) | 48 | Obex::Obex( QObject *parent, const char* name ) |
19 | : QObject(parent, name ) | 49 | : ObexBase(parent, name ) |
20 | { | 50 | { |
@@ -22,8 +52,2 @@ Obex::Obex( QObject *parent, const char* name ) | |||
22 | m_send=0; | 52 | m_send=0; |
23 | m_count = 0; | ||
24 | m_receive = false; | ||
25 | connect( this, SIGNAL(error(int) ), // for recovering to receive | ||
26 | SLOT(slotError() ) ); | ||
27 | connect( this, SIGNAL(sent(bool) ), | ||
28 | SLOT(slotError() ) ); | ||
29 | }; | 53 | }; |
@@ -34,4 +58,3 @@ Obex::~Obex() { | |||
34 | void Obex::receive() { | 58 | void Obex::receive() { |
35 | m_receive = true; | 59 | ObexBase::receive(); |
36 | m_outp = QString::null; | ||
37 | m_rec = new OProcess(); | 60 | m_rec = new OProcess(); |
@@ -52,5 +75,5 @@ void Obex::receive() { | |||
52 | 75 | ||
53 | void Obex::send( const QString& fileName) { // if currently receiving stop it send receive | 76 | // if currently receiving stop it send receive |
54 | m_count = 0; | 77 | void Obex::send(const QString& fileName, const QString& addr) { |
55 | m_file = fileName; | 78 | ObexBase::send(fileName, addr); |
56 | if (m_rec != 0 ) { | 79 | if (m_rec != 0 ) { |
@@ -167,2 +190,3 @@ QString Obex::parseOut( ){ | |||
167 | void Obex::slotError() { | 190 | void Obex::slotError() { |
191 | ObexBase::slotError(); | ||
168 | if ( m_receive ) | 192 | if ( m_receive ) |
@@ -171,2 +195,3 @@ void Obex::slotError() { | |||
171 | void Obex::setReceiveEnabled( bool receive ) { | 195 | void Obex::setReceiveEnabled( bool receive ) { |
196 | ObexBase::setReceiveEnabled(receive); | ||
172 | if ( !receive ) { // | 197 | if ( !receive ) { // |