1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
3 * arch-tag: Interface to audio recorder backend
5 * Copyright (C) 2004 William Jon McCann <mccann@jhu.edu>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public
18 * License along with this program; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20 * Boston, MA 02110-1301 USA.
23 #ifndef __RB_RECORDER_H__
24 #define __RB_RECORDER_H__
26 #include <glib-object.h>
32 RB_RECORDER_ERROR_NO_INPUT_PLUGIN
,
33 RB_RECORDER_ERROR_NO_TYPEFIND_PLUGIN
,
34 RB_RECORDER_ERROR_NO_DEMUX_PLUGIN
,
35 RB_RECORDER_ERROR_NO_AUDIO
,
36 RB_RECORDER_ERROR_GENERAL
,
37 RB_RECORDER_ERROR_INTERNAL
41 RB_RECORDER_ACTION_UNKNOWN
,
42 RB_RECORDER_ACTION_FILE_CONVERTING
,
43 RB_RECORDER_ACTION_DISC_PREPARING_WRITE
,
44 RB_RECORDER_ACTION_DISC_WRITING
,
45 RB_RECORDER_ACTION_DISC_FIXATING
,
46 RB_RECORDER_ACTION_DISC_BLANKING
50 RB_RECORDER_RESPONSE_NONE
= 0,
51 RB_RECORDER_RESPONSE_CANCEL
= -1,
52 RB_RECORDER_RESPONSE_ERASE
= -2,
53 RB_RECORDER_RESPONSE_RETRY
= -3
57 RB_RECORDER_RESULT_ERROR
,
58 RB_RECORDER_RESULT_CANCEL
,
59 RB_RECORDER_RESULT_FINISHED
,
60 RB_RECORDER_RESULT_RETRY
63 #define RB_RECORDER_ERROR rb_recorder_error_quark ()
65 GQuark
rb_recorder_error_quark (void);
67 #define RB_TYPE_RECORDER (rb_recorder_get_type ())
68 #define RB_RECORDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RB_TYPE_RECORDER, RBRecorder))
69 #define RB_RECORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RB_TYPE_RECORDER, RBRecorderClass))
70 #define RB_IS_RECORDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RB_TYPE_RECORDER))
71 #define RB_IS_RECORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RB_TYPE_RECORDER))
72 #define RB_RECORDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RB_TYPE_RECORDER, RBRecorderClass))
74 typedef struct _RBRecorderPrivate RBRecorderPrivate
;
76 typedef struct _RBRecorder
80 RBRecorderPrivate
*priv
;
85 GObjectClass parent_class
;
89 GType
rb_recorder_get_type (void);
91 RBRecorder
* rb_recorder_new (GError
**error
);
93 void rb_recorder_open (RBRecorder
*recorder
,
98 gboolean
rb_recorder_opened (RBRecorder
*recorder
);
100 void rb_recorder_close (RBRecorder
*recorder
,
103 void rb_recorder_write (RBRecorder
*recorder
,
105 void rb_recorder_pause (RBRecorder
*recorder
,
108 char * rb_recorder_get_default_device (void);
110 char * rb_recorder_get_device (RBRecorder
*recorder
,
113 gboolean
rb_recorder_set_device (RBRecorder
*recorder
,
117 void rb_recorder_set_tmp_dir (RBRecorder
*recorder
,
121 gint64
rb_recorder_get_media_length (RBRecorder
*recorder
,
124 int rb_recorder_burn (RBRecorder
*recorder
,
127 int rb_recorder_burn_cancel (RBRecorder
*recorder
);
129 gboolean
rb_recorder_enabled (void);
133 #endif /* __RB_RECORDER_H__ */