Commit Graph

11404 Commits

Author SHA1 Message Date
Max Kellermann
a8e70f0901 db/proxy: forward sort and window to server 2018-09-02 17:51:30 +02:00
Max Kellermann
c7c32a3ce9 db/Print: move sort/window emulation code to class DatabaseVisitorHelper
That way, each plugin can decide to implement it better.
2018-09-02 17:37:02 +02:00
Max Kellermann
94694e0f33 db/simple: pass DatabaseSelection to WalkMount()
This passes the new `sort` and `window` attributes to the mounted
database.
2018-09-02 17:13:35 +02:00
Max Kellermann
a73176a1e9 db/Helpers: fix include guard 2018-09-02 12:32:33 +02:00
Max Kellermann
e6a974a93e db/Selection: add sort and window
Remove them as parameters from `db_selection_print()`.
2018-09-02 11:10:04 +02:00
Max Kellermann
9894967fcb db/Selection: move bool attribute to the end
May allow a better memory layout.
2018-09-02 11:10:04 +02:00
Max Kellermann
92da483ecd db/Selection: add noexcept 2018-09-02 11:10:04 +02:00
Max Kellermann
9cc960ac5e db/proxy: require MPD 0.19 2018-09-02 11:07:32 +02:00
Max Kellermann
18dd082f1e db/proxy: use ~0 instead of -1
No undefined behavior.
2018-09-02 11:06:08 +02:00
Max Kellermann
81b734be10 db/Interface: add "noexcept" 2018-09-02 10:20:48 +02:00
Max Kellermann
c59be7ced3 db/Interface: add more documentation about exceptions 2018-09-02 10:19:10 +02:00
Max Kellermann
c5c4d4a57e db/proxy: forward the audio format
Requires libmpdclient 2.15.
2018-09-02 08:38:23 +02:00
Max Kellermann
2d0b429b6a db/proxy: require libmpdclient 2.9 2018-09-02 08:21:11 +02:00
Max Kellermann
60620d9af5 db/Print: move variable i 2018-09-02 08:17:22 +02:00
Max Kellermann
15b2a4862e protocol/RangeArg: add Contains() 2018-09-02 08:17:22 +02:00
Max Kellermann
2915d2dd0f protocol/RangeArg: add IsAll() 2018-09-02 08:17:22 +02:00
Max Kellermann
590687fdea protocol/RangeArg: eliminate SetAll() 2018-09-02 08:17:22 +02:00
Max Kellermann
993f8d6a5e db/Print: pass RangeArg to db_selection_print() 2018-09-02 08:17:22 +02:00
Max Kellermann
68f824a186 protocol/ArgParser: move struct RangeArg to separate header 2018-09-02 08:17:22 +02:00
Max Kellermann
b9cca49e14 lib/dbus/ReadIter: switch off -Wshadow on GCC<8
GCC 6.3.0 emits bogus warnings like this:

 In file included from src/lib/dbus/UDisks2.cxx:22:0:
 src/lib/dbus/ReadIter.hxx: In instantiation of 'ODBus::ReadMessageIter::ForEachProperty(F&&)::<lambda(auto:2&&)> [with auto:2 = ODBus::ReadMessageIter; F = std::_Bind<void (*(std::reference_wrapper<UDisks2::Object>, std::_Placeholder<1>, std::_Placeholder<2>))(UDisks2::Object&, const char*, ODBus::ReadMessageIter&&) noexcept>]':
 src/lib/dbus/ReadIter.hxx:102:6:   required from 'ODBus::ReadMessageIter::ForEachRecurse(int, F&&)::<lambda(auto:1&&)> [with auto:1 = ODBus::ReadMessageIter&; F = ODBus::ReadMessageIter::ForEachProperty(F&&) [with F = std::_Bind<void (*(std::reference_wrapper<UDisks2::Object>, std::_Placeholder<1>, std::_Placeholder<2>))(UDisks2::Object&, const char*, ODBus::ReadMessageIter&&) noexcept>]::<lambda(auto:2&&)>]'
 src/lib/dbus/ReadIter.hxx:92:5:   required from 'void ODBus::ReadMessageIter::ForEach(int, F&&) [with F = ODBus::ReadMessageIter::ForEachRecurse(int, F&&) [with F = ODBus::ReadMessageIter::ForEachProperty(F&&) [with F = std::_Bind<void (*(std::reference_wrapper<UDisks2::Object>, std::_Placeholder<1>, std::_Placeholder<2>))(UDisks2::Object&, const char*, ODBus::ReadMessageIter&&) noexcept>]::<lambda(auto:2&&)>]::<lambda(auto:1&&)>]'
 src/lib/dbus/ReadIter.hxx:101:3:   required from 'void ODBus::ReadMessageIter::ForEachRecurse(int, F&&) [with F = ODBus::ReadMessageIter::ForEachProperty(F&&) [with F = std::_Bind<void (*(std::reference_wrapper<UDisks2::Object>, std::_Placeholder<1>, std::_Placeholder<2>))(UDisks2::Object&, const char*, ODBus::ReadMessageIter&&) noexcept>]::<lambda(auto:2&&)>]'
 src/lib/dbus/ReadIter.hxx:114:3:   required from 'void ODBus::ReadMessageIter::ForEachProperty(F&&) [with F = std::_Bind<void (*(std::reference_wrapper<UDisks2::Object>, std::_Placeholder<1>, std::_Placeholder<2>))(UDisks2::Object&, const char*, ODBus::ReadMessageIter&&) noexcept>]'
 src/lib/dbus/UDisks2.cxx:71:30:   required from here
 src/lib/dbus/ReadIter.hxx:114:53: error: declaration of 'ODBus::ReadMessageIter&& i' shadows a parameter [-Werror=shadow]
    ForEachRecurse(DBUS_TYPE_DICT_ENTRY, [&f](auto &&i){
                                                      ^
 src/lib/dbus/ReadIter.hxx:101:33: note: shadowed declaration is here
    ForEach(arg_type, [&f](auto &&i){
                                  ^
2018-09-02 08:17:21 +02:00
Max Kellermann
931b571e3d neighbor/udisks: add this-> to work around GCC 6 bug
Since `this` was captured, it does not need to be specified, but GCC 6
can't do it.  Since we want to support the standard compiler from
Debian Stretch (stable), we need to work around this problem:

 src/neighbor/plugins/UdisksNeighborPlugin.cxx:239:12: error: cannot call member function 'void UdisksNeighborExplorer::Insert(UDisks2::Object&&)' without object
       Insert(std::move(o));
       ~~~~~~^~~~~~~~~~~~~~

This fixes #300 which I previously thought was a different bug.
2018-09-02 08:12:51 +02:00
Max Kellermann
35eca08d48 java/*: add noexcept 2018-08-28 13:27:28 +02:00
Max Kellermann
7137ca375a Merge branch 'v0.20.x' 2018-08-28 13:27:04 +02:00
Max Kellermann
282859a62a java/String: include cleanup 2018-08-28 13:07:28 +02:00
Max Kellermann
fbeb5eefdc java/Class: drop unnecessary namespace spec 2018-08-28 13:01:01 +02:00
Max Kellermann
85bada0505 java/Class: use DiscardException() in FindOptional()
Sometimes, the JVM returns a non-nullptr value with an exception
pending (seen on Android 1.6, maybe a Dalvik bug?).  Let's catch all
such cases.
2018-08-28 13:00:08 +02:00
Max Kellermann
fe2f7a3e5a configure.ac: add automake conditional "LINUX" 2018-08-22 16:09:40 +02:00
Max Kellermann
98eed1f5ab system/EpollFD: use class UniqueFileDescriptor 2018-08-22 16:09:40 +02:00
Max Kellermann
5d0a463f09 system/{Epoll,Event,Signal}FD: relicense to BSD-2 2018-08-22 15:40:45 +02:00
Max Kellermann
dd461400fb system/EPollFD: rename to EpollFD 2018-08-22 15:40:45 +02:00
Max Kellermann
b1390ec27f system/UniqueFileDescriptor: make the "int" constructor public 2018-08-22 15:40:45 +02:00
Max Kellermann
dda5516eec net/IPv6Address: pass reference to Cast() 2018-08-21 20:21:41 +02:00
Max Kellermann
adc5c5db88 net/IPv4Address: pass reference to Cast() 2018-08-21 20:16:57 +02:00
Max Kellermann
0642ce4795 fs/io/FileOutputStream: make linkat() mandatory on Linux 2018-08-21 19:02:03 +02:00
Max Kellermann
d11e1d5880 fs/io/FileOutputStream: add "noexcept" 2018-08-21 18:56:14 +02:00
Max Kellermann
b143477774 fs/io/BufferedReader: add "noexcept" to constructor 2018-08-21 18:52:57 +02:00
Max Kellermann
d092a88a93 system/Open: new UniqueFileDescriptor constructing library 2018-08-21 18:27:39 +02:00
Max Kellermann
ab7597b089 fs/io/FileReader: use class UniqueFileDescriptor 2018-08-21 18:26:36 +02:00
Max Kellermann
84df470008 fs/io/FileReader: use std::exchange() 2018-08-21 18:26:34 +02:00
Max Kellermann
5ca0b7a28f fs/io/FileReader: add "noexcept" 2018-08-21 18:26:09 +02:00
Max Kellermann
21d621e7ad fs/io/FileReader: simplify includes 2018-08-21 18:26:09 +02:00
Max Kellermann
d036e20826 system/FileDescriptor: add openat() wrapper 2018-08-21 18:15:37 +02:00
Max Kellermann
9151b84c25 net/AllocatedSocketAddress: convert operator== to template 2018-08-21 12:26:19 +02:00
Max Kellermann
5d7dd12f7a net/SocketDescriptor: add multicast methods 2018-08-21 11:37:19 +02:00
Max Kellermann
21783ff5f7 net/SocketDescriptor: remove unnecessary SO_REUSEPORT check 2018-08-21 11:35:29 +02:00
Max Kellermann
fd923d5d96 net/SocketDescriptor: add Shutdown() 2018-08-21 11:31:58 +02:00
Max Kellermann
ebf607eef8 net/SocketDescriptor: fix SOCK_NONBLOCK flag in CreateSocketPairNonBlock() 2018-08-21 11:27:15 +02:00
Max Kellermann
e092eadd8d net/SocketDescriptor: add "noexcept" 2018-08-21 11:08:34 +02:00
Max Kellermann
185148f57c net/SocketAddress: add cast to size_type 2018-08-21 11:06:05 +02:00
Max Kellermann
ede7434901 net/SocketAddress: add GetSteadyPart() 2018-08-21 10:57:46 +02:00
Max Kellermann
ba3b422ce5 net/SocketDescriptor: make accept4() mandatory on Linux 2018-08-21 10:53:54 +02:00
Max Kellermann
1f3ce380ed net/SocketAddress: reimplement GetPort() using IPv4Address::GetPort() 2018-08-21 10:49:55 +02:00
Max Kellermann
dfc1f6342a net/SocketAddress: add IsV4Mapped() 2018-08-21 10:48:37 +02:00
Max Kellermann
94092f1f90 net/SocketAddress: reimplement IsV6Any() using IPv6Address::IsAny() 2018-08-21 10:46:20 +02:00
Max Kellermann
a84b83f20f net/IPv6Address: new class 2018-08-21 10:39:54 +02:00
Max Kellermann
614e410fe7 net/Resolver: update copyright year 2018-08-21 10:30:24 +02:00
Max Kellermann
4a1e885c0a net/Resolver: replace with more advanced implementation
The new implementation is copied from another project and is
BSD-licensed.  It is exception-safe and can parse IPv6 scope ids with
interface names.
2018-08-21 08:26:12 +02:00
Max Kellermann
eee91aa4ea util/Exception: update copyright 2018-08-21 08:20:52 +02:00
Max Kellermann
855750c784 util/{Const,Writable}Buffer: add method SetEnd() 2018-08-21 08:20:17 +02:00
Max Kellermann
4f2163e76c system/FileDescriptor: include cleanup 2018-08-20 17:25:42 +02:00
Max Kellermann
eef66dee04 system/FileDescriptor: pass FileDescriptor to CheckDuplicate() 2018-08-20 17:23:14 +02:00
Max Kellermann
7ad440ca1c net/SocketDescriptor: make eventfd() and signalfd() mandatory on Linux 2018-08-20 17:16:07 +02:00
Max Kellermann
13b3e9e7b3 system/FileDescriptor: make inotify_init1() mandatory on Linux 2018-08-20 17:12:50 +02:00
Max Kellermann
8106929d60 system/FileDescriptor: add pipe2() wrapper 2018-08-20 17:05:29 +02:00
Max Kellermann
795baed3f5 system/FileDescriptor: make pipe2() mandatory on Linux 2018-08-20 17:04:43 +02:00
Max Kellermann
5487d40be9 system/FileDescriptor: add operator!= 2018-08-20 16:49:14 +02:00
Max Kellermann
5e512763d3 system/UniqueFileDescriptor: make the base class public 2018-08-20 16:38:27 +02:00
Max Kellermann
a65d02d3ae system/FileDescriptor: add "noexcept" 2018-08-20 16:34:47 +02:00
Max Kellermann
2156fc64f4 util/StringStrip: more API documentation 2018-08-20 16:30:46 +02:00
Max Kellermann
441440101d util/StringStrip: add more "nonnull" attributes 2018-08-20 16:28:43 +02:00
Max Kellermann
ec54754e22 Compiler.h: move to util/ 2018-08-20 16:19:17 +02:00
Max Kellermann
0ebba73cb8 net/SocketDescriptor: add method GetPeerCredentials() 2018-08-20 16:11:17 +02:00
Max Kellermann
50c7337965 net/SocketDescriptor: add GetType(), IsStream() 2018-08-20 16:06:58 +02:00
Max Kellermann
b5c569cd30 system/FileDescriptor: add IsPipe(), IsSocket() 2018-08-20 16:05:03 +02:00
Max Kellermann
11396d4fba net/SocketAddress: add method GetLocalRaw() 2018-08-20 15:59:17 +02:00
Max Kellermann
4c6ae4e9e8 net/IPv4Address: add various helper methods 2018-08-20 15:57:13 +02:00
Max Kellermann
9cb9154b08 net/IPv4Address: add struct sockaddr_in constructor 2018-08-20 15:57:13 +02:00
Max Kellermann
234a6193bb net/SocketAddress: make GetAddress() constexpr 2018-08-20 15:57:13 +02:00
Max Kellermann
2bf5f32224 net/IPv4Address: add API documentation 2018-08-20 15:50:25 +02:00
Max Kellermann
82d0f68acf net/IPv4Address: add static method ConstructInAddrBE() 2018-08-20 15:48:52 +02:00
Max Kellermann
616c8383c0 net/IPv4Address: check _WIN32 instead of WIN32 2018-08-20 15:48:49 +02:00
Max Kellermann
5de46268af net/IPv4Address: add "noexcept" 2018-08-20 15:43:35 +02:00
Max Kellermann
489e11072e util/WritableBuffer: add ConstBuffer cast operator 2018-08-20 15:36:50 +02:00
Max Kellermann
5e2af15e94 util/Manual: add static method Cast() 2018-08-20 15:35:43 +02:00
Max Kellermann
3fbb54e0a4 util/IterableSplitString: use operator==(nullptr_t) 2018-08-20 15:35:09 +02:00
Max Kellermann
fe6de14faf util/StringView: add ConstBuffer cast constructors 2018-08-20 15:34:07 +02:00
Max Kellermann
e85b9960f0 util/StringCompare: use StringAPI.hxx 2018-08-20 15:33:16 +02:00
Max Kellermann
75c836fbd9 util/StringAPI: use StringCompare() in StringIsEqual() 2018-08-20 15:31:09 +02:00
Max Kellermann
94b1025780 util/RuntimeError: fix typo 2018-08-20 15:22:24 +02:00
Max Kellermann
36ca9d01fb util/ForeignFifoBuffer: shift the buffer in MoveFrom() on demand
The API documentation says "move as much data as possible", and if
there is room at the head of the buffer, we should use that if the
room after the tail is not large enough.
2018-08-20 15:21:05 +02:00
Max Kellermann
3bceed1b53 util/ForeignFifoBuffer: add "noexcept" 2018-08-20 14:53:39 +02:00
Max Kellermann
90de2c4bd6 util/Exception: move code to NestCurrentException() 2018-08-20 14:52:54 +02:00
Max Kellermann
9d63c8220b util/Cast: reverse operands in ContainerAttributeOffset()
The result shall be positive.
2018-08-20 14:23:02 +02:00
Max Kellermann
edd9d16c84 util/Cast: move OffsetPointer() to OffsetPointer.hxx 2018-08-20 13:46:18 +02:00
Max Kellermann
ec373eba5d util/BindMethod: add "noexcept" 2018-08-20 13:45:41 +02:00
Max Kellermann
0dfb27b7e5 util/StringAPI: stpcpy() was added in Bionic API level 21 2018-08-20 13:31:23 +02:00
Thomas Guillem
735f62be0c storage/nfs: implement follow 2018-08-20 11:29:27 +02:00
Thomas Guillem
a04e01d5f5 lib/nfs/Connection: add Lstat 2018-08-20 11:29:11 +02:00
Max Kellermann
0b7d7fe069 Merge branch 'v0.20.x' 2018-08-20 11:27:56 +02:00
Thomas Guillem
9127afbf3f lib/nfs/Connection: use nfs_stat64_async
Since nfs_stat_async is deprecated.
2018-08-20 10:51:24 +02:00