Commit Graph

7429 Commits

Author SHA1 Message Date
Max Kellermann
5e1e92626c event/SignalMonitor: unblock signals after fork
Fixes hanging child process in the "pipe" output plugin.
2014-02-18 19:13:50 +01:00
Max Kellermann
a0c25941a8 Thread/Util: use __NR_ioprio_set instead of SYS_ioprio_set
Bionic doesn't have the SYS_* macros.
2014-02-18 10:44:18 +01:00
Max Kellermann
5eb468bce0 Thread/Util: make SCHED_RESET_ON_FORK optional
Use it if it exists, but don't insist if the C library is poor
(e.g. Bionic/Android).
2014-02-18 10:43:24 +01:00
Max Kellermann
9b7f492c65 thread/Posix{Mutex,Cond}: disable "constexpr" on Android
Bionic's pthread declarations are non-literal.
2014-02-18 09:54:35 +01:00
Max Kellermann
6eda79d02d system/EPollFD: add epoll_create1() fallback for Android 2014-02-18 09:54:35 +01:00
Max Kellermann
e10a8d95f6 PlaylistRegistry: disable the "pls" plugin without GLib 2014-02-18 09:18:42 +01:00
Max Kellermann
97f2be348c LogInit: disable SetLogCharset() without GLib 2014-02-18 09:18:42 +01:00
Max Kellermann
2b21312b36 util/StringUtil: add StringEndsWith()
Replaces g_str_has_suffix().
2014-02-18 09:18:42 +01:00
Max Kellermann
3a818b6d45 SongFilter: disable g_utf8_casefold() without GLib
Temporary hack for the experimental no-GLib build.
2014-02-18 09:18:42 +01:00
Max Kellermann
1709ab6810 fs/TextFile: use custom allocation instead of GString 2014-02-17 23:04:10 +01:00
Max Kellermann
ce925ba56f fs/Charset: disable if GLib is disabled 2014-02-17 22:48:26 +01:00
Max Kellermann
4ad14f6a2c TagId3: use xstrdup() instead of g_strdup() 2014-02-17 22:42:54 +01:00
Max Kellermann
579e48edbb util/StringUtil: add function Strip()
Replaces g_strstrip().
2014-02-17 22:37:43 +01:00
Max Kellermann
6a08f2281a TagString: disable UTF-8 validation if GLib is disabled 2014-02-17 22:33:10 +01:00
Max Kellermann
91729437a0 Main: initialize Database before Storage 2014-02-17 22:14:00 +01:00
Max Kellermann
3af7af0b8f Main: move code to InitDatabaseAndStorage() 2014-02-17 22:13:53 +01:00
Max Kellermann
1ddd00433e db/Configured: disallow both "db_file" and "database"
This is misconfiguration, and MPD should abort.
2014-02-17 22:13:53 +01:00
Max Kellermann
de160bb2d1 Main: move code to db/Configured.cxx 2014-02-17 22:13:53 +01:00
Max Kellermann
ff62b6742b Main: check if database exists before attempting to close it
Fixes nullptr dereference.
2014-02-17 22:13:53 +01:00
Max Kellermann
6da0af94df db/DatabaseSimple: remove obsolete header 2014-02-17 20:44:03 +01:00
Max Kellermann
df9667a497 StorageCommands: add command "unmount" 2014-02-12 23:48:08 +01:00
Max Kellermann
e3e2ad4ae5 CompositeStorage: fix tree walk in Directory::Unmount() 2014-02-12 23:48:08 +01:00
Max Kellermann
ace4ba3171 StorageCommands: emit IDLE_MOUNT on successful "mount"
Add the new idle event to Idle.hxx/Idle.cxx.
2014-02-12 23:06:47 +01:00
Max Kellermann
0935ae330a StorageCommands: add command "listmounts" 2014-02-12 21:47:59 +01:00
Max Kellermann
d05ae4b444 util/HugeAllocator: relicense to BSD-2 2014-02-10 13:32:50 +01:00
Max Kellermann
73b0610d89 PlaylistSong: copy the "real" URI
Playback with some decoder plugins was broken because the Queue's
DetachedSong instances did not have the "real" URI (the mapped path).
2014-02-10 11:00:49 +01:00
Max Kellermann
73aec9ce63 StorageCommands: expose the "mount" command 2014-02-09 11:07:08 +01:00
Max Kellermann
a9fefcf600 Main: wrap the Storage instance in CompositeStorage 2014-02-09 11:07:08 +01:00
Max Kellermann
59ce67e2e5 CompositeStorage: new Storage implementation
This is the backend for the upcoming "mount" command.
2014-02-09 10:47:29 +01:00
Max Kellermann
2182209a8a db/update/Walk: disable FindAncestorLoop() if device/inode==0 2014-02-09 10:47:29 +01:00
Max Kellermann
e29a8b3a9c db/update/Walk: document FindAncestorLoop() 2014-02-09 10:46:39 +01:00
Max Kellermann
ace3f37af4 db/update/Walk: rename find_inode_ancestor() to FindAncestorLoop() 2014-02-09 10:46:39 +01:00
Max Kellermann
37b6899660 Main: move code to storage/Configured.cxx 2014-02-09 08:09:47 +01:00
Max Kellermann
570b12ec13 Idle: error out when unrecognized idle event was specified
Implements the error checks missing in commit 0bad8406
2014-02-09 08:07:48 +01:00
Max Kellermann
ac286ef734 OtherCommands: remove unnecessary nullptr check 2014-02-09 08:07:43 +01:00
Max Kellermann
b3663b5da2 storage/nfs: new storage plugin 2014-02-08 14:24:47 +01:00
Max Kellermann
d761d8b168 input/nfs: move nfs_domain to lib/nfs/Domain.cxx 2014-02-08 14:24:47 +01:00
Max Kellermann
fe7c6fee34 ArchivePlugin: pass Path to open() 2014-02-08 13:25:44 +01:00
Max Kellermann
9906daeca7 ArchivePlugin: rename struct archive_plugin to ArchivePlugin 2014-02-08 13:22:13 +01:00
Max Kellermann
3fdc678aae Main: support arbitrary storage plugins 2014-02-08 00:04:29 +01:00
Max Kellermann
a0088ccce1 storage: add struct StoragePlugin and a plugin registry 2014-02-07 23:46:15 +01:00
Max Kellermann
be081929f4 storage/local: remove utf8 path from constructor
Build the UTF-8 version of the path automatically in the constructor.
2014-02-07 23:41:06 +01:00
Max Kellermann
b0b086d473 Main: move storage initialization to InitStorage() 2014-02-07 23:37:39 +01:00
Max Kellermann
6798af52b6 Mapper: obtain music directory from Storage
Eliminate duplicate variable.
2014-02-07 23:34:29 +01:00
Max Kellermann
4d5ebafa6d Main: check the music directory
Move call from Mapper.cxx.
2014-02-07 23:29:20 +01:00
Max Kellermann
ec8873b178 Mapper: move check_directory() to the filesystem library 2014-02-07 23:25:47 +01:00
Max Kellermann
c45f205593 Main: chop separators from music directory
Move call from Mapper.cxx.
2014-02-07 23:13:24 +01:00
Max Kellermann
027b2063ba Mapper: remove unused functions 2014-02-07 23:03:25 +01:00
Max Kellermann
b531c4c2fe OtherCommands: use Storage::MapUTF8() instead of Mapper.cxx 2014-02-07 22:58:21 +01:00
Max Kellermann
4b010df99e Main: create Storage instance in glue_mapper_init()
Don't use the obsolete Mapper library to create it.
2014-02-07 22:54:18 +01:00
Max Kellermann
5e4dd4be9c Main: allow playlist directory without music directory 2014-02-07 22:39:17 +01:00
Max Kellermann
f947274626 InotifyUpdate: use class Storage instead of Mapper.cxx 2014-02-07 22:30:40 +01:00
Max Kellermann
f6939f71a7 InotifyUpdate: use the root name instead of mapper_get_music_directory_fs()
The root WatchDirectory instance already contains the music directory,
and we don't need to fetch it again.
2014-02-07 22:30:01 +01:00
Max Kellermann
25aa17ad89 InotifyUpdate: move functions into the WatchDirectory class 2014-02-07 22:24:26 +01:00
Max Kellermann
05ee057db5 InotifyUpdate: remove unnecessary #ifdefs 2014-02-07 22:17:27 +01:00
Max Kellermann
297e2747f3 PlaylistMapper: use class Storage instead of Mapper.cxx 2014-02-07 21:44:50 +01:00
Max Kellermann
77de233117 Playlist{Any,Registry,Mapper}: move functions to PlaylistStream.cxx 2014-02-07 21:30:49 +01:00
Max Kellermann
02b67edaf5 PlaylistSong: include cleanup 2014-02-07 21:30:03 +01:00
Max Kellermann
8549ccfd8c playlist/CloseSongEnumerator: new wrapper class
Simplifies a lot of code, because we don't need to return both the
SongEnumerator and the InputStream.
2014-02-07 20:27:24 +01:00
Max Kellermann
ffd16b55a6 StoragePlugin: add method MapToRelativeUTF8()
Replaces map_to_relative_path() from Mapper.cxx.
2014-02-07 19:09:28 +01:00
Max Kellermann
d744c997d8 fs/Traits: add function Relative()
Move code from Path::RelativeFS() and make it generic.
2014-02-07 19:08:51 +01:00
Max Kellermann
6b421cc354 DecoderPlugin: pass Path instance to file_decode() and scan_file() 2014-02-07 18:52:19 +01:00
Max Kellermann
37ec29b225 Mapper: remove unused function map_song_fs() 2014-02-07 18:51:19 +01:00
Max Kellermann
ca7f6a26b5 DecoderThread: use only DetachedSong::GetRealURI()
Don't use the mapper - all DetachedSong instances we get have already
been mapped.
2014-02-07 18:50:07 +01:00
Max Kellermann
9b69d22d7e DecoderThread: pass Path object around for local song files 2014-02-07 18:45:11 +01:00
Max Kellermann
4ab4cf8532 SongUpdate: pass Storage to UpdateFileInArchive() 2014-02-07 18:44:47 +01:00
Max Kellermann
3341b282b7 PlaylistSave: use DetachedSong::GetRealURI() in playlist_print_song()
The DetachedSong instance already knows its own absolute path, and
there is no need to ask the mapper again.
2014-02-07 18:42:16 +01:00
Max Kellermann
bb3b836dbb FileCommands: support remove database files 2014-02-07 18:41:42 +01:00
Max Kellermann
1873c67540 FileCommands: use Storage::MapFS() instead of map_uri_fs() 2014-02-07 18:38:10 +01:00
Max Kellermann
8fd8f23a6b FileCommands: move code to read_file_comments() 2014-02-07 18:33:43 +01:00
geneticdrift
f225051348 fixed possible format_context not closed in ffmpeg_decode 2014-02-07 12:07:43 +01:00
Max Kellermann
b2e3fdef0f storage/local: hide the class declarations
Hide inside CreateLocalStorage().
2014-02-07 01:11:52 +01:00
Max Kellermann
c13810ebaa Mapper: move map_song_detach() to db/DatabaseSong.cxx
Use Storage::MapUTF8() internally, don't use global variables.
2014-02-07 00:42:14 +01:00
Max Kellermann
19a982cf69 Mapper: convert IsInDatabase() check to assertion in map_song_detach() 2014-02-07 00:42:14 +01:00
Max Kellermann
327cbf48f5 pcm/FallbackResampler: add missing ConstBuffer<T>::ToVoid() call 2014-02-06 23:48:01 +01:00
geneticdrift
0f1f509be7 fixed leaked LocalDirectoryReader *const reader in UpdateWalk::UpdateDirectory 2014-02-06 23:08:24 +01:00
Max Kellermann
c8f0c7e9ed */smbclient: protect all libsmbclient calls with a mutex
libsmbclient is not thread-safe nor reentrant.  We must protect all
function calls with a global mutex, unfortunately.
2014-02-06 22:19:59 +01:00
Max Kellermann
a7989077ab neighbor/smbclient: move smbclient_domain to lib/smbclient/Domain.cxx 2014-02-06 22:12:50 +01:00
Max Kellermann
0a0659d737 mixer/Plugin: pass AudioOutput reference to init()
Passing a void pointer is unsafe.
2014-02-06 21:10:12 +01:00
Max Kellermann
b6df4680df MixerPlugin: convert function pointers to Mixer virtual methods 2014-02-06 20:52:33 +01:00
Max Kellermann
e04090b477 Mixer: delete the implicit copy constructor 2014-02-06 20:52:25 +01:00
Max Kellermann
c9fb6f7bdb Mixer: make the constructor "explicit" 2014-02-06 20:52:25 +01:00
Max Kellermann
ad6b05ae17 mixer/software: use IgnoreError() 2014-02-06 20:52:25 +01:00
Max Kellermann
29b18d9ab7 SongUpdate: use the Storage interface, support remote files
This commit finally allows the database update to scan remote files,
e.g. using the smbclient storage plugin.  However, it is not yet
possible to configure that, therefore the feature is not accessible
yet.
2014-02-06 19:06:08 +01:00
Max Kellermann
ad309cdeae SongUpdate: make variables more local 2014-02-06 18:58:56 +01:00
Max Kellermann
e4322a716c input/nfs: new plugin using libnfs 2014-02-06 18:37:27 +01:00
Max Kellermann
957beeb0e9 storage/smbclient: Storage implementation using libsmbclient 2014-02-06 07:19:14 +01:00
Max Kellermann
522ad4cca6 Instance: narrow "storage" to class Storage 2014-02-06 07:19:14 +01:00
Max Kellermann
dc76b24e5f storage/local: OpenDirectory() returns StorageDirectoryReader* 2014-02-05 19:35:41 +01:00
Max Kellermann
e3e3053f32 storage/Interface: explicitly delete copy constructors 2014-02-05 19:30:58 +01:00
Max Kellermann
c8c3f20840 storage/local: move to src/storage/plugins/ 2014-02-05 19:26:21 +01:00
Max Kellermann
f6682aae77 db/update: include StorageInterface.hxx instead of LocalStorage.hxx 2014-02-05 19:26:18 +01:00
Max Kellermann
0ba1b73395 storage: add abstract interface
Prepare for the plugin interface.
2014-02-05 18:53:51 +01:00
Max Kellermann
4c995eb498 db/UpdateWalk: move LocalStorage to Instance
Keep only a reference.
2014-02-05 17:58:13 +01:00
Max Kellermann
144cfe70bf db/update/Remove: initialize attribute "removed_song"
Fixes bogus assertion failure.
2014-02-05 17:58:13 +01:00
Max Kellermann
855f26c43d Mixer: use reference instead of pointer for MixerPlugin 2014-02-05 17:25:47 +01:00
Max Kellermann
f86e159536 Mixer: rename struct mixer_plugin to MixerPlugin 2014-02-05 17:22:34 +01:00
Max Kellermann
243c4e1e83 Main: remove unused global variable "main_thread" 2014-02-05 17:04:16 +01:00
Max Kellermann
9ae7f186bc LocalStorage: new API abstracting filesystem walk
Prepare to make this a new plugin API, for example to use a SMB share
for the music_directory.
2014-02-05 10:04:03 +01:00
Max Kellermann
f8d114be42 db/UpdateIO: add "pure" attributes 2014-02-05 10:04:03 +01:00
Max Kellermann
2c70251df1 db/UpdateGlue: relax assertion
Fixes assertion failure when update gets launched during MPD startup.
2014-02-05 10:04:03 +01:00
Max Kellermann
d380db25be Instance: add attribute "event_loop"
Replaces global variable "main_loop".
2014-02-05 00:09:36 +01:00
Max Kellermann
e8938b1069 MixerPlugin: add EventLoop& init() parameter 2014-02-05 00:02:02 +01:00
Max Kellermann
4a28333039 event/Loop: remove the dummy constructor argument 2014-02-05 00:00:03 +01:00
Max Kellermann
ff665b37cb db/DatabaseListener: add method OnDatabaseSongRemoved()
Decouples db/update/Remove.cpp from global variables.
2014-02-04 19:53:37 +01:00
Max Kellermann
ce73843014 db/proxy: include cleanup 2014-02-04 19:53:12 +01:00
Max Kellermann
bae6f653d1 Instance: merge DatabaseModified() into OnDatabaseModified() 2014-02-04 19:17:22 +01:00
Max Kellermann
eec6d09959 db/update/Service: use DatabaseListener instead of Instance
Don't use the global variable "instance".
2014-02-04 18:54:54 +01:00
Max Kellermann
c5fa8ed321 db/update/Service: use EventLoop::IsInside()
Don't use the global variable "main_thread".
2014-02-04 18:54:45 +01:00
Max Kellermann
abc16b919d {Message,Neighbor}Commands: use Client::partition instead of Main.hxx 2014-02-04 11:35:23 +01:00
Max Kellermann
2de7cd32ea ClientMessage: undefine GetMessage on WIN32 2014-02-04 11:35:14 +01:00
Max Kellermann
098aa18538 GlobalEvents: remove obsolete event DELETE 2014-02-04 11:25:41 +01:00
Max Kellermann
cf6281a5a7 Instance: add Database attribute
Move from db/DatabaseGlue.cxx, eliminating global variable.
2014-02-04 11:22:33 +01:00
Max Kellermann
f00710a57e Main: create UpdateService instance in glue_db_init_and_load() 2014-02-04 11:22:32 +01:00
Max Kellermann
c953904343 db/update/Service: initialize "progress" and "update_task_id"
Database update was randomly broken due to these uninitialized
variables.
2014-02-04 11:22:13 +01:00
Max Kellermann
ddd36338da StateFile: pass Database to SongLoader
Fixes loading database songs from state file (regression by commit
29072797c).
2014-02-04 10:30:51 +01:00
Max Kellermann
d76b6f878e db/update/Service: add SimpleDatabase reference
Don't use the global variables from the DatabaseSimple library.
2014-02-04 09:05:32 +01:00
Max Kellermann
f25ef8d682 db/update/Walk: add Directory reference parameter
Remove dependency on the DatabaseSimple library.
2014-02-04 09:05:32 +01:00
Max Kellermann
33a2c01ea2 db/Simple: remove unused function db_get_directory() 2014-02-04 09:03:17 +01:00
Max Kellermann
9c637df77e SongSticker: add Database reference parameter 2014-02-04 01:15:08 +01:00
Max Kellermann
29072797ca db/DatabasePlaylist: pass Database reference around
Reduce global variable usage, move to frontend code.
2014-02-04 00:57:43 +01:00
Max Kellermann
db69ceade6 db/LightSong: make "real_uri" a pointer
Reduce overhead.  LightSong can always point to the "real" allocated
string.
2014-02-04 00:38:52 +01:00
Max Kellermann
b9c248e7e7 PlaylistFile: use class SongLoader 2014-02-03 23:50:19 +01:00
Max Kellermann
d533b59ee3 PlaylistFile: switch spl_append_uri() arguments
Playlist file name first, to be consistent with the other functions in
this library.
2014-02-03 23:33:25 +01:00
Max Kellermann
5ad2980d69 QueueSave: use class SongLoader 2014-02-03 23:32:31 +01:00
Max Kellermann
ca36ac2ba1 SongLoader: new class that merges duplicate code
There was quite a lot of duplicate code for loading DetachedSong
objects, with different semantics for "securely" loading local files.
2014-02-03 23:32:10 +01:00
Max Kellermann
ba675d6a55 FileCommands: use PathTraitsUTF8::IsAbsolute() 2014-02-03 23:31:28 +01:00
Max Kellermann
e4c5a4f61b PlaylistSave: remove redundant backslash conversion
This is already being done by FixSeparators(), called from
PathToUTF8().
2014-02-03 23:15:57 +01:00
Max Kellermann
a8e52ad89f ClientFile: move client_allow_file() into the Client class 2014-02-02 13:59:07 +01:00
Max Kellermann
8cf4fb53aa Playlist: pass Database to DatabaseModified()
Don't use global variable.
2014-02-01 00:45:58 +01:00
Max Kellermann
1769ae54e4 Partition: disable DatabaseModified() if not ENABLE_DATABASE 2014-02-01 00:44:41 +01:00
Max Kellermann
e545679265 Main: don't measure DatabaseGlobalDeinit() time
Useless information.
2014-02-01 00:39:42 +01:00
Max Kellermann
981080500b Stats: pass Database reference around
Call GetDatabase() only once.
2014-02-01 00:38:57 +01:00
Max Kellermann
636d28b784 Stats: remove obsolete "simple" plugin special case
The proxy plugin has now implemented the "idle" event listener.
2014-02-01 00:37:01 +01:00
Max Kellermann
188783ac1a Stats: return false if update has failed 2014-02-01 00:36:36 +01:00
Max Kellermann
ff650d50a2 Mapper: assert that Song::parent is not nullptr 2014-01-31 23:14:13 +01:00
Max Kellermann
78689645dc db/update/Archive: delete archive from database on error 2014-01-31 22:24:28 +01:00
Max Kellermann
26970579b8 db/update/Editor: add locking method variants 2014-01-31 22:17:49 +01:00
Max Kellermann
04b4f53488 db/update: convert runtime check to assertion 2014-01-31 21:59:35 +01:00
Max Kellermann
c310941f69 fs/AllocatedPath: add conversion constructor from Path 2014-01-30 23:36:57 +01:00
Max Kellermann
c02f146791 fs/DirectoryReader: GetEntry() returns Path, not AllocatedPath
Reduce overhead, don't duplicate the string.
2014-01-30 22:20:57 +01:00
Max Kellermann
a631200cca update/Walk: declare std::string at assignment
Reduce overhead.
2014-01-30 22:19:56 +01:00
Max Kellermann
6207a3f999 PlaylistFile: narrow LoadPlaylistFileInfo() API to accept Path 2014-01-30 22:17:35 +01:00
Max Kellermann
0bd01824f6 fs/AllocatedPath: add Build() overlays with Path arguments 2014-01-30 22:15:13 +01:00
Max Kellermann
4465e2c46b db: add compile-time option to disable database 2014-01-30 20:39:40 +01:00
Max Kellermann
34b309b99a OtherCommands: merge duplicate code from handle_update(), handle_rescan() 2014-01-30 20:39:40 +01:00
Max Kellermann
c6725884bc db/update: convert to OO API
Move global variables into the new classes.  That may allow multiple
update threads for multiple databases one day.
2014-01-30 18:47:05 +01:00
Max Kellermann
a31738f6f1 Main, OutputThread: increase kernel timer slack (Linux)
Allows the kernel to combine timer wakeups with other processes,
reducing power usage.
2014-01-30 18:43:40 +01:00
Max Kellermann
d5b017407d ExcludeList: move to db/update/ 2014-01-30 10:11:12 +01:00
Max Kellermann
4b044bd8e1 InotifyUpdate: pass EventLoop to mpd_inotify_init() 2014-01-29 18:36:32 +01:00
Max Kellermann
aeaf64b467 Listen: pass EventLoop to listen_global_init()
Don't use global variables.
2014-01-29 18:32:28 +01:00
Max Kellermann
a137f817f5 db/Directory: move isRootDirectory() to Uri.hxx
Decouple command/OtherCommands.cxx from the "simple" database plugin.
2014-01-29 18:05:33 +01:00
Max Kellermann
ff87145537 sticker: don't use classes Directory and Song
Don't depend on the "simple" database plugin.  This fixes an assertion
failure / crash and allows using stickers with other plugins.
2014-01-29 17:45:07 +01:00
Max Kellermann
667481c371 OutputThread: move more functions into the AudioOutput class 2014-01-29 09:26:11 +01:00
Max Kellermann
af71605769 output: rename "chunk" to "current_chunk" 2014-01-29 09:23:57 +01:00
Max Kellermann
4657a3bd0f output: move functions into the AudioOutput struct 2014-01-29 08:10:46 +01:00
Max Kellermann
cb7366f472 AudioOutput: make "plugin" a reference 2014-01-29 08:10:36 +01:00
Max Kellermann
bf803e241f AudioOutput: pass plugin to constructor
Make it "const".
2014-01-29 08:10:18 +01:00
Max Kellermann
5b3aa45e58 CommandLine: remove junk from string literal 2014-01-29 08:09:48 +01:00
Max Kellermann
c4403c523f AudioOutput: add constructor and destructor 2014-01-28 12:37:58 +01:00
Max Kellermann
07b89b2bad ConfigTemplates: rename "AudioOutput" back to "audio_output"
sed gone horribly wrong.  D'oh!
2014-01-28 12:37:58 +01:00
Max Kellermann
68b79f97f3 output: rename source files 2014-01-28 11:42:54 +01:00
Max Kellermann
815d72065c output: rename struct audio_output to AudioOutput 2014-01-28 11:34:09 +01:00
Max Kellermann
e0dc721324 OutputPlugin: rename struct audio_output_plugin to AudioOutputPlugin 2014-01-28 11:33:15 +01:00
Max Kellermann
2f873edc9c thread/Name: implementation for Mac OS X
pthread_setname_np() doesn't have the "thread" argument on OS X.
2014-01-28 11:33:15 +01:00
Max Kellermann
f5a923b9d1 OutputAll: convert to class, move instance to class Partition
Another big chunk of code for multi-player support.
2014-01-28 09:20:53 +01:00
Max Kellermann
5273900b0e neighbor/smbclient: add splice_after() fallback for gcc 4.6 2014-01-27 14:59:15 +01:00
Max Kellermann
f548a966f5 Playlist{Info,Vector}: move to db/ 2014-01-27 11:05:21 +01:00
Max Kellermann
30fadaed7f Merge branch 'v0.18.x' 2014-01-27 10:33:42 +01:00
Max Kellermann
2b10ecfa37 IcyMetadataParser: more robust tag parser
Allow semicolons and single quotes in the stream title.  This is not
part of any specification, but found in real life.
2014-01-27 10:08:21 +01:00
Max Kellermann
0b3fbdba87 neighbor/upnp: UPnP media server discovery 2014-01-26 15:51:33 +01:00
Max Kellermann
3dad837ca6 db/upnp: remove sleep(2) call
This call was unnecessary.  It is a bad idea anyway to block the MPD
process for some arbitrary amount of time.
2014-01-26 15:50:30 +01:00
Max Kellermann
d7e78059b0 upnp: initialize the client handle only once
Eliminate class LibUPnP and move the code to ClientInit.cxx.  Its
initialization function can be called multiple times, but
UpnpRegisterClient() is called at most once.
2014-01-26 15:43:23 +01:00
Max Kellermann
01f7abfc63 upnp: move library initialization to Init.cxx
Allow calling UpnpGlobalInit() multiple times.
2014-01-26 15:23:26 +01:00
Max Kellermann
e57e89b9d5 upnp/discovery: use a plain UpnpClient_Handle instead of class LibUPnP 2014-01-26 15:22:33 +01:00
Max Kellermann
bcc1f93370 upnp: add class UpnpCallback
Each Upnp*Async() call passes a new cookie pointer, and the cookie
passed to UpnpRegisterClient() appears to be ignored.  Using this
interface is a more elegant approach than having one single "handler"
function.
2014-01-26 15:04:56 +01:00
Max Kellermann
b161d72326 CueParser: don't "move" the filename
This invalidated the std::string instance, and thus broke the CUE
parser (commit 322b061632).
2014-01-26 14:58:23 +01:00
Max Kellermann
66c013682f upnp: remove obsolete global variable "theLib" 2014-01-26 13:54:48 +01:00
Max Kellermann
9f3ba737d6 upnp/Discovery: add listener interface 2014-01-26 13:41:40 +01:00
Max Kellermann
f86f5ad224 db/upnp: move generic code to lib/upnp/ 2014-01-26 13:41:40 +01:00
Max Kellermann
8b6b3ff28a neighbor/Glue: fix rollback range 2014-01-26 13:41:40 +01:00
Max Kellermann
4a3dc2cea2 db/upnp: rename variables 2014-01-26 13:08:52 +01:00
Max Kellermann
bd0cfffe23 neighbor/Info: add constructor 2014-01-26 13:07:53 +01:00
Max Kellermann
642be502c0 NeighborCommands: convert assertion to runtime check 2014-01-26 01:17:49 +01:00
Max Kellermann
5c4a42caa0 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.
2014-01-26 00:10:05 +01:00
Max Kellermann
e847788569 lib/smbclient/Init: return empty username/password
This appears to be the right thing to do when we want anonymous login.
2014-01-26 00:08:50 +01:00
Max Kellermann
86ca5b3f16 input/smbclient: move code to lib/smbclient/Init.cxx 2014-01-25 23:29:42 +01:00
Max Kellermann
9b1fbdbca6 ConfigGlobal: add config_find_block()
Merge duplicate code.
2014-01-24 16:55:17 +01:00
Max Kellermann
97391fd4b9 DespotifyUtils, Expat: move to lib/ 2014-01-24 16:44:36 +01:00
Max Kellermann
68eda78704 Mixer*: move to mixer/ 2014-01-24 16:44:32 +01:00
Max Kellermann
7c52a1c04b Filter*: move to filter/ 2014-01-24 16:43:57 +01:00
Max Kellermann
9d34fc394c Database*: move to db/ 2014-01-24 16:38:44 +01:00
Max Kellermann
973c9872f9 Sticker*: move to sticker/ 2014-01-24 16:38:15 +01:00
Max Kellermann
eef7ba48dd Win32Main: move to win32/ 2014-01-24 16:37:32 +01:00
Max Kellermann
299ff2b23f move daemonization code to unix/ 2014-01-24 16:37:21 +01:00
Max Kellermann
f8bfea8bae Input*: move to input/ 2014-01-24 16:33:33 +01:00
Max Kellermann
e199c33c6e Client*: move to client/ 2014-01-24 00:26:53 +01:00
Max Kellermann
08296cd66d Update*: move to update/ 2014-01-24 00:24:43 +01:00
Max Kellermann
197b503f3e Config*: move to config/ 2014-01-24 00:20:01 +01:00
Max Kellermann
129eb178eb Queue*: move to queue/ 2014-01-24 00:17:50 +01:00