Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
68f824a1
Commit
68f824a1
authored
6 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
protocol/ArgParser: move struct RangeArg to separate header
parent
b9cca49e
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
15 deletions
+47
-15
Makefile.am
Makefile.am
+1
-0
DatabaseCommands.cxx
src/command/DatabaseCommands.cxx
+1
-0
QueueCommands.cxx
src/command/QueueCommands.cxx
+1
-0
Request.hxx
src/command/Request.hxx
+1
-0
ArgParser.cxx
src/protocol/ArgParser.cxx
+1
-0
ArgParser.hxx
src/protocol/ArgParser.hxx
+1
-15
RangeArg.hxx
src/protocol/RangeArg.hxx
+40
-0
test_protocol.cxx
test/test_protocol.cxx
+1
-0
No files found.
Makefile.am
View file @
68f824a1
...
...
@@ -82,6 +82,7 @@ libmpd_a_SOURCES = \
src/open.h
\
src/protocol/Ack.cxx src/protocol/Ack.hxx
\
src/protocol/ArgParser.cxx src/protocol/ArgParser.hxx
\
src/protocol/RangeArg.hxx
\
src/protocol/Result.cxx src/protocol/Result.hxx
\
src/command/Request.hxx
\
src/command/CommandResult.hxx
\
...
...
This diff is collapsed.
Click to expand it.
src/command/DatabaseCommands.cxx
View file @
68f824a1
...
...
@@ -26,6 +26,7 @@
#include "db/Count.hxx"
#include "db/Selection.hxx"
#include "CommandError.hxx"
#include "protocol/RangeArg.hxx"
#include "client/Client.hxx"
#include "client/Response.hxx"
#include "tag/ParseName.hxx"
...
...
This diff is collapsed.
Click to expand it.
src/command/QueueCommands.cxx
View file @
68f824a1
...
...
@@ -21,6 +21,7 @@
#include "QueueCommands.hxx"
#include "Request.hxx"
#include "CommandError.hxx"
#include "protocol/RangeArg.hxx"
#include "db/DatabaseQueue.hxx"
#include "db/Selection.hxx"
#include "song/Filter.hxx"
...
...
This diff is collapsed.
Click to expand it.
src/command/Request.hxx
View file @
68f824a1
...
...
@@ -22,6 +22,7 @@
#include "check.h"
#include "protocol/ArgParser.hxx"
#include "protocol/RangeArg.hxx"
#include "Chrono.hxx"
#include "util/ConstBuffer.hxx"
...
...
This diff is collapsed.
Click to expand it.
src/protocol/ArgParser.cxx
View file @
68f824a1
...
...
@@ -19,6 +19,7 @@
#include "config.h"
#include "ArgParser.hxx"
#include "RangeArg.hxx"
#include "Ack.hxx"
#include "Chrono.hxx"
#include "util/NumberParser.hxx"
...
...
This diff is collapsed.
Click to expand it.
src/protocol/ArgParser.hxx
View file @
68f824a1
...
...
@@ -22,10 +22,9 @@
#include "check.h"
#include <limits>
#include <stdint.h>
struct
RangeArg
;
class
SongTime
;
class
SignedSongTime
;
...
...
@@ -38,19 +37,6 @@ ParseCommandArgInt(const char *s, int min_value, int max_value);
int
ParseCommandArgInt
(
const
char
*
s
);
struct
RangeArg
{
unsigned
start
,
end
;
void
SetAll
()
{
start
=
0
;
end
=
std
::
numeric_limits
<
unsigned
>::
max
();
}
static
constexpr
RangeArg
All
()
{
return
{
0
,
std
::
numeric_limits
<
unsigned
>::
max
()
};
}
};
RangeArg
ParseCommandArgRange
(
const
char
*
s
);
...
...
This diff is collapsed.
Click to expand it.
src/protocol/RangeArg.hxx
0 → 100644
View file @
68f824a1
/*
* Copyright 2003-2018 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_PROTOCOL_RANGE_ARG_HXX
#define MPD_PROTOCOL_RANGE_ARG_HXX
#include "check.h"
#include <limits>
struct
RangeArg
{
unsigned
start
,
end
;
void
SetAll
()
{
start
=
0
;
end
=
std
::
numeric_limits
<
unsigned
>::
max
();
}
static
constexpr
RangeArg
All
()
{
return
{
0
,
std
::
numeric_limits
<
unsigned
>::
max
()
};
}
};
#endif
This diff is collapsed.
Click to expand it.
test/test_protocol.cxx
View file @
68f824a1
#include "config.h"
#include "protocol/ArgParser.hxx"
#include "protocol/Ack.hxx"
#include "protocol/RangeArg.hxx"
#include "util/Compiler.h"
#include <cppunit/TestFixture.h>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment