util/Time*: move to time/

This commit is contained in:
Max Kellermann 2019-05-08 15:47:58 +02:00
parent 973c87b351
commit 214ddee2f5
29 changed files with 41 additions and 29 deletions

View File

@ -300,6 +300,7 @@ if enable_database
endif
subdir('src/util')
subdir('src/time')
subdir('src/system')
subdir('src/thread')
subdir('src/event')

View File

@ -21,8 +21,8 @@
#include "db/PlaylistVector.hxx"
#include "fs/io/TextFile.hxx"
#include "fs/io/BufferedOutputStream.hxx"
#include "time/ChronoUtil.hxx"
#include "util/StringStrip.hxx"
#include "util/ChronoUtil.hxx"
#include "util/RuntimeError.hxx"
#include <string.h>

View File

@ -27,7 +27,7 @@
#include "TagPrint.hxx"
#include "client/Response.hxx"
#include "fs/Traits.hxx"
#include "util/ChronoUtil.hxx"
#include "time/ChronoUtil.hxx"
#include "util/UriUtil.hxx"
#define SONG_FILE "file: "

View File

@ -27,7 +27,7 @@
#include "tag/ParseName.hxx"
#include "tag/Tag.hxx"
#include "tag/Builder.hxx"
#include "util/ChronoUtil.hxx"
#include "time/ChronoUtil.hxx"
#include "util/StringAPI.hxx"
#include "util/StringBuffer.hxx"
#include "util/StringStrip.hxx"

View File

@ -28,7 +28,7 @@
#include "db/Stats.hxx"
#include "system/Clock.hxx"
#include "Log.hxx"
#include "util/ChronoUtil.hxx"
#include "time/ChronoUtil.hxx"
#include <chrono>
#include <cmath>

View File

@ -19,7 +19,7 @@
#include "TimePrint.hxx"
#include "client/Response.hxx"
#include "util/TimeISO8601.hxx"
#include "time/ISO8601.hxx"
void
time_print(Response &r, const char *name,

View File

@ -35,7 +35,7 @@
#include "decoder/DecoderPrint.hxx"
#include "ls.hxx"
#include "mixer/Volume.hxx"
#include "util/ChronoUtil.hxx"
#include "time/ChronoUtil.hxx"
#include "util/UriUtil.hxx"
#include "util/StringAPI.hxx"
#include "fs/AllocatedPath.hxx"

View File

@ -38,9 +38,9 @@
#include "client/Response.hxx"
#include "Mapper.hxx"
#include "fs/AllocatedPath.hxx"
#include "time/ChronoUtil.hxx"
#include "util/UriUtil.hxx"
#include "util/ConstBuffer.hxx"
#include "util/ChronoUtil.hxx"
#include "LocateUri.hxx"
bool

View File

@ -23,8 +23,8 @@
#include "StorageCommands.hxx"
#include "Request.hxx"
#include "CommandError.hxx"
#include "time/ChronoUtil.hxx"
#include "util/UriUtil.hxx"
#include "util/ChronoUtil.hxx"
#include "util/ConstBuffer.hxx"
#include "fs/Traits.hxx"
#include "client/Client.hxx"

View File

@ -34,7 +34,7 @@
#include "PlaylistInfo.hxx"
#include "Interface.hxx"
#include "fs/Traits.hxx"
#include "util/ChronoUtil.hxx"
#include "time/ChronoUtil.hxx"
#include <functional>

View File

@ -25,7 +25,7 @@
#include "PlaylistDatabase.hxx"
#include "fs/io/TextFile.hxx"
#include "fs/io/BufferedOutputStream.hxx"
#include "util/ChronoUtil.hxx"
#include "time/ChronoUtil.hxx"
#include "util/StringCompare.hxx"
#include "util/NumberParser.hxx"
#include "util/RuntimeError.hxx"

View File

@ -29,8 +29,9 @@
#include "AudioParser.hxx"
#include "tag/ParseName.hxx"
#include "tag/Tag.hxx"
#include "time/ChronoUtil.hxx"
#include "time/ISO8601.hxx"
#include "util/CharUtil.hxx"
#include "util/ChronoUtil.hxx"
#include "util/ConstBuffer.hxx"
#include "util/RuntimeError.hxx"
#include "util/StringAPI.hxx"
@ -38,7 +39,6 @@
#include "util/StringStrip.hxx"
#include "util/StringView.hxx"
#include "util/ASCII.hxx"
#include "util/TimeISO8601.hxx"
#include "util/UriUtil.hxx"
#include "lib/icu/CaseFold.hxx"

View File

@ -19,7 +19,7 @@
#include "ModifiedSinceSongFilter.hxx"
#include "LightSong.hxx"
#include "util/TimeISO8601.hxx"
#include "time/ISO8601.hxx"
std::string
ModifiedSinceSongFilter::ToExpression() const noexcept

View File

@ -24,6 +24,7 @@ song_dep = declare_dependency(
icu_dep,
pcre_dep,
tag_dep,
time_dep,
util_dep,
],
)

View File

@ -33,13 +33,13 @@
#include "event/DeferEvent.hxx"
#include "thread/Mutex.hxx"
#include "thread/Cond.hxx"
#include "time/ChronoUtil.hxx"
#include "time/Parser.hxx"
#include "util/ASCII.hxx"
#include "util/ChronoUtil.hxx"
#include "util/IterableSplitString.hxx"
#include "util/RuntimeError.hxx"
#include "util/StringCompare.hxx"
#include "util/StringFormat.hxx"
#include "util/TimeParser.hxx"
#include "util/UriUtil.hxx"
#include <algorithm>

View File

@ -57,5 +57,6 @@ storage_plugins_dep = declare_dependency(
dependencies: [
storage_api_dep,
fs_dep,
time_dep,
],
)

View File

@ -20,9 +20,9 @@
#include "Format.hxx"
#include "Tag.hxx"
#include "ParseName.hxx"
#include "time/Convert.hxx"
#include "util/format.h"
#include "util/TruncateString.hxx"
#include "util/TimeConvert.hxx"
#include <algorithm>

View File

@ -45,6 +45,7 @@ tag = static_library(
tag_dep = declare_dependency(
link_with: tag,
dependencies: [
time_dep,
util_dep,
],
)

View File

@ -30,7 +30,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "TimeConvert.hxx"
#include "Convert.hxx"
#include <stdexcept>

View File

@ -30,9 +30,9 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "TimeISO8601.hxx"
#include "TimeConvert.hxx"
#include "TimeParser.hxx"
#include "ISO8601.hxx"
#include "Convert.hxx"
#include "Parser.hxx"
StringBuffer<64>
FormatISO8601(const struct tm &tm) noexcept

View File

@ -33,8 +33,8 @@
#ifndef TIME_ISO8601_HXX
#define TIME_ISO8601_HXX
#include "StringBuffer.hxx"
#include "Compiler.h"
#include "util/StringBuffer.hxx"
#include "util/Compiler.h"
#include <string>
#include <chrono>

View File

@ -27,8 +27,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "TimeParser.hxx"
#include "Compiler.h"
#include "Parser.hxx"
#include "util/Compiler.h"
#include <stdexcept>

11
src/time/meson.build Normal file
View File

@ -0,0 +1,11 @@
time = static_library(
'time',
'Parser.cxx',
'Convert.cxx',
'ISO8601.cxx',
include_directories: inc,
)
time_dep = declare_dependency(
link_with: time,
)

View File

@ -16,9 +16,6 @@ util = static_library(
'SplitString.cxx',
'FormatString.cxx',
'Tokenizer.cxx',
'TimeParser.cxx',
'TimeConvert.cxx',
'TimeISO8601.cxx',
'UriUtil.cxx',
'LazyRandomEngine.cxx',
'HugeAllocator.cxx',

View File

@ -22,7 +22,7 @@
#include "storage/StorageInterface.hxx"
#include "storage/FileInfo.hxx"
#include "net/Init.hxx"
#include "util/ChronoUtil.hxx"
#include "time/ChronoUtil.hxx"
#include "util/PrintException.hxx"
#include <memory>

View File

@ -17,7 +17,7 @@
#include "storage/StorageInterface.hxx"
#include "storage/plugins/LocalStorage.hxx"
#include "Mapper.hxx"
#include "util/ChronoUtil.hxx"
#include "time/ChronoUtil.hxx"
#include <gtest/gtest.h>