client/Internal: move client_domain to Domain.hxx

This commit is contained in:
Max Kellermann 2019-04-03 21:26:16 +02:00
parent 1213d979f8
commit 38298e0cd8
8 changed files with 54 additions and 6 deletions

View File

@ -206,6 +206,7 @@ sources = [
'src/decoder/DecoderPrint.cxx', 'src/decoder/DecoderPrint.cxx',
'src/client/Listener.cxx', 'src/client/Listener.cxx',
'src/client/Client.cxx', 'src/client/Client.cxx',
'src/client/Domain.cxx',
'src/client/Event.cxx', 'src/client/Event.cxx',
'src/client/Expire.cxx', 'src/client/Expire.cxx',
'src/client/Global.cxx', 'src/client/Global.cxx',

View File

@ -17,14 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#include "Internal.hxx" #include "Client.hxx"
#include "Partition.hxx" #include "Partition.hxx"
#include "Instance.hxx" #include "Instance.hxx"
#include "util/Domain.hxx" #include "util/Domain.hxx"
#include "config.h" #include "config.h"
const Domain client_domain("client");
Client::~Client() noexcept Client::~Client() noexcept
{ {
if (FullyBufferedSocket::IsDefined()) if (FullyBufferedSocket::IsDefined())

23
src/client/Domain.cxx Normal file
View File

@ -0,0 +1,23 @@
/*
* Copyright 2003-2019 The Music Player Daemon Project
* http://www.musicpd.org
*
* 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.
*
* 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.
*/
#include "Domain.hxx"
#include "util/Domain.hxx"
const Domain client_domain("client");

25
src/client/Domain.hxx Normal file
View File

@ -0,0 +1,25 @@
/*
* Copyright 2003-2019 The Music Player Daemon Project
* http://www.musicpd.org
*
* 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.
*
* 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.
*/
#ifndef MPD_CLIENT_DOMAIN_HXX
#define MPD_CLIENT_DOMAIN_HXX
extern const class Domain client_domain;
#endif

View File

@ -17,7 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#include "Internal.hxx" #include "Client.hxx"
#include "Domain.hxx"
#include "Log.hxx" #include "Log.hxx"
void void

View File

@ -27,8 +27,6 @@
static constexpr unsigned CLIENT_MAX_SUBSCRIPTIONS = 16; static constexpr unsigned CLIENT_MAX_SUBSCRIPTIONS = 16;
static constexpr unsigned CLIENT_MAX_MESSAGES = 64; static constexpr unsigned CLIENT_MAX_MESSAGES = 64;
extern const class Domain client_domain;
extern std::chrono::steady_clock::duration client_timeout; extern std::chrono::steady_clock::duration client_timeout;
extern size_t client_max_command_list_size; extern size_t client_max_command_list_size;
extern size_t client_max_output_buffer_size; extern size_t client_max_output_buffer_size;

View File

@ -19,6 +19,7 @@
#include "config.h" #include "config.h"
#include "Internal.hxx" #include "Internal.hxx"
#include "Domain.hxx"
#include "List.hxx" #include "List.hxx"
#include "Partition.hxx" #include "Partition.hxx"
#include "Instance.hxx" #include "Instance.hxx"

View File

@ -18,6 +18,7 @@
*/ */
#include "Internal.hxx" #include "Internal.hxx"
#include "Domain.hxx"
#include "protocol/Result.hxx" #include "protocol/Result.hxx"
#include "command/AllCommands.hxx" #include "command/AllCommands.hxx"
#include "Log.hxx" #include "Log.hxx"