aboutsummaryrefslogtreecommitdiffstats
path: root/src/db (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* db/upnp: use iterator in Namei()Max Kellermann2014-01-211-4/+5
|
* db/upnp: move "objid" declaration downMax Kellermann2014-01-211-2/+2
| | | | Don't allocate the object when it's not needed.
* db/upnp: eliminate redundant Namei() parameter "oobjid"Max Kellermann2014-01-211-12/+7
| | | | | The caller should better obtain the object id from the returned UPnPDirObject instance.
* db/upnp: remove redundant objid.empty() check from VisitServer()Max Kellermann2014-01-211-4/+0
| | | | If Namei() succeeds, the object id is guaranteed to be set.
* db/upnp: use std::move() to extract server nameMax Kellermann2014-01-211-1/+1
| | | | Reduce runtime overhead.
* db/upnp: use vector::front() instead of [0]Max Kellermann2014-01-211-5/+5
|
* db/upnp: don't use stringToTokens() in ParseDuration()Max Kellermann2014-01-211-4/+20
| | | Reduce bloat.
* db/upnp: don't construct redundant empty vector<string> in Visit()Max Kellermann2014-01-211-1/+1
| | | | We know already that vpath is empty, let's use this instance.
* db/upnp: simplify GetSong()Max Kellermann2014-01-211-20/+18
|
* LightSong: add attribute "real_uri"Max Kellermann2014-01-211-24/+18
| | | | | The UPnP database plugin can now show relative song URIs for remote songs.
* db/upnp: fix empty song URIMax Kellermann2014-01-211-3/+6
| | | | Fall back to UPnPDirObject::url if there is no override.
* LightSong: new class to be used by DatabasePlugin callbacksMax Kellermann2014-01-196-110/+142
| | | | | Detach the Song class completely from the public API, only to be used by SimpleDatabase and the update thread.
* db/proxy: simplify error handling in GetSong()Max Kellermann2014-01-191-11/+9
| | | | | Check mpd_response_finish() before using mpd_song. Don't skip this check even if the mpd_song is non-nullptr.
* db/simple: make borrowed_song_count "mutable"Max Kellermann2014-01-192-3/+3
| | | | Simpler to use than const_cast.
* Song: embed the Tag object statically into class SongMax Kellermann2014-01-192-2/+2
| | | | | Reduces overhead because we need to manage only one memory allocation. According to valgrind/massif, we save 7%.
* db/upnp: move Tag from UPnPDirObject to SongMax Kellermann2014-01-181-11/+14
| | | | | The UPnPDirObject is a temporary object, we can move its contents. This reduces runtime overhead.
* db/upnp/Discovery: eliminate attribute "last_seen"Max Kellermann2014-01-182-6/+4
|
* db/upnp/Discovery: use monotonic clock instead of time()Max Kellermann2014-01-182-10/+18
|
* db/upnp/Discovery: eliminate full copy in getServer()Max Kellermann2014-01-182-9/+17
|
* db/upnp: use getServer() in Visit()Max Kellermann2014-01-181-17/+9
| | | | Reduce bloat.
* db/upnp/Discovery: eliminate Error attributeMax Kellermann2014-01-183-51/+32
| | | | | Move code to method Start() and add Error& parameters to several methods.
* db/upnp: remove unnecessary m_superdir nullptr checksMax Kellermann2014-01-181-3/+3
|
* db/upnp: pass ContentDirectoryService referencesMax Kellermann2014-01-181-27/+27
|
* db/upnp: cache m_path.back()Max Kellermann2014-01-182-16/+18
|
* db/upnp: add UpnpMakeAction() helper functionMax Kellermann2014-01-182-30/+78
|
* db/upnp/ixmlwrap: getFirstElementValue() returns const char *Max Kellermann2014-01-185-27/+33
| | | | Eliminate the std::string bloat.
* db/upnp: merge duplicate nullptr checkMax Kellermann2014-01-181-2/+2
|
* db/upnp: free IXML_Document *request manuallyMax Kellermann2014-01-181-38/+40
|
* db/upnp/Device: move code to method Parse()Max Kellermann2014-01-184-31/+39
| | | | Forward the Error to the caller.
* db/upnp/Device: use ContentDirectoryDescriptor's move operatorMax Kellermann2014-01-183-7/+7
| | | | Reduce bloat.
* db/upnp/Discovery: don't copy XML to std::stringMax Kellermann2014-01-183-4/+4
| | | | Pass "const char *" to Expat.
* db/upnp/Discovery: fix memory leakMax Kellermann2014-01-181-0/+1
|
* db/upnp: remove unused typedef DevServItMax Kellermann2014-01-181-2/+0
|
* db/upnp: use move operator to assign XML CDATAMax Kellermann2014-01-182-12/+12
| | | | Reduce runtime bloat.
* db/upnp/Util: trimstring() constructs string from bufferMax Kellermann2014-01-184-17/+15
| | | | | Reduce overhead by omitting the part of the buffer that consists only of whitespace.
* db/upnp/Discovery: free the response bodyMax Kellermann2014-01-181-0/+1
| | | | Memory leak.
* db/upnp/Discovery: don't copy the response bodyMax Kellermann2014-01-181-2/+1
| | | | Bloat.
* db/upnp: don't hold mutex while downloading device descriptionMax Kellermann2014-01-181-1/+1
| | | | Must not perform blocking I/O while holding a mutex.
* db/upnp: don't use WorkQueue for _ADVERTISEMENT_BYEBYEMax Kellermann2014-01-182-36/+30
| | | | Remove the ContentDirectoryDescriptor right away. Reduces bloat.
* db/upnp: include cleanupMax Kellermann2014-01-181-1/+0
|
* db/upnp: don't use LazyDatabaseMax Kellermann2014-01-181-2/+1
| | | | Now that MPD forks early, this workaround is obsolete.
* db/upnp/Discovery: move callbacks and data structures into classMax Kellermann2014-01-173-72/+80
| | | | Eliminate global variables.
* db/upnp: split cluCallback()Max Kellermann2014-01-171-15/+29
|
* db/upnp: add local reference variablesMax Kellermann2014-01-171-11/+16
| | | | Prepare to refactor some code.
* db/upnp: move the LibUPnP instance to class UpnpDatabaseMax Kellermann2014-01-167-77/+49
| | | | Delete the object when closing the database.
* db/upnp: remove useless static MutexMax Kellermann2014-01-161-6/+0
|
* db/upnp: move the UPnPDeviceDirectory instance to class UpnpDatabaseMax Kellermann2014-01-163-19/+8
| | | | Delete the object when closing the database.
* db/upnp: don't initialize attributes to nullptrMax Kellermann2014-01-161-4/+0
| | | | Not necessary, these are not used.
* db/upnp: remove redundant m_root nullptr checksMax Kellermann2014-01-161-5/+1
|
* db/upnp/WorkQueue: use emplace() and std::move()Max Kellermann2014-01-161-3/+4
|