예제 #1
0
void
BluetoothSocket::BluetoothSocketIO::GetSocketAddr(
  BluetoothAddress& aAddress) const
{
  if (!mConnector) {
    NS_WARNING("No connector to get socket address from!");
    aAddress.Clear();
    return;
  }

  nsresult rv = mConnector->ConvertAddress(
    *reinterpret_cast<const struct sockaddr*>(&mAddress), sizeof(mAddress),
    aAddress);
  if (NS_FAILED(rv)) {
    aAddress.Clear();
    return;
  }
}
예제 #2
0
void
BluetoothSocket::GetAddress(BluetoothAddress& aAddress)
{
  if (!mIO || GetConnectionStatus() != SOCKET_CONNECTED) {
    NS_WARNING("No socket currently open!");
    aAddress.Clear();
    return;
  }

  mIO->GetSocketAddr(aAddress);
}
예제 #3
0
void
BluetoothHfpManager::GetAddress(BluetoothAddress& aDeviceAddress)
{
  aDeviceAddress.Clear();
}