aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* conf: const pointers in block get functionsMax Kellermann2009-01-251-1/+1
| | | | | All config_get_block_*() functions should accept constant config_param pointers.
* stored_playlist: moved configuration variables from playlist.cMax Kellermann2009-01-251-0/+2
| | | | | Don't declare and export variables specific to stored playlists in playlist.c/playlist.h.
* player_thread: start decoder thread in player threadMax Kellermann2009-01-251-2/+0
| | | | | Start the decoder thread when the player thread starts. The decoder thread is already stopped by the player thread.
* sticker: new library for storing dynamic information about songsMax Kellermann2009-01-191-0/+12
| | | | | | | "Stickers" are pieces of information attached to existing MPD objects (e.g. song files, directories, albums). Clients can create arbitrary name/value pairs. MPD itself does not assume any special meaning in them.
* daemon: pass "detach" flag to daemonize()Max Kellermann2009-01-181-1/+1
| | | | | This way, we don't have to pass the full "Options" object to daemonize().
* daemon: added daemonize_init(), daemonize_finish()Max Kellermann2009-01-181-1/+4
| | | | | | The constructor/destructor functions parse and free the configuration properly. This way, we don't have to load the pid file path more than once.
* main: moved the save_state timer to state_file.cMax Kellermann2009-01-181-18/+0
| | | | The state_file library should manage its own regular saves.
* state_file: added state_file_init() and state_file_finish()Max Kellermann2009-01-181-2/+3
| | | | | The constructor/destructor interface should hide the functions read_state_file() and write_state_file().
* conf: added config_get_path()Max Kellermann2009-01-181-5/+6
| | | | config_get_path() is an simpler interface than parseConfigFilePath().
* removed playerData.cMax Kellermann2009-01-181-5/+55
| | | | | Fetch the configuration variables buffered_chunks and buffered_before_play just when they are needed.
* main: moved code to daemon.cMax Kellermann2009-01-181-98/+3
| | | | | Moved changeToUser(), cleanUpPidFile(), killFromPidFile() to daemon.c. These are daemonization functions.
* mapper: make the music_directory optionalMax Kellermann2009-01-181-1/+10
| | | | Without a music_directory, MPD is an excellent streaming client.
* database: pass database file name to db_init()Max Kellermann2009-01-181-1/+4
| | | | Don't include conf.h in database.c.
* stats: use GTimer instead of time(NULL)Max Kellermann2009-01-181-0/+1
| | | | | time(NULL) shows the wrong results when the machine's clock is changed.
* stats: no CamelCaseMax Kellermann2009-01-181-1/+1
| | | | Renamed functions and types.
* conf: no CamelCase, part IMax Kellermann2009-01-171-5/+7
| | | | Renamed functions, types, variables.
* main: remove "save_state" timer event on exitMax Kellermann2009-01-101-1/+4
|
* main: deinitialize main_notify on exitMax Kellermann2009-01-101-0/+1
|
* added missing explicit config.h includesMax Kellermann2009-01-081-1/+1
|
* configure.ac: use AC_CHECK_HEADERS to check for locale.hMax Kellermann2009-01-051-2/+2
| | | | | AC_CHECK_HEADERS defines HAVE_LOCALE_H, so we don't have to manually define HAVE_LOCALE.
* database: use stdboolMax Kellermann2009-01-041-2/+3
| | | | Make db_load(), db_save() and db_check() return bool instead of int.
* database: db_init() initializes library, does not updateMax Kellermann2009-01-041-1/+10
| | | | | For updating the database, directory_update_init() should be called explicitly.
* don't exit after --create-dbMax Kellermann2009-01-041-6/+1
| | | | | Start the daemon after --create-db. This makes --create-db a flag which discards the old database and starts with a fresh one.
* event_pipe: moved variable "main_task" to main.cMax Kellermann2009-01-031-0/+2
|
* main: include main.h, fix dependenciesMax Kellermann2009-01-021-0/+1
|
* event_pipe: replaced PIPE_EVENT_SIGNAL with main_notifyMax Kellermann2009-01-021-0/+3
| | | | | | There is only one location using PIPE_EVENT_SIGNAL: to synchronize player_command() with player_command_finished(). Use the "notify" library instead of the event_pipe here.
* 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.