#include "device/bluetooth/floss/bluetooth_advertisement_floss.h"
#include <iomanip>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/logging.h"
#include "base/observer_list.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "components/device_event_log/device_event_log.h"
#include "device/bluetooth/dbus/bluetooth_le_advertising_manager_client.h"
#include "device/bluetooth/floss/bluetooth_adapter_floss.h"
#include "device/bluetooth/floss/floss_dbus_manager.h"
namespace floss {
namespace {
constexpr FlossAdvertiserClient::AdvertiserId kInvalidAdvId = …;
constexpr uint8_t kServiceData16BitUuid = …;
constexpr int8_t kTxPowerNoPreference = …;
constexpr int32_t kUnlimitedDuration = …;
constexpr int32_t kUnlimitedAdvEvents = …;
void UnregisterFailure(device::BluetoothAdvertisement::ErrorCode error) { … }
}
BluetoothAdvertisementFloss::BluetoothAdvertisementFloss(
std::unique_ptr<device::BluetoothAdvertisement::Data> data,
const uint16_t interval_ms,
scoped_refptr<BluetoothAdapterFloss> adapter) { … }
BluetoothAdvertisementFloss::~BluetoothAdvertisementFloss() { … }
void BluetoothAdvertisementFloss::Unregister(SuccessCallback success_callback,
ErrorCallback error_callback) { … }
void BluetoothAdvertisementFloss::Start(
SuccessCallback success_callback,
device::BluetoothAdapter::AdvertisementErrorCallback error_callback) { … }
void BluetoothAdvertisementFloss::Stop(SuccessCallback success_callback,
ErrorCallback error_callback) { … }
void BluetoothAdvertisementFloss::SetAdvertisingInterval(
const uint16_t interval_ms,
SuccessCallback success_callback,
device::BluetoothAdapter::AdvertisementErrorCallback error_callback) { … }
void BluetoothAdvertisementFloss::OnStartSuccess(
SuccessCallback success_callback,
FlossAdvertiserClient::AdvertiserId adv_id) { … }
void BluetoothAdvertisementFloss::OnStopSuccess(
SuccessCallback success_callback) { … }
void BluetoothAdvertisementFloss::OnSetAdvertisingIntervalSuccess(
SuccessCallback success_callback) { … }
}