aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* event_pipe: added pipe_event enum and callbacksMax Kellermann2009-01-011-10/+10
| | | | | | | | | 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.
* event_pipe: renamed functions from main_notify_* to event_pipe_*Max Kellermann2009-01-011-2/+2
| | | | Continuing the previous patch.
* main_notify: renamed source to event_pipe.cMax Kellermann2009-01-011-1/+1
| | | | | | We are going to migrate away from the concept of notifying the main thread. There should be events sent to it instead. This patch starts a series to implement that.
* Moving mixers to audio outputsViliam Mateicka2008-12-311-3/+2
|
* client: run client_manager_expire() in an idle eventMax Kellermann2008-12-311-1/+0
| | | | | | With the GLib main loop, the client manager can install its own event in case a client is expired. No need for main.c to call client_manager_expire() manually.
* main: export the main_loop variableMax Kellermann2008-12-301-1/+2
| | | | | Other libraries may need to access the main_loop reference, to add or remove events, or to call g_main_loop_quit().
* main: use the GLib main loopMax Kellermann2008-12-301-17/+33
| | | | | | | This is a rather huge patch, which unfortunately cannot be splitted. Instead of using our custom ioops.h library, convert everything to use the GLib main loop.
* listen: moved redirect_stdin() to daemon.cMax Kellermann2008-12-301-0/+2
| | | | | redirect_stdin() is a daemonization function, and disconnecting from the standard input is always a good idea for MPD.
* main: moved daemonize() to daemon.cMax Kellermann2008-12-301-59/+1
|
* main: disable non-portable code on WIN32Max Kellermann2008-12-291-0/+14
| | | | Disable changeToUser(), daemonize(), killFromPidFile().
* main: use g_setenv() instead of setenv()Max Kellermann2008-12-291-42/+1
| | | | Removed the fallback setenv() implementation for solaris.
* main: use GLib loggingMax Kellermann2008-12-291-33/+34
|
* removed os_compat.hMax Kellermann2008-12-291-1/+8
| | | | | Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
* tag & tag_pool: migrate from pthread to glib threadsThomas Jansen2008-12-281-0/+3
|
* songvec: migrate from pthread to glib threadsThomas Jansen2008-12-281-0/+3
|
* dirvec: migrate from pthread to glib threadsThomas Jansen2008-12-281-0/+3
|
* idle: migrate from pthread to glib threadsThomas Jansen2008-12-281-0/+2
|
* log: merged initLog() and open_log_files().Max Kellermann2008-12-281-3/+1
| | | | | | The logging library currently has 3 constructor functions: initLog(), open_log_files(), setup_log_output(), called in this order. Merged the first two.
* moved command line parser to cmdline.cMax Kellermann2008-12-271-137/+1
|
* disable archive API without pluginsMax Kellermann2008-12-271-1/+10
| | | | | When there are no archive plugins, we do not need the archive API at all. Drop all its overhead.
* new archive api, input_archive streamViliam Mateicka2008-12-161-0/+8
|
* update: added update_global_init() and update_global_finish()Max Kellermann2008-11-271-0/+2
| | | | | | 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.
* main: destroy the save_state timer on exitMax Kellermann2008-11-251-0/+2
| | | | Make valgrind happier.
* state_file: save state_file every 5 minutesMax Kellermann2008-11-211-0/+9
| | | | | | | | | | | | When MPD quits in a non-clean way, the state file isn't written, and on the next start, MPD time warps to the previous clean shutdown. Save the state file every 5 minutes; this will probably be configurable at a later time. Note that we don't set a wakeup timer for that: when there is no MPD traffic, MPD won't wake up to save the state file. This minor bug is tolerated, because usually there is no change in MPD's state when the main thread is idle.
* replay_gain: no CamelCaseMax Kellermann2008-11-111-1/+1
| | | | Renamed functions and variables.
* replay_gain: renamed sources to replay_gain.c, replay_gain.hMax Kellermann2008-11-111-1/+1
| | | | No CamelCase file names.
* main: print usage to stdoutMax Kellermann2008-11-051-26/+25
| | | | Using the logging library here is inappropriate.
* log: removed warning bufferMax Kellermann2008-11-051-1/+0
| | | | | The warning buffer is a complex piece of code for no good reason. Remove it and find a better solution, e.g. open the log file earlier.
* main: initialize locale (LC_CTYPE)Max Kellermann2008-11-051-0/+9
| | | | | | Initialize libc's locale functions. Currently, we are only interested in LC_CTYPE (character classification), because this is what is used by GLib's g_get_charset().
* path: no CamelCaseMax Kellermann2008-11-051-2/+2
| | | | Rename variables and functions.
* enable GLib threadingMax Kellermann2008-11-051-0/+3
| | | | | Call g_thread_init() from main() to enable the GLib features which make it thread safe.
* main: don't close all file descriptors on startupMax Kellermann2008-11-051-11/+0
| | | | | Removed closeAllFDs(). The caller is responsible for closing all file handles.
* music_pipe: renamed ob_* functions to music_pipe_*Max Kellermann2008-11-021-2/+2
| | | | Rename all functions to the new prefix.
* renamed outputBuffer.[ch] to pipe.[ch]Max Kellermann2008-11-021-1/+1
| | | | | | | No CamelCase in the file name. The output_buffer struct is going to be renamed to music_pipe. There are so many buffer levels in MPD, and calling this one "output buffer" is wrong, because it's not the last buffer before the music reaches the output devices.
* utils: use g_str_has_prefix() instead of prefixcmp()Max Kellermann2008-10-281-2/+3
| | | | Remove duplicated code from MPD.
* input_stream: no CamelCaseMax Kellermann2008-10-261-1/+1
| | | | Renamed all functions and variables.
* input_stream: renamed sources, no CamelCaseMax Kellermann2008-10-261-1/+1
| | | | Renamed inputStream.c and inputStream_file.c.
* input_stream: added input_stream_global_finish()Max Kellermann2008-10-261-0/+1
| | | | | The hook input_stream_global_finish() deinitializes global structures of all input stream implementations.
* command: no CamelCaseMax Kellermann2008-10-221-2/+2
| | | | Eliminate CamelCase in all public and static functions.
* mapper: moved musicDir initialization from path.cMax Kellermann2008-10-151-0/+3
| | | | | Moved the musicDir variable and its initialization code from path.c to mapper.c.
* command: added command "idle"Max Kellermann2008-10-141-0/+9
| | | | | | "idle" waits until something noteworthy happens on the server, e.g. song change, playlist modified, database updated. This allows clients to keep up to date without polling.
* changed package name to "mpd-mk", updated version numberMax Kellermann2008-10-141-1/+2
| | | | | | This git branch has become a real MPD fork now. Time to change the package name to the code name "mpd-mk". Set the version number to "0.14~git" to mark this as a non-released version.
* update: don't export updateDirectory()Max Kellermann2008-10-091-1/+2
| | | | | | | | 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().
* database: renamed functions, "db_" prefix and no CamelCaseMax Kellermann2008-10-081-6/+6
| | | | Yet another CamelCase removal patch.
* directory: moved code to database.cMax Kellermann2008-10-081-1/+1
| | | | | | Taming the directory.c monster, part II: move the database management stuff to database. directory.c should only contain code which works on directory objects.
* directory: moved code to update.cMax Kellermann2008-10-081-0/+1
| | | | | | 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.
* directory: remove "Mp3" referencesEric Wong2008-09-291-3/+3
| | | | | MPD has supported more audio formats than just MP3 for over five years...
* notify: added notify_deinit()Max Kellermann2008-09-241-0/+4
| | | | Destroy the mutex when it is not used anymore.
* directory: update do its work inside a threadEric Wong2008-09-231-1/+1
| | | | | | | | | A lot of the preparation was needed (and done in previous months) in making update thread-safe, but here it is. This was the first thing I made work inside a thread when I started mpd-uclinux many years ago, and also the last thing I've done in mainline mpd to work inside a thread, go figure.
* start using prefixcmp()Eric Wong2008-09-231-1/+1
| | | | | LOC reduction and less noise makes things easier for tired old folks to follow.