Commit Graph

81 Commits

Author SHA1 Message Date
Max Kellermann
d93172bee8 Compiler.h: add macro CLANG_OR_GCC_VERSION() 2014-11-28 19:09:56 +01:00
Max Kellermann
bb922d577d storage/nfs: use the libnfs async API
Share the NFS connection with the NFS input plugin.
2014-10-09 08:09:08 +02:00
Max Kellermann
3d2558bde6 StoragePlugin: pass EventLoop to constructor 2014-10-09 07:45:25 +02:00
Max Kellermann
e5ff85b63c storage/nfs: move code to class MemoryStorageDirectoryReader
Read all directory entries into memory and close the struct nfsdir
before returning the StorageDirectoryReader instance.  This is what
libnfs does, anyway.
2014-10-07 06:36:11 +02:00
Max Kellermann
f0bb5b84f9 storage/nfs: move code to Copy() 2014-10-07 06:35:53 +02:00
Max Kellermann
b1a252a64d lib/nfs/Base: kludge to reduce number of NFS mounts
Creating a NfsStorage sets its own export_name as the "base".  Now
NfsFileReader can use this information to derive the export_name to be
mounted, instead of guessing.  This solves the "too many connection"
problem on the NFS server while updating the database.
2014-10-05 07:41:50 +02:00
Max Kellermann
19dd59f38c storage: remove redundant "virtual" keywords
"override" implies "virtual".
2014-10-02 19:17:46 +02:00
Max Kellermann
89f9561d10 storage/Interface: include cleanup 2014-10-01 23:38:17 +02:00
Max Kellermann
d44da875e7 storage/nfs: make a few attributes "const" 2014-10-01 21:14:26 +02:00
Max Kellermann
b002ea9a20 storage/nfs: convert file name to UTF-8
Assume the configured filesystem character set is also used by the NFS
server.
2014-09-28 18:26:54 +02:00
Max Kellermann
540317ea2b storage/nfs: use string::append() instead of string::insert()
Swap the order of adding the URI and the slash, because appending is
cheaper than inserting.
2014-09-28 18:25:51 +02:00
Max Kellermann
142d1951d2 storage/nfs: move code to UriToNfsPath() 2014-09-28 18:12:20 +02:00
Max Kellermann
350d2bcd6e storage/Configured: fix fallback music directory
This was accidently disabled when storage plugins were introduced.
2014-03-01 18:45:09 +01:00
Max Kellermann
2a16fc74fd CompositeStorage: add method GetMount() 2014-02-27 20:49:13 +01:00
Max Kellermann
150443b014 DatabasePlugin: add FLAG_REQUIRE_STORAGE
Ignore the storage configuration if FLAG_REQUIRE_STORAGE is not set in
the DatabasePlugin.
2014-02-19 23:24:17 +01:00
Max Kellermann
e3e2ad4ae5 CompositeStorage: fix tree walk in Directory::Unmount() 2014-02-12 23:48:08 +01:00
Max Kellermann
0935ae330a StorageCommands: add command "listmounts" 2014-02-12 21:47:59 +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
37b6899660 Main: move code to storage/Configured.cxx 2014-02-09 08:09:47 +01:00
Max Kellermann
b3663b5da2 storage/nfs: new storage plugin 2014-02-08 14:24:47 +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
ffd16b55a6 StoragePlugin: add method MapToRelativeUTF8()
Replaces map_to_relative_path() from Mapper.cxx.
2014-02-07 19:09:28 +01:00
Max Kellermann
b2e3fdef0f storage/local: hide the class declarations
Hide inside CreateLocalStorage().
2014-02-07 01:11:52 +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
957beeb0e9 storage/smbclient: Storage implementation using libsmbclient 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
0ba1b73395 storage: add abstract interface
Prepare for the plugin interface.
2014-02-05 18:53:51 +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