Client.cxx 1.5 KB
Newer Older
1
/*
Max Kellermann's avatar
Max Kellermann committed
2
 * Copyright 2003-2017 The Music Player Daemon Project
3
 * http://www.musicpd.org
Warren Dukes's avatar
Warren Dukes committed
4 5 6 7 8 9 10 11 12 13
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
14 15 16 17
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Warren Dukes's avatar
Warren Dukes committed
18 19
 */

20
#include "config.h"
Max Kellermann's avatar
Max Kellermann committed
21
#include "ClientInternal.hxx"
22
#include "util/Domain.hxx"
23 24
#include "Partition.hxx"
#include "Instance.hxx"
25 26

const Domain client_domain("client");
27

28
Instance &
29
Client::GetInstance() noexcept
30
{
31
	return partition->instance;
32 33
}

34
playlist &
35
Client::GetPlaylist() noexcept
36
{
37
	return partition->playlist;
38 39 40
}

PlayerControl &
41
Client::GetPlayerControl() noexcept
42
{
43
	return partition->pc;
44 45
}

46 47 48
#ifdef ENABLE_DATABASE

const Database *
49
Client::GetDatabase() const noexcept
50
{
51
	return partition->instance.GetDatabase();
52 53
}

54 55 56
const Database &
Client::GetDatabaseOrThrow() const
{
57
	return partition->instance.GetDatabaseOrThrow();
58 59
}

60
const Storage *
61
Client::GetStorage() const noexcept
62
{
63
	return partition->instance.storage;
64 65
}

66
#endif