[docs] Build with JavaDoc 17 and add missing docs (#6220)

Co-authored-by: Sam Carlberg <sam.carlberg@gmail.com>
This commit is contained in:
Tyler Veness
2024-01-19 23:42:09 -08:00
committed by GitHub
parent 9ec27c1202
commit 77c09b9ce2
54 changed files with 3527 additions and 26 deletions

View File

@@ -15,17 +15,51 @@
namespace wpi {
class MulticastServiceAnnouncer {
public:
/**
* Creates a MulticastServiceAnnouncer.
*
* @param serviceName service name
* @param serviceType service type
* @param port port
* @param txt txt
*/
MulticastServiceAnnouncer(
std::string_view serviceName, std::string_view serviceType, int port,
std::span<const std::pair<std::string, std::string>> txt);
/**
* Creates a MulticastServiceAnnouncer.
*
* @param serviceName service name
* @param serviceType service type
* @param port port
* @param txt txt
*/
MulticastServiceAnnouncer(
std::string_view serviceName, std::string_view serviceType, int port,
std::span<const std::pair<std::string_view, std::string_view>> txt);
/**
* Creates a MulticastServiceAnnouncer.
*
* @param serviceName service name
* @param serviceType service type
* @param port port
*/
MulticastServiceAnnouncer(std::string_view serviceName,
std::string_view serviceType, int port);
~MulticastServiceAnnouncer() noexcept;
/**
* Starts multicast service announcer.
*/
void Start();
/**
* Stops multicast service announcer.
*/
void Stop();
/**
* Returns true if there's a multicast service announcer implementation.
*
* @return True if there's a multicast service announcer implementation.
*/
bool HasImplementation() const;
struct Impl;

View File

@@ -21,15 +21,36 @@ class MulticastServiceResolver {
explicit MulticastServiceResolver(std::string_view serviceType);
~MulticastServiceResolver() noexcept;
struct ServiceData {
/// IPv4 address.
unsigned int ipv4Address;
/// Port number.
int port;
/// Service name.
std::string serviceName;
/// Host name.
std::string hostName;
/// Service data payload.
std::vector<std::pair<std::string, std::string>> txt;
};
/**
* Starts multicast service resolver.
*/
void Start();
/**
* Stops multicast service resolver.
*/
void Stop();
/**
* Returns event handle.
*
* @return Event handle.
*/
WPI_EventHandle GetEventHandle() const { return event.GetHandle(); }
/**
* Returns multicast service resolver data.
*
* @return Multicast service resolver data.
*/
std::vector<ServiceData> GetData() {
std::scoped_lock lock{mutex};
event.Reset();
@@ -40,6 +61,11 @@ class MulticastServiceResolver {
queue.swap(ret);
return ret;
}
/**
* Returns true if there's a multicast service resolver implementation.
*
* @return True if there's a multicast service resolver implementation.
*/
bool HasImplementation() const;
struct Impl;
@@ -55,6 +81,9 @@ class MulticastServiceResolver {
std::unique_ptr<Impl> pImpl;
};
} // namespace wpi
#endif
#ifdef __cplusplus
extern "C" {
#endif