#include <bonjour_publisher.h>
Public Member Functions | |
| BonjourPublisher ()=default | |
| ~BonjourPublisher () | |
| void | Publish (int port, const std::string &rom_title="") |
| Start advertising. Call after the HTTP server socket is bound. | |
| void | Unpublish () |
| Stop advertising. Safe to call multiple times. | |
| bool | IsPublished () const |
| bool | IsAvailable () const |
Private Attributes | |
| bool | published_ = false |
Publishes a _yaze._tcp. Bonjour service so iOS clients on the LAN can discover this desktop instance automatically.
Definition at line 16 of file bonjour_publisher.h.
|
default |
| yaze::cli::api::BonjourPublisher::~BonjourPublisher | ( | ) |
Definition at line 13 of file bonjour_publisher.cc.
References Unpublish().

| void yaze::cli::api::BonjourPublisher::Publish | ( | int | port, |
| const std::string & | rom_title = "" ) |
Start advertising. Call after the HTTP server socket is bound.
Definition at line 17 of file bonjour_publisher.cc.
References LOG_ERROR, LOG_INFO, and published_.
Referenced by yaze::cli::api::HttpServer::Start().
| void yaze::cli::api::BonjourPublisher::Unpublish | ( | ) |
Stop advertising. Safe to call multiple times.
Definition at line 66 of file bonjour_publisher.cc.
References LOG_INFO, and published_.
Referenced by yaze::cli::api::HttpServer::Stop(), and ~BonjourPublisher().
|
inline |
Definition at line 27 of file bonjour_publisher.h.
References published_.
Referenced by yaze::cli::api::HttpServer::Start().
|
inline |
Returns true on macOS where Bonjour (dns_sd) is natively available, false on all other platforms.
Definition at line 31 of file bonjour_publisher.h.
Referenced by yaze::cli::api::HandleHealth(), and yaze::cli::api::HttpServer::Start().
|
private |
Definition at line 40 of file bonjour_publisher.h.
Referenced by IsPublished(), Publish(), and Unpublish().