MPD: NeighborExplorer Class Reference

MPD 0.20.18

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
NeighborExplorer Class Referenceabstract

An object that explores the neighborhood for music servers. More...

`#include <Explorer.hxx>`

Collaboration diagram for NeighborExplorer:
[legend]

## Public Types
typedef std::forward_list< NeighborInfo > | List

## Public Member Functions
virtual | ~NeighborExplorer ()
| Free instance data. More...
virtual void | Open ()=0
| Start exploring the neighborhood. More...
virtual void | Close ()=0
| Stop exploring. More...
virtual List | GetList () const =0
| Obtain a list of currently known neighbors. More...

## Protected Member Functions
| NeighborExplorer (NeighborListener &_listener)

## Protected Attributes
NeighborListener & | listener

## Detailed Description

An object that explores the neighborhood for music servers.

As soon as this object is opened, it will start exploring, and notify the NeighborListener when it found or lost something.

The implementation is supposed to be non-blocking. This can be implemented either using the EventLoop instance that was passed to the NeighborPlugin or by moving the blocking parts in a dedicated thread.

Definition at line 39 of file Explorer.hxx.

## Member Typedef Documentation

## ◆ List

typedef std::forward_list<NeighborInfo> NeighborExplorer::List

Definition at line 47 of file Explorer.hxx.

## Constructor & Destructor Documentation

## ◆ NeighborExplorer()

NeighborExplorer::NeighborExplorer | ( | NeighborListener & | _listener | ) |
| inlineexplicitprotected

Definition at line 43 of file Explorer.hxx.

## ◆ ~NeighborExplorer()

virtual NeighborExplorer::~NeighborExplorer | ( |  | ) |
| inlinevirtual

Free instance data.

Definition at line 52 of file Explorer.hxx.

## Member Function Documentation

## ◆ Close()

virtual void NeighborExplorer::Close | ( |  | ) |
| pure virtual

Stop exploring.

## ◆ GetList()

virtual List NeighborExplorer::GetList | ( |  | ) | const
| pure virtual

Obtain a list of currently known neighbors.

## ◆ Open()

virtual void NeighborExplorer::Open | ( |  | ) |
| pure virtual

Start exploring the neighborhood.

Throws std::runtime_error on error.

## Field Documentation

## ◆ listener

NeighborListener& NeighborExplorer::listener
| protected

Definition at line 41 of file Explorer.hxx.

The documentation for this class was generated from the following file:

- neighbor/Explorer.hxx