Commit Graph

709 Commits

Author SHA1 Message Date
Max Kellermann 71d012fa61 db/proxy: forward "idle" events
Send "idle" to the other MPD whenever there's nothing else to do and
forward incoming "idle database" events to all our MPD clients.
2014-01-11 01:11:19 +01:00
Max Kellermann 114df1f137 DatabasePlugin: add interface DatabaseListener
Allow database plugins to announce that they have been modified.
2014-01-11 01:01:54 +01:00
Max Kellermann 00adf7ff17 db/proxy: move code to Disconnect() 2014-01-11 00:46:33 +01:00
Max Kellermann e9ba5fcaf3 db/upnp: remove unused method setMaxContentLength() 2014-01-10 23:04:50 +01:00
Max Kellermann 48097745f6 db/upnp: remove "upnplog" option
We have removed all libupnp logging calls, and we don't need to debug
libupnp.
2014-01-10 23:00:27 +01:00
Max Kellermann 1091ca969f db/upnp: remove unused macro PLOGINF() 2014-01-10 23:00:18 +01:00
Max Kellermann 09d62cc630 db/upnp: remove unused method errAsString() 2014-01-10 23:00:10 +01:00
Max Kellermann a2ead993e6 db/upnp/Device: remove unused attribute "m_tabs" 2014-01-10 23:00:03 +01:00
Max Kellermann b330aa8dd5 db/upnp: remove unnecessary empty string checks from CharacterData() 2014-01-10 22:59:46 +01:00
Max Kellermann 1b8053a618 db/upnp/Directory: simplify checkobjok() 2014-01-10 22:59:28 +01:00
Max Kellermann 70e5ab3fde db/upnp/Directory: don't log unknown items 2014-01-10 22:59:16 +01:00
Max Kellermann f4490f6918 db/upnp/Directory: eliminate the "attributes" std::map
Look up attributes in the "atts" array.  Reduce bloat.
2014-01-10 22:59:01 +01:00
Max Kellermann dadd987bf4 db/upnp/Directory: move "res" attributes to array
Reduce bloat.
2014-01-10 22:58:37 +01:00
Max Kellermann a1ced29279 db/upnp: use nullptr-terminated array
Reduce bloat.
2014-01-10 22:58:23 +01:00
Max Kellermann 791d6c1336 db/upnp/Directory: eliminate struct StackEl, use std::string
Reduces bloat.
2014-01-10 22:57:57 +01:00
Max Kellermann 10abb07960 db/upnp/Directory: make "attributes" a local variable
We only need it inside StartElement().  Reduces bloat.
2014-01-10 22:57:46 +01:00
Max Kellermann 040a5ddad5 db/upnp/Directory: move "res" tag handler to StartElement()
No need to handle this in EndElement() - in StartElement(), we already
have all we need.
2014-01-10 22:57:22 +01:00
Max Kellermann e7eb04954d db/upnp/Directory: don't use std::map to parse upnp:class
Reduce excessive bloat.
2014-01-10 22:57:16 +01:00
Max Kellermann 09b00fa4e3 db/upnp/Object: use strictly-typed enums
At the same time, rename the enum types and the class attributes, and
add an "UNKNOWN" type/class.  The latter avoids the "-1" hack.
2014-01-10 22:56:52 +01:00
Max Kellermann 74842fd6d4 db/upnp: getprop() returns const char *
Return the return value, instead returning it in a reference
parameter.  Reduces bloat by reducing unnecessary std::string usage.
2014-01-10 22:56:45 +01:00
Max Kellermann 15eedfbb12 db/upnp: don't set mtime, start_ms, end_ms
Not necessary or useful.
2014-01-10 09:01:28 +01:00
Max Kellermann cfc25e08dc db/upnp: use TagTable in upnpItemToSong()
Reduces bloat by eliminating one std::map.
2014-01-10 08:57:31 +01:00
Jean-Francois Dockes 406452f019 UPnP database plugin
[mk: renamed source files, applied coding style, reduced bloat, using
MPD's threading library, using MPD's error reporting and logging
library and refactoring, fixed lots of bugs]
2014-01-09 20:56:00 +01:00
Max Kellermann 0c34555b02 Directory: remove method Free() 2014-01-09 13:21:56 +01:00
Max Kellermann 83a988e2e4 db/proxy: allocate Directory instance on the stack 2014-01-09 13:21:09 +01:00
Max Kellermann 322b061632 DetachedSong: fork of struct Song
From now on, struct Song will be used by the database only, and
DetachedSong will be used by everybody else.  DetachedSong is easier
to use, but Song has lower overhead.
2014-01-09 09:05:58 +01:00
Max Kellermann ac1983eae3 tag/TagBuilder: rename Commit() to CommitNew() 2014-01-08 19:48:55 +01:00
Denis Krjuchkov acba9c0f61 TextFile: move to fs subsystem 2013-12-08 04:15:27 +06:00
Denis Krjuchkov c161bb287c db/SimpleDatabasePlugin.cxx: don't use CheckAccess with mode on Windows 2013-12-05 15:05:01 +06:00
Max Kellermann f90abe9530 include cleanup using iwyu 2013-11-28 11:50:54 +01:00
Max Kellermann d22acc59c9 db/proxy: implement method GetUpdateStamp() 2013-11-22 00:45:27 +01:00
Max Kellermann c064e8d62f DatabasePlugin: add method GetUpdateStamp()
Refactor SimpleDatabase::GetLastModified() to be generic for all
plugins.  Remove the SimpleDatabase assumption from db_stats_print(),
allowing it to be implemented by all database plugins.
2013-11-22 00:35:29 +01:00
Max Kellermann 8555b65c50 *: update copyright year to 2013 2013-10-30 23:37:06 +01:00
Max Kellermann 1dc8a9f0e7 db/proxy: remove obsolete #undefs 2013-10-30 20:51:41 +01:00
Max Kellermann a62d54425c db/proxy: auto-reconnect 2013-10-30 19:50:22 +01:00
Max Kellermann 7bb3987acc db/proxy: return server errors using "enum ack" 2013-10-30 16:04:21 +01:00
Max Kellermann 6a147a17af db/proxy: pass search/find to remote MPD 2013-10-30 10:00:57 +01:00
Max Kellermann 2b7529e905 db/proxy: pass SongFilter to the remote MPD in VisitUniqueTags() 2013-10-30 09:40:23 +01:00
Max Kellermann 1ed321f964 db/proxy: add missing nullptr check 2013-10-30 09:37:20 +01:00
Jean-Francois Dockes 205448c1e8 db/proxy: enable song matching 2013-10-29 20:58:35 +01:00
Max Kellermann 2d5413fc3b DatabaseSelection: use std::string 2013-10-29 20:36:52 +01:00
Max Kellermann 20597b3632 *: use nullptr instead of NULL 2013-10-28 23:58:17 +01:00
Max Kellermann a78b2d84ed TagType: rename enum tag_type to TagType 2013-10-20 13:32:59 +02:00
Max Kellermann ff626ac763 *: use references instead of pointers 2013-10-19 18:48:38 +02:00
Max Kellermann 59f8144c50 *: use nullptr instead of NULL 2013-10-19 18:19:03 +02:00
Max Kellermann abfbd55305 fs/Path: rename to AllocatedPath
The new class Path only holds a string pointer without being
responsible for allocation/deallocation.  The FileSystem.hxx library
accepts Path arguments instead of AllocatedPath, to avoid forcing
callers to allocate another string object.
2013-10-17 23:43:46 +02:00
Max Kellermann dbd88e6aef Client, ...: remove unnecessary glib.h include 2013-10-15 22:51:09 +02:00
Max Kellermann be2951b45f gcc.h: rename to Compiler.h 2013-10-15 09:21:59 +02:00
Max Kellermann 060814daa8 Log: new logging library API
Prepare to migrate away from GLib.  Currently, we're still using GLib
as a backend.
2013-10-02 08:57:55 +02:00
Max Kellermann 43675717b8 filesystem/Path: use std::string 2013-10-02 08:56:27 +02:00