#include "device/bluetooth/floss/bluetooth_gatt_service_floss.h"
#include "base/containers/contains.h"
#include "device/bluetooth/floss/floss_dbus_manager.h"
#include "device/bluetooth/floss/floss_gatt_manager_client.h"
namespace floss {
GattErrorCode;
constexpr std::pair<GattStatus, device::BluetoothGattService::GattErrorCode>
kGattStatusMap[] = …;
BluetoothGattServiceFloss::BluetoothGattServiceFloss(
BluetoothAdapterFloss* adapter)
: … { … }
BluetoothGattServiceFloss::~BluetoothGattServiceFloss() { … }
BluetoothAdapterFloss* BluetoothGattServiceFloss::GetAdapter() const { … }
device::BluetoothGattService::GattErrorCode
BluetoothGattServiceFloss::GattStatusToServiceError(const GattStatus status) { … }
GattStatus BluetoothGattServiceFloss::GattServiceErrorToStatus(
device::BluetoothGattService::GattErrorCode error_code) { … }
void BluetoothGattServiceFloss::AddObserverForHandle(
int32_t handle,
FlossGattClientObserver* observer) { … }
void BluetoothGattServiceFloss::AddServerObserverForHandle(
int32_t handle,
FlossGattServerObserver* observer) { … }
void BluetoothGattServiceFloss::RemoveObserverForHandle(int32_t handle) { … }
void BluetoothGattServiceFloss::RemoveServerObserverForHandle(int32_t handle) { … }
void BluetoothGattServiceFloss::GattCharacteristicRead(
std::string address,
GattStatus status,
int32_t handle,
const std::vector<uint8_t>& data) { … }
void BluetoothGattServiceFloss::GattCharacteristicWrite(std::string address,
GattStatus status,
int32_t handle) { … }
void BluetoothGattServiceFloss::GattDescriptorRead(
std::string address,
GattStatus status,
int32_t handle,
const std::vector<uint8_t>& data) { … }
void BluetoothGattServiceFloss::GattDescriptorWrite(std::string address,
GattStatus status,
int32_t handle) { … }
void BluetoothGattServiceFloss::GattNotify(std::string address,
int32_t handle,
const std::vector<uint8_t>& data) { … }
void BluetoothGattServiceFloss::GattServerCharacteristicReadRequest(
std::string address,
int32_t request_id,
int32_t offset,
bool is_long,
int32_t handle) { … }
void BluetoothGattServiceFloss::GattServerDescriptorReadRequest(
std::string address,
int32_t request_id,
int32_t offset,
bool is_long,
int32_t handle) { … }
void BluetoothGattServiceFloss::GattServerCharacteristicWriteRequest(
std::string address,
int32_t request_id,
int32_t offset,
int32_t length,
bool is_prepared_write,
bool needs_response,
int32_t handle,
std::vector<uint8_t> value) { … }
void BluetoothGattServiceFloss::GattServerDescriptorWriteRequest(
std::string address,
int32_t request_id,
int32_t offset,
int32_t length,
bool is_prepared_write,
bool needs_response,
int32_t handle,
std::vector<uint8_t> value) { … }
void BluetoothGattServiceFloss::GattServerExecuteWrite(std::string address,
int32_t request_id,
bool execute_write) { … }
}