summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/lib/parser.cc
authorzecke <zecke>2002-07-13 12:54:47 (UTC)
committer zecke <zecke>2002-07-13 12:54:47 (UTC)
commitd7f3722f9b7913731978437085b14cc2cccbfa24 (patch) (unidiff)
tree1b190105693609cc01d1ad9730e8925e957209c9 /noncore/net/opietooth/lib/parser.cc
parent8be0a8e108eaf8ff99301aa175298ddeb48eae67 (diff)
downloadopie-d7f3722f9b7913731978437085b14cc2cccbfa24.zip
opie-d7f3722f9b7913731978437085b14cc2cccbfa24.tar.gz
opie-d7f3722f9b7913731978437085b14cc2cccbfa24.tar.bz2
LIB updates
Class IdList per Service can have more than one line
Diffstat (limited to 'noncore/net/opietooth/lib/parser.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/parser.cc8
1 files changed, 3 insertions, 5 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
@@ -117,30 +117,28 @@ bool Parser::parseRecHandle( const QString& str) {
117 return false; 117 return false;
118} 118}
119bool Parser::parseClassId( const QString& str) { 119bool Parser::parseClassId( const QString& str) {
120 if (str.startsWith("Service Class ID List:") ) { 120 if (str.startsWith("Service Class ID List:") ) {
121 m_classOver = true; 121 m_classOver = true;
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
127 // "Obex Object Push" (0x1105) 126 // "Obex Object Push" (0x1105)
128 // find backwards the " and the from 0 to pos and the mid pos+1 127 // find backwards the " and the from 0 to pos and the mid pos+1
129 // then stripWhiteSpace add name replace '"' with "" 128 // then stripWhiteSpace add name replace '"' with ""
130 // and then convert 0x1105 toInt() 129 // and then convert 0x1105 toInt()
131 QString classes; 130 QString classes;
132 int ids; 131 int ids;
133 ids = convert( str, classes ); 132 ids = convert( str, classes );
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
138 return true; 136 return true;
139 }else 137 }else
140 m_classOver = true; 138 m_classOver = false;
141 return false; 139 return false;
142} 140}
143bool Parser::parseProtocol( const QString& str) { 141bool Parser::parseProtocol( const QString& str) {
144 if (str.startsWith("Protocol Descriptor List:") ) { 142 if (str.startsWith("Protocol Descriptor List:") ) {
145 m_protocolOver = true; 143 m_protocolOver = true;
146 m_protocolAdded = false; 144 m_protocolAdded = false;