#ifndef EXTENSIONS_COMMON_API_BLUETOOTH_SOCKET_H__
#define EXTENSIONS_COMMON_API_BLUETOOTH_SOCKET_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_socket {
struct SocketProperties { … };
struct CreateInfo { … };
struct ListenOptions { … };
struct SocketInfo { … };
struct AcceptInfo { … };
enum class AcceptError { … };
const char* ToString(AcceptError as_enum);
AcceptError ParseAcceptError(std::string_view as_string);
std::u16string GetAcceptErrorParseError(std::string_view as_string);
struct AcceptErrorInfo { … };
struct ReceiveInfo { … };
enum class ReceiveError { … };
const char* ToString(ReceiveError as_enum);
ReceiveError ParseReceiveError(std::string_view as_string);
std::u16string GetReceiveErrorParseError(std::string_view as_string);
struct ReceiveErrorInfo { … };
namespace Create {
struct Params { … };
namespace Results {
base::Value::List Create(const CreateInfo& create_info);
}
}
namespace Update {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace SetPaused {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace ListenUsingRfcomm {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace ListenUsingL2cap {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace Connect {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace Disconnect {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace Close {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace Send {
struct Params { … };
namespace Results {
base::Value::List Create(int bytes_sent);
}
}
namespace GetInfo {
struct Params { … };
namespace Results {
base::Value::List Create(const SocketInfo& socket_info);
}
}
namespace GetSockets {
namespace Results {
base::Value::List Create(const std::vector<SocketInfo>& sockets);
}
}
namespace OnAccept {
extern const char kEventName[];
base::Value::List Create(const AcceptInfo& info);
}
namespace OnAcceptError {
extern const char kEventName[];
base::Value::List Create(const AcceptErrorInfo& info);
}
namespace OnReceive {
extern const char kEventName[];
base::Value::List Create(const ReceiveInfo& info);
}
namespace OnReceiveError {
extern const char kEventName[];
base::Value::List Create(const ReceiveErrorInfo& info);
}
}
}
}
#endif