#ifndef EXTENSIONS_COMMON_API_SOCKET_H__
#define EXTENSIONS_COMMON_API_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 socket {
enum class SocketType { … };
const char* ToString(SocketType as_enum);
SocketType ParseSocketType(std::string_view as_string);
std::u16string GetSocketTypeParseError(std::string_view as_string);
struct CreateOptions { … };
struct CreateInfo { … };
struct AcceptInfo { … };
struct ReadInfo { … };
struct WriteInfo { … };
struct RecvFromInfo { … };
struct SocketInfo { … };
struct NetworkInterface { … };
struct TLSVersionConstraints { … };
struct SecureOptions { … };
namespace Create {
struct Params { … };
namespace Results {
base::Value::List Create(const CreateInfo& create_info);
}
}
namespace Destroy {
struct Params { … };
}
namespace Connect {
struct Params { … };
namespace Results {
base::Value::List Create(int result);
}
}
namespace Bind {
struct Params { … };
namespace Results {
base::Value::List Create(int result);
}
}
namespace Disconnect {
struct Params { … };
}
namespace Read {
struct Params { … };
namespace Results {
base::Value::List Create(const ReadInfo& read_info);
}
}
namespace Write {
struct Params { … };
namespace Results {
base::Value::List Create(const WriteInfo& write_info);
}
}
namespace RecvFrom {
struct Params { … };
namespace Results {
base::Value::List Create(const RecvFromInfo& recv_from_info);
}
}
namespace SendTo {
struct Params { … };
namespace Results {
base::Value::List Create(const WriteInfo& write_info);
}
}
namespace Listen {
struct Params { … };
namespace Results {
base::Value::List Create(int result);
}
}
namespace Accept {
struct Params { … };
namespace Results {
base::Value::List Create(const AcceptInfo& accept_info);
}
}
namespace SetKeepAlive {
struct Params { … };
namespace Results {
base::Value::List Create(bool result);
}
}
namespace SetNoDelay {
struct Params { … };
namespace Results {
base::Value::List Create(bool result);
}
}
namespace GetInfo {
struct Params { … };
namespace Results {
base::Value::List Create(const SocketInfo& result);
}
}
namespace GetNetworkList {
namespace Results {
base::Value::List Create(const std::vector<NetworkInterface>& result);
}
}
namespace JoinGroup {
struct Params { … };
namespace Results {
base::Value::List Create(int result);
}
}
namespace LeaveGroup {
struct Params { … };
namespace Results {
base::Value::List Create(int result);
}
}
namespace SetMulticastTimeToLive {
struct Params { … };
namespace Results {
base::Value::List Create(int result);
}
}
namespace SetMulticastLoopbackMode {
struct Params { … };
namespace Results {
base::Value::List Create(int result);
}
}
namespace GetJoinedGroups {
struct Params { … };
namespace Results {
base::Value::List Create(const std::vector<std::string>& groups);
}
}
namespace Secure {
struct Params { … };
namespace Results {
base::Value::List Create(int result);
}
}
}
}
}
#endif