-rw-r--r-- | noncore/net/opietooth/lib/parser.cc | 8 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/services.cc | 26 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/services.h | 13 |
3 files changed, 22 insertions, 25 deletions
diff --git a/noncore/net/opietooth/lib/parser.cc b/noncore/net/opietooth/lib/parser.cc index 00ec84a..0699309 100644 --- a/noncore/net/opietooth/lib/parser.cc +++ b/noncore/net/opietooth/lib/parser.cc | |||
@@ -122,5 +122,4 @@ bool Parser::parseClassId( const QString& str) { | |||
122 | return true; | 122 | return true; |
123 | }else if ( m_classOver ) { // ok now are the informations in place | 123 | }else if ( m_classOver && str.startsWith(" " ) ){ // ok now are the informations in place |
124 | 124 | ||
125 | m_classOver = false; | ||
126 | 125 | ||
@@ -134,4 +133,3 @@ bool Parser::parseClassId( const QString& str) { | |||
134 | qWarning("ids %d", ids ); | 133 | qWarning("ids %d", ids ); |
135 | m_item.setClassIdList( classes ); | 134 | m_item.insertClassId( ids, classes ); |
136 | m_item.setClassIdList( ids ); | ||
137 | 135 | ||
@@ -139,3 +137,3 @@ bool Parser::parseClassId( const QString& str) { | |||
139 | }else | 137 | }else |
140 | m_classOver = true; | 138 | m_classOver = false; |
141 | return false; | 139 | return false; |
diff --git a/noncore/net/opietooth/lib/services.cc b/noncore/net/opietooth/lib/services.cc index 93ee70a..23b760b 100644 --- a/noncore/net/opietooth/lib/services.cc +++ b/noncore/net/opietooth/lib/services.cc | |||
@@ -115,4 +115,3 @@ Services &Services::operator=( const Services& ser){ | |||
115 | m_recHandle = ser.m_recHandle; | 115 | m_recHandle = ser.m_recHandle; |
116 | m_classList = ser.m_classList; | 116 | m_classIds = ser.m_classIds; |
117 | m_classId = ser.m_classId; | ||
118 | m_protocols = ser.m_protocols; | 117 | m_protocols = ser.m_protocols; |
@@ -124,7 +123,6 @@ bool operator==( const Services& one, | |||
124 | if ( ( one.recHandle() == two.recHandle() ) && | 123 | if ( ( one.recHandle() == two.recHandle() ) && |
125 | ( one.classIdListInt() == two.classIdListInt() ) && | ||
126 | ( one.serviceName() == two.serviceName() ) && | 124 | ( one.serviceName() == two.serviceName() ) && |
127 | ( one.classIdList() == two.classIdList() ) && | ||
128 | ( one.protocolDescriptorList() == two.protocolDescriptorList() ) && | 125 | ( one.protocolDescriptorList() == two.protocolDescriptorList() ) && |
129 | ( one.profileDescriptor() == two.profileDescriptor() ) ) | 126 | ( one.profileDescriptor() == two.profileDescriptor() ) |
127 | /* ( one.classIdList() == two.classIdList() ) */ ) | ||
130 | return true; | 128 | return true; |
@@ -144,13 +142,13 @@ void Services::setRecHandle( int handle){ | |||
144 | } | 142 | } |
145 | QString Services::classIdList() const{ | 143 | QMap<int, QString> Services::classIdList()const { |
146 | return m_classList; | 144 | return m_classIds; |
145 | }; | ||
146 | void Services::insertClassId( int id, const QString& str ) { | ||
147 | m_classIds.insert( id, str ); | ||
147 | } | 148 | } |
148 | void Services::setClassIdList( const QString& str){ | 149 | void Services::removeClassId(int id) { |
149 | m_classList = str; | 150 | m_classIds.remove( id ); |
150 | } | 151 | } |
151 | int Services::classIdListInt() const{ | 152 | void Services::clearClassId() { |
152 | return m_classId; | 153 | m_classIds.clear(); |
153 | } | ||
154 | void Services::setClassIdList(int id){ | ||
155 | m_classId = id; | ||
156 | } | 154 | } |
diff --git a/noncore/net/opietooth/lib/services.h b/noncore/net/opietooth/lib/services.h index 881d383..7cce5e1 100644 --- a/noncore/net/opietooth/lib/services.h +++ b/noncore/net/opietooth/lib/services.h | |||
@@ -4,2 +4,3 @@ | |||
4 | 4 | ||
5 | #include <qmap.h> | ||
5 | #include <qvaluelist.h> | 6 | #include <qvaluelist.h> |
@@ -118,6 +119,7 @@ namespace OpieTooth { | |||
118 | 119 | ||
119 | QString classIdList()const; | 120 | |
120 | void setClassIdList( const QString& ); | 121 | QMap<int, QString> classIdList()const; |
121 | int classIdListInt()const; | 122 | void insertClassId( int id, const QString& className ); |
122 | void setClassIdList(int ); | 123 | void removeClassId( int id ); |
124 | void clearClassId(); | ||
123 | 125 | ||
@@ -134,6 +136,5 @@ namespace OpieTooth { | |||
134 | private: | 136 | private: |
137 | QMap<int, QString> m_classIds; | ||
135 | QString m_name; | 138 | QString m_name; |
136 | int m_recHandle; | 139 | int m_recHandle; |
137 | QString m_classList; | ||
138 | int m_classId; | ||
139 | QValueList<ProfileDescriptor> m_profiles; | 140 | QValueList<ProfileDescriptor> m_profiles; |