Exemplo n.º 1
0
void
Connection::UpdateFromNetworkInfo(const hal::NetworkInformation& aNetworkInfo)
{
  mType = static_cast<ConnectionType>(aNetworkInfo.type());
  mIsWifi = aNetworkInfo.isWifi();
  mDHCPGateway = aNetworkInfo.dhcpGateway();
}
Exemplo n.º 2
0
void
Connection::UpdateFromNetworkInfo(const hal::NetworkInformation& aNetworkInfo)
{
  mBandwidth = aNetworkInfo.bandwidth();
  mCanBeMetered = aNetworkInfo.canBeMetered();
  mIsWifi = aNetworkInfo.isWifi();
  mDHCPGateway = aNetworkInfo.dhcpGateway();
}
Exemplo n.º 3
0
void
RequestSyncWifiService::Notify(const hal::NetworkInformation& aNetworkInfo)
{
  bool isWifi = aNetworkInfo.isWifi();
  if (isWifi == mIsWifi) {
    return;
  }

  mIsWifi = isWifi;

  nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
  if (obs) {
    obs->NotifyObservers(nullptr, "wifi-state-changed",
                         mIsWifi ? MOZ_UTF16("enabled") :
                                   MOZ_UTF16("disabled"));
  }
}
Exemplo n.º 4
0
void
Connection::UpdateFromNetworkInfo(const hal::NetworkInformation& aNetworkInfo)
{
  mBandwidth = aNetworkInfo.bandwidth();
  mCanBeMetered = aNetworkInfo.canBeMetered();
}