diff options
author | Max Kellermann <max@duempel.org> | 2014-01-18 16:36:42 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-26 00:10:05 +0100 |
commit | 5c4a42caa088335868342b25a834962cbc0d08a2 (patch) | |
tree | 388c039572317877f798e0f0c25d9e3c04ddcae3 /src/CommandLine.cxx | |
parent | e847788569bd91ca136160694a49665097c0e8ab (diff) | |
download | mpd-5c4a42caa088335868342b25a834962cbc0d08a2.tar.gz mpd-5c4a42caa088335868342b25a834962cbc0d08a2.tar.xz mpd-5c4a42caa088335868342b25a834962cbc0d08a2.zip |
neighbor: new subsystem to detect file servers on the local network
This commit adds the NeighborPlugin API which can be used to detect
nearby file servers that can be used by input plugins. This list of
servers is exported using the new "listneighbors" command. The idle
even "neighbor" notifies interested clients when a new neighbor is
found or an existing one is lost.
There's a lot missing currently: protocol&user documentation, and a
way to "mount" remote servers into the music database. Obviously,
some code from the UPnP database plugin can be moved to a neighbor
plugin.
Diffstat (limited to 'src/CommandLine.cxx')
-rw-r--r-- | src/CommandLine.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/CommandLine.cxx b/src/CommandLine.cxx index c5adc4153..19bc9d4bb 100644 --- a/src/CommandLine.cxx +++ b/src/CommandLine.cxx @@ -42,6 +42,11 @@ #include "util/OptionDef.hxx" #include "util/OptionParser.hxx" +#ifdef ENABLE_NEIGHBOR_PLUGINS +#include "neighbor/Registry.hxx" +#include "neighbor/NeighborPlugin.hxx" +#endif + #ifdef ENABLE_ENCODER #include "encoder/EncoderList.hxx" #include "encoder/EncoderPlugin.hxx" @@ -104,6 +109,13 @@ static void version(void) for (auto i = database_plugins; *i != nullptr; ++i) printf(" %s", (*i)->name); +#ifdef ENABLE_NEIGHBOR_PLUGINS + puts("\n\n" + "Neighbor plugins:"); + for (auto i = neighbor_plugins; *i != nullptr; ++i) + printf(" %s", (*i)->name); +#endif + puts("\n\n" "Decoders plugins:"); @@ -148,7 +160,7 @@ static void version(void) #endif puts("\n" - "input/Input plugins:"); + "Input plugins:"); input_plugins_for_each(plugin) printf(" %s", plugin->name); |