#ifndef EXTENSIONS_COMMON_API_SERIAL_H__
#define EXTENSIONS_COMMON_API_SERIAL_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 serial {
struct DeviceInfo { … };
enum class DataBits { … };
const char* ToString(DataBits as_enum);
DataBits ParseDataBits(std::string_view as_string);
std::u16string GetDataBitsParseError(std::string_view as_string);
enum class ParityBit { … };
const char* ToString(ParityBit as_enum);
ParityBit ParseParityBit(std::string_view as_string);
std::u16string GetParityBitParseError(std::string_view as_string);
enum class StopBits { … };
const char* ToString(StopBits as_enum);
StopBits ParseStopBits(std::string_view as_string);
std::u16string GetStopBitsParseError(std::string_view as_string);
struct ConnectionOptions { … };
struct ConnectionInfo { … };
enum class SendError { … };
const char* ToString(SendError as_enum);
SendError ParseSendError(std::string_view as_string);
std::u16string GetSendErrorParseError(std::string_view as_string);
struct SendInfo { … };
struct HostControlSignals { … };
struct DeviceControlSignals { … };
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 GetDevices {
namespace Results {
base::Value::List Create(const std::vector<DeviceInfo>& ports);
}
}
namespace Connect {
struct Params { … };
namespace Results {
base::Value::List Create(const ConnectionInfo& connection_info);
}
}
namespace Update {
struct Params { … };
namespace Results {
base::Value::List Create(bool result);
}
}
namespace Disconnect {
struct Params { … };
namespace Results {
base::Value::List Create(bool result);
}
}
namespace SetPaused {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
namespace GetInfo {
struct Params { … };
namespace Results {
base::Value::List Create(const ConnectionInfo& connection_info);
}
}
namespace GetConnections {
namespace Results {
base::Value::List Create(const std::vector<ConnectionInfo>& connection_infos);
}
}
namespace Send {
struct Params { … };
namespace Results {
base::Value::List Create(const SendInfo& send_info);
}
}
namespace Flush {
struct Params { … };
namespace Results {
base::Value::List Create(bool result);
}
}
namespace GetControlSignals {
struct Params { … };
namespace Results {
base::Value::List Create(const DeviceControlSignals& signals);
}
}
namespace SetControlSignals {
struct Params { … };
namespace Results {
base::Value::List Create(bool result);
}
}
namespace SetBreak {
struct Params { … };
namespace Results {
base::Value::List Create(bool result);
}
}
namespace ClearBreak {
struct Params { … };
namespace Results {
base::Value::List Create(bool result);
}
}
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