summaryrefslogtreecommitdiff
authorzecke <zecke>2002-07-14 18:00:04 (UTC)
committer zecke <zecke>2002-07-14 18:00:04 (UTC)
commit31e233a6cf72bc853137ea05285f4d0f41665365 (patch) (side-by-side diff)
tree8443ffd01357792ee935934e6ec4860ccc6a799c
parent64f081fef7bca90d2ccf8ade9afe2028ef5de7ae (diff)
downloadopie-31e233a6cf72bc853137ea05285f4d0f41665365.zip
opie-31e233a6cf72bc853137ea05285f4d0f41665365.tar.gz
opie-31e233a6cf72bc853137ea05285f4d0f41665365.tar.bz2
Patch the lib
Scanning services is working now RemoteDevice update ( now got equals(const RemoteDevice& )
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/parser.cc13
-rw-r--r--noncore/net/opietooth/lib/remotedevice.cc6
-rw-r--r--noncore/net/opietooth/lib/remotedevice.h4
3 files changed, 18 insertions, 5 deletions
diff --git a/noncore/net/opietooth/lib/parser.cc b/noncore/net/opietooth/lib/parser.cc
index 0699309..8baf284 100644
--- a/noncore/net/opietooth/lib/parser.cc
+++ b/noncore/net/opietooth/lib/parser.cc
@@ -59,3 +59,3 @@ void Parser::parse( const QString& string) {
for (it = list.begin(); it != list.end(); ++it ) {
- qWarning("line:%s:line", (*it).latin1() );
+ //qWarning("line:%s:line", (*it).latin1() );
if ( (*it).startsWith("Browsing") ) continue;
@@ -82,3 +82,3 @@ void Parser::parse( const QString& string) {
if (m_complete) {
- qWarning("adding");
+// qWarning("adding");
if (!m_item.serviceName().isEmpty() )
@@ -120,2 +120,4 @@ bool Parser::parseClassId( const QString& str) {
if (str.startsWith("Service Class ID List:") ) {
+ qWarning("found class id" );
+ qWarning("line:%s", str.latin1() );
m_classOver = true;
@@ -123,3 +125,4 @@ bool Parser::parseClassId( const QString& str) {
}else if ( m_classOver && str.startsWith(" " ) ){ // ok now are the informations in place
-
+ qWarning("line with class id" );
+ qWarning("%s",str.latin1() );
@@ -136,4 +139,6 @@ bool Parser::parseClassId( const QString& str) {
return true;
- }else
+ }else{
+ qWarning("Else %d", m_classOver );
m_classOver = false;
+ }
return false;
diff --git a/noncore/net/opietooth/lib/remotedevice.cc b/noncore/net/opietooth/lib/remotedevice.cc
index 08fb397..9cf0cac 100644
--- a/noncore/net/opietooth/lib/remotedevice.cc
+++ b/noncore/net/opietooth/lib/remotedevice.cc
@@ -48 +48,7 @@ void RemoteDevice::setName( const QString& name ){
}
+bool RemoteDevice::equals( const RemoteDevice& dev ) const {
+ if ( m_mac == dev.m_mac && m_name == dev.m_name )
+ return true;
+ else
+ return false;
+};
diff --git a/noncore/net/opietooth/lib/remotedevice.h b/noncore/net/opietooth/lib/remotedevice.h
index 23f98bd..f268ccc 100644
--- a/noncore/net/opietooth/lib/remotedevice.h
+++ b/noncore/net/opietooth/lib/remotedevice.h
@@ -14,3 +14,3 @@ namespace OpieTooth{
~RemoteDevice();
- friend bool operator==(const RemoteDevice&, const RemoteDevice&);
+// friend bool operator==(const RemoteDevice&, const RemoteDevice&);
RemoteDevice &operator=(const RemoteDevice& );
@@ -21,2 +21,3 @@ namespace OpieTooth{
void setName( const QString& name );
+ bool equals( const RemoteDevice& )const;
private:
@@ -25,2 +26,3 @@ namespace OpieTooth{
};
+ bool operator==( const RemoteDevice&, const RemoteDevice& );
};