2
* Copyright (C) 2005 Colin Walters <walters@verbum.org>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* The Rhythmbox authors hereby grant permission for non-GPL compatible
10
* GStreamer plugins to be used and distributed together with GStreamer
11
* and Rhythmbox. This permission is above and beyond the permissions granted
12
* by the GPL license by which Rhythmbox is covered. If you modify this code
13
* you may extend this exception to your version of the code, but you are not
14
* obligated to do so. If you do not wish to do so, delete this exception
15
* statement from your version.
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU General Public License for more details.
22
* You should have received a copy of the GNU General Public License
23
* along with this program; if not, write to the Free Software
24
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
31
#include <glib-object.h>
35
#define RB_TYPE_THREAD (rb_thread_get_type ())
36
#define RB_THREAD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_THREAD, RBThread))
37
#define RB_THREAD_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_THREAD, RBThreadClass))
38
#define RB_IS_THREAD(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_THREAD))
39
#define RB_IS_THREAD_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_THREAD))
40
#define RB_THREAD_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_THREAD, RBThreadClass))
42
typedef struct RBThreadPrivate RBThreadPrivate;
48
RBThreadPrivate *priv;
56
typedef gpointer (*RBThreadActionFunc) (gpointer data, gpointer user_data, gint *exit_flag);
57
typedef void (*RBThreadResultFunc) (gpointer data, gpointer user_data);
58
typedef void (*RBThreadActionDestroyFunc) (gpointer data, gpointer user_data);
59
typedef void (*RBThreadResultDestroyFunc) (gpointer result, gpointer user_data);
61
GType rb_thread_get_type (void);
63
RBThread * rb_thread_new (GMainContext *context,
64
RBThreadActionFunc action_cb,
65
RBThreadResultFunc result_cb,
66
RBThreadActionDestroyFunc action_destroy_func,
67
RBThreadResultDestroyFunc result_destroy_func,
70
void rb_thread_push_action (RBThread *thread,
73
void rb_thread_terminate (RBThread *thread);
77
#endif /* __RB_THREAD_H */