Commit Graph

16 Commits

Author SHA1 Message Date
Max Kellermann
c6cbcc2c25 copyright year 2011 2011-01-29 10:13:54 +01:00
Avuton Olrich
9d3865cb95 Update copyright notices. 2009-12-31 20:58:43 -08:00
Max Kellermann
3e8bdb9384 update: added missing stdbool.h include 2009-09-25 16:43:33 +02:00
Max Kellermann
89ba540e6d command: added command "rescan"
"rescan" is the same as "update", but it discards existing songs in
the database.
2009-09-24 21:55:40 +02:00
Max Kellermann
b0e1a3d34c update: pass const string to update_enqueue()
Duplicate the path string within update.c, do not expect an allocated
string as parameter.
2009-09-24 21:39:43 +02:00
Max Kellermann
1cc4914b24 update: renamed directory_update_init() to update_enqueue() 2009-09-24 17:57:39 +02:00
Avuton Olrich
0aee49bdf8 all: Update copyright header.
This updates the copyright header to all be the same, which is
pretty much an update of where to mail request for a copy of the GPL
and the years of the MPD project. This also puts all committers under
'The Music Player Project' umbrella. These entries should go
individually in the AUTHORS file, for consistancy.
2009-03-13 11:51:55 -07:00
Max Kellermann
b3e2635ac1 event_pipe: added pipe_event enum and callbacks
Make the event_pipe (formerly main_notify) send/receive a set of
events, with a callback for each one.

The default event PIPE_EVENT_SIGNAL does not have a callback.  It
is still there for waking up the main thread, when it is waiting for
the player thread.
2009-01-01 18:22:11 +01:00
Max Kellermann
ced4abcd64 update: added update_global_init() and update_global_finish()
Those two functions are called when MPD starts and exits.  It allows
the update library to perform global initialization and
deinitialization.  The implementations are currently empty.
2008-11-27 19:34:54 +01:00
Max Kellermann
ea515494cb added prefix to header macros
"LOG_H" is a macro which is also used by ffmpeg/log.h.  This is
ffmpeg's fault, because short macros should be reserved for
applications, but since it's always a good idea to choose prefixed
macro names, even for applications, we are going to do that in MPD.
2008-10-31 09:19:53 +01:00
Max Kellermann
4beba26c61 update: make the job id unsigned
Since the return value cannot be -1 anymore, we can make it unsigned.
2008-10-09 19:20:05 +02:00
Max Kellermann
f1022bcc12 update: job ID must be positive
The documentation for directory_update_init() was incorrect: a job ID
must be positive, not non-negative.  If the update queue is full and
no job was created, it makes more sense to return 0 instead of -1,
because it is more consistent with the return value of isUpdatingDB().
2008-10-09 19:17:44 +02:00
Max Kellermann
7dd099a60f update: don't export updateDirectory()
If the user requests database update during startup, call
directory_update_init().  This should be changed to fully asynchronous
update later.

For this to work, main_notify has to be initialized before db_init().
2008-10-09 19:11:54 +02:00
Max Kellermann
25f67da58c directory: converted typedef Directory to struct directory
The struct can be forward-declared by other headers, which relaxes the
header dependencies.
2008-10-08 10:49:05 +02:00
Max Kellermann
3c1142cbcb update: merged exploreDirectory() into updateDirectory()
exploreDirectory() duplicates some code in updateDirectory().  Merge
both functions, and use directory_is_empty() to determine whether
update or explore mode should be used.
2008-10-08 10:48:55 +02:00
Max Kellermann
7b9bed8398 directory: moved code to update.c
The source directory.c mixes several libraries: directory object
management, database management and database update, resulting in a
1000+ line monster.  Move the whole database update code to update.c.
2008-10-08 10:48:48 +02:00