#include "osp/impl/service_listener_impl.h"
#include <algorithm>
#include <utility>
#include "platform/base/error.h"
#include "util/osp_logging.h"
#include "util/std_util.h"
namespace openscreen::osp {
namespace {
bool IsTransitionValid(ServiceListener::State from, ServiceListener::State to) { … }
}
ServiceListenerImpl::Delegate::Delegate() = default;
ServiceListenerImpl::Delegate::~Delegate() = default;
void ServiceListenerImpl::Delegate::SetListenerImpl(
ServiceListenerImpl* listener) { … }
ServiceListenerImpl::ServiceListenerImpl(std::unique_ptr<Delegate> delegate)
: … { … }
ServiceListenerImpl::~ServiceListenerImpl() = default;
void ServiceListenerImpl::OnReceiverUpdated(
const std::vector<ServiceInfo>& new_receivers) { … }
void ServiceListenerImpl::OnReceiverAdded(const ServiceInfo& info) { … }
void ServiceListenerImpl::OnReceiverChanged(const ServiceInfo& info) { … }
void ServiceListenerImpl::OnReceiverRemoved(const ServiceInfo& info) { … }
void ServiceListenerImpl::OnAllReceiversRemoved() { … }
void ServiceListenerImpl::OnError(const Error& error) { … }
bool ServiceListenerImpl::Start() { … }
bool ServiceListenerImpl::StartAndSuspend() { … }
bool ServiceListenerImpl::Stop() { … }
bool ServiceListenerImpl::Suspend() { … }
bool ServiceListenerImpl::Resume() { … }
bool ServiceListenerImpl::SearchNow() { … }
void ServiceListenerImpl::AddObserver(Observer& observer) { … }
void ServiceListenerImpl::RemoveObserver(Observer& observer) { … }
const std::vector<ServiceInfo>& ServiceListenerImpl::GetReceivers() const { … }
void ServiceListenerImpl::OnFatalError(const Error& error) { … }
void ServiceListenerImpl::OnRecoverableError(const Error& error) { … }
void ServiceListenerImpl::SetState(State state) { … }
void ServiceListenerImpl::MaybeNotifyObservers() { … }
}