MPD 0.17~git
src/io_thread.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2003-2011 The Music Player Daemon Project
00003  * http://www.musicpd.org
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License along
00016  * with this program; if not, write to the Free Software Foundation, Inc.,
00017  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00018  */
00019 
00020 #ifndef MPD_IO_THREAD_H
00021 #define MPD_IO_THREAD_H
00022 
00023 #include <glib.h>
00024 #include <stdbool.h>
00025 
00026 void
00027 io_thread_init(void);
00028 
00029 bool
00030 io_thread_start(GError **error_r);
00031 
00037 void
00038 io_thread_run(void);
00039 
00045 void
00046 io_thread_quit(void);
00047 
00048 void
00049 io_thread_deinit(void);
00050 
00051 G_GNUC_PURE
00052 GMainContext *
00053 io_thread_context(void);
00054 
00058 G_GNUC_PURE
00059 bool
00060 io_thread_inside(void);
00061 
00062 guint
00063 io_thread_idle_add(GSourceFunc function, gpointer data);
00064 
00065 G_GNUC_MALLOC
00066 GSource *
00067 io_thread_timeout_add(guint interval_ms, GSourceFunc function, gpointer data);
00068 
00069 G_GNUC_MALLOC
00070 GSource *
00071 io_thread_timeout_add_seconds(guint interval,
00072                               GSourceFunc function, gpointer data);
00073 
00077 gpointer
00078 io_thread_call(GThreadFunc function, gpointer data);
00079 
00080 #endif