equal
deleted
inserted
replaced
127 return err; |
127 return err; |
128 } |
128 } |
129 |
129 |
130 void CBtAudioManPlugin::GetConnections( RBTDevAddrArray& aAddrArray, TBTProfile aConnectedProfile ) |
130 void CBtAudioManPlugin::GetConnections( RBTDevAddrArray& aAddrArray, TBTProfile aConnectedProfile ) |
131 { |
131 { |
|
132 TRACE_FUNC |
132 aAddrArray.Reset(); |
133 aAddrArray.Reset(); |
133 TProfiles profile = EUnknownProfile; |
134 TProfiles profile = EUnknownProfile; |
134 |
135 |
135 if (aConnectedProfile == EBTProfileHSP || aConnectedProfile == EBTProfileHFP) |
136 if (aConnectedProfile == EBTProfileHSP || aConnectedProfile == EBTProfileHFP) |
136 { |
137 { |
147 |
148 |
148 //guess there are 2 addresses as a 'best guess' |
149 //guess there are 2 addresses as a 'best guess' |
149 TInt numAddresses = 2; |
150 TInt numAddresses = 2; |
150 TInt count = numAddresses; |
151 TInt count = numAddresses; |
151 RBuf8 addrbuf; |
152 RBuf8 addrbuf; |
152 TPtrC8 ptr(addrbuf); |
|
153 |
153 |
154 do |
154 do |
155 { |
155 { |
156 //if this is > 1st time round, the buffer must be deleted and the |
156 //if this is > 1st time round, the buffer must be deleted and the |
157 //count might have changed |
157 //count might have changed |
184 } |
184 } |
185 } |
185 } |
186 //iterate if the number of connections is greater than our 'best guess' or |
186 //iterate if the number of connections is greater than our 'best guess' or |
187 //maybe another connection was established while this was taking place |
187 //maybe another connection was established while this was taking place |
188 while (count > numAddresses); |
188 while (count > numAddresses); |
|
189 |
|
190 TPtrC8 ptr(addrbuf); |
189 |
191 |
190 //iterate through the addresses buffer |
192 //iterate through the addresses buffer |
191 while (ptr.Length() >= KBTDevAddrSize) |
193 while (ptr.Length() >= KBTDevAddrSize) |
192 { |
194 { |
193 //append each address to the device address array |
195 //append each address to the device address array |