chromium/device/bluetooth/floss/floss_gatt_manager_client.h

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef DEVICE_BLUETOOTH_FLOSS_FLOSS_GATT_MANAGER_CLIENT_H_
#define DEVICE_BLUETOOTH_FLOSS_FLOSS_GATT_MANAGER_CLIENT_H_

#include <string>

#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "device/bluetooth/bluetooth_export.h"
#include "device/bluetooth/floss/exported_callback_manager.h"
#include "device/bluetooth/floss/floss_dbus_client.h"
#include "device/bluetooth/public/cpp/bluetooth_uuid.h"

namespace floss {

// Authentication requirements for GATT.
enum class DEVICE_BLUETOOTH_EXPORT AuthRequired {};

enum class DEVICE_BLUETOOTH_EXPORT WriteType {};

enum class DEVICE_BLUETOOTH_EXPORT LeDiscoverableMode {};

enum class DEVICE_BLUETOOTH_EXPORT LePhy {};

// Status for many GATT apis. Due to complexity here, only kSuccess should be
// used for comparisons.
enum class DEVICE_BLUETOOTH_EXPORT GattStatus {};

// GATT WriteCharacteristic D-Bus method results.
enum class DEVICE_BLUETOOTH_EXPORT GattWriteRequestStatus {};

struct DEVICE_BLUETOOTH_EXPORT GattDescriptor {};

struct DEVICE_BLUETOOTH_EXPORT GattCharacteristic {};

struct DEVICE_BLUETOOTH_EXPORT GattService {};

// Callback functions expected to be imported by the GATT client.
//
// This also doubles as an observer class for the GATT client since it will
// really only filter out calls that aren't for this client.
class DEVICE_BLUETOOTH_EXPORT FlossGattClientObserver
    : public base::CheckedObserver {};

// Callback functions expected to be imported by the GATT server.
//
// This also doubles as an observer class for the GATT server.
class DEVICE_BLUETOOTH_EXPORT FlossGattServerObserver
    : public base::CheckedObserver {};

class DEVICE_BLUETOOTH_EXPORT FlossGattManagerClient
    : public FlossDBusClient,
      public FlossGattClientObserver,
      public FlossGattServerObserver {};

}  // namespace floss

#endif  // DEVICE_BLUETOOTH_FLOSS_FLOSS_GATT_MANAGER_CLIENT_H_