#ifndef EXTENSIONS_COMMON_API_BLUETOOTH_LOW_ENERGY_H__
#define EXTENSIONS_COMMON_API_BLUETOOTH_LOW_ENERGY_H__
#include <stdint.h>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include "base/values.h"
#include <string_view>
namespace extensions {
namespace api {
namespace bluetooth_low_energy {
enum class CharacteristicProperty { … };
const char* ToString(CharacteristicProperty as_enum);
CharacteristicProperty ParseCharacteristicProperty(std::string_view as_string);
std::u16string GetCharacteristicPropertyParseError(std::string_view as_string);
enum class DescriptorPermission { … };
const char* ToString(DescriptorPermission as_enum);
DescriptorPermission ParseDescriptorPermission(std::string_view as_string);
std::u16string GetDescriptorPermissionParseError(std::string_view as_string);
enum class AdvertisementType { … };
const char* ToString(AdvertisementType as_enum);
AdvertisementType ParseAdvertisementType(std::string_view as_string);
std::u16string GetAdvertisementTypeParseError(std::string_view as_string);
struct Device { … };
struct Service { … };
struct Characteristic { … };
struct Descriptor { … };
struct ConnectProperties { … };
struct NotificationProperties { … };
struct ManufacturerData { … };
struct ServiceData { … };
struct Advertisement { … };
struct Request { … };
struct Response { … };
struct Notification { … };
namespace Connect {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace Disconnect {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace GetService {
struct Params { … };
namespace Results {
base::Value::List Create(const Service& result);
}
}
namespace CreateService {
struct Params { … };
namespace Results {
base::Value::List Create(const std::string& service_id);
}
}
namespace GetServices {
struct Params { … };
namespace Results {
base::Value::List Create(const std::vector<Service>& result);
}
}
namespace GetCharacteristic {
struct Params { … };
namespace Results {
base::Value::List Create(const Characteristic& result);
}
}
namespace CreateCharacteristic {
struct Params { … };
namespace Results {
base::Value::List Create(const std::string& characteristic_id);
}
}
namespace GetCharacteristics {
struct Params { … };
namespace Results {
base::Value::List Create(const std::vector<Characteristic>& result);
}
}
namespace GetIncludedServices {
struct Params { … };
namespace Results {
base::Value::List Create(const std::vector<Service>& result);
}
}
namespace GetDescriptor {
struct Params { … };
namespace Results {
base::Value::List Create(const Descriptor& result);
}
}
namespace CreateDescriptor {
struct Params { … };
namespace Results {
base::Value::List Create(const std::string& descriptor_id);
}
}
namespace GetDescriptors {
struct Params { … };
namespace Results {
base::Value::List Create(const std::vector<Descriptor>& result);
}
}
namespace ReadCharacteristicValue {
struct Params { … };
namespace Results {
base::Value::List Create(const Characteristic& result);
}
}
namespace WriteCharacteristicValue {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace StartCharacteristicNotifications {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace StopCharacteristicNotifications {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace NotifyCharacteristicValueChanged {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace ReadDescriptorValue {
struct Params { … };
namespace Results {
base::Value::List Create(const Descriptor& result);
}
}
namespace WriteDescriptorValue {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace RegisterService {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace UnregisterService {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace RemoveService {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace RegisterAdvertisement {
struct Params { … };
namespace Results {
base::Value::List Create(int advertisement_id);
}
}
namespace UnregisterAdvertisement {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace ResetAdvertising {
namespace Results {
base::Value::List Create();
}
}
namespace SetAdvertisingInterval {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace SendRequestResponse {
struct Params { … };
}
namespace OnServiceAdded {
extern const char kEventName[];
base::Value::List Create(const Service& service);
}
namespace OnServiceChanged {
extern const char kEventName[];
base::Value::List Create(const Service& service);
}
namespace OnServiceRemoved {
extern const char kEventName[];
base::Value::List Create(const Service& service);
}
namespace OnCharacteristicValueChanged {
extern const char kEventName[];
base::Value::List Create(const Characteristic& characteristic);
}
namespace OnDescriptorValueChanged {
extern const char kEventName[];
base::Value::List Create(const Descriptor& descriptor);
}
namespace OnCharacteristicReadRequest {
extern const char kEventName[];
base::Value::List Create(const Request& request, const std::string& characteristic_id);
}
namespace OnCharacteristicWriteRequest {
extern const char kEventName[];
base::Value::List Create(const Request& request, const std::string& characteristic_id);
}
namespace OnDescriptorReadRequest {
extern const char kEventName[];
base::Value::List Create(const Request& request, const std::string& descriptor_id);
}
namespace OnDescriptorWriteRequest {
extern const char kEventName[];
base::Value::List Create(const Request& request, const std::string& descriptor_id);
}
}
}
}
#endif