summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-07 00:29:07 +0100
committerMax Kellermann <max@duempel.org>2014-02-07 00:42:14 +0100
commitc13810ebaa7075284691eb2add089ba407dfd1ea (patch)
tree1ebeb2104ee4a3e73f49416267aec2e79943821b /src/client
parent19a982cf693e660ce296a29a9830f1e94d9f1b4c (diff)
Mapper: move map_song_detach() to db/DatabaseSong.cxx
Use Storage::MapUTF8() internally, don't use global variables.
Diffstat (limited to 'src/client')
-rw-r--r--src/client/Client.cxx6
-rw-r--r--src/client/Client.hxx5
2 files changed, 11 insertions, 0 deletions
diff --git a/src/client/Client.cxx b/src/client/Client.cxx
index c62c759e9..01ead4645 100644
--- a/src/client/Client.cxx
+++ b/src/client/Client.cxx
@@ -33,4 +33,10 @@ Client::GetDatabase(Error &error) const
return partition.instance.GetDatabase(error);
}
+const Storage *
+Client::GetStorage() const
+{
+ return partition.instance.storage;
+}
+
#endif
diff --git a/src/client/Client.hxx b/src/client/Client.hxx
index 006ffc98c..56cd947ff 100644
--- a/src/client/Client.hxx
+++ b/src/client/Client.hxx
@@ -39,6 +39,7 @@ class EventLoop;
class Path;
struct Partition;
class Database;
+class Storage;
class Client final : private FullyBufferedSocket, TimeoutMonitor {
public:
@@ -173,8 +174,12 @@ public:
/**
* Wrapper for Instance::GetDatabase().
*/
+ gcc_pure
const Database *GetDatabase(Error &error) const;
+ gcc_pure
+ const Storage *GetStorage() const;
+
private:
/* virtual methods from class BufferedSocket */
virtual InputResult OnSocketInput(void *data, size_t length) override;