#ifndef EXTENSIONS_COMMON_API_SOCKETS_UDP_H__
#define EXTENSIONS_COMMON_API_SOCKETS_UDP_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 sockets_udp {
struct SocketProperties { … };
struct CreateInfo { … };
enum class DnsQueryType { … };
const char* ToString(DnsQueryType as_enum);
DnsQueryType ParseDnsQueryType(std::string_view as_string);
std::u16string GetDnsQueryTypeParseError(std::string_view as_string);
struct SendInfo { … };
struct SocketInfo { … };
struct ReceiveInfo { … };
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 Bind {
struct Params { … };
namespace Results {
base::Value::List Create(int result);
}
}
namespace Send {
struct Params { … };
namespace Results {
base::Value::List Create(const SendInfo& send_info);
}
}
namespace Close {
struct Params { … };
namespace Results {
base::Value::List Create();
}
}
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>& socket_infos);
}
}
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 SetBroadcast {
struct Params { … };
namespace Results {
base::Value::List Create(int 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