Updated Finnish translation
[rhythmbox.git] / player / rb-recorder.h
blob011141d9d51199829bd15943caf725d0976a506b
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
2 /*
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>
28 G_BEGIN_DECLS
30 typedef enum
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
38 } RBRecorderError;
40 typedef enum {
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
47 } RBRecorderAction;
49 typedef enum {
50 RB_RECORDER_RESPONSE_NONE = 0,
51 RB_RECORDER_RESPONSE_CANCEL = -1,
52 RB_RECORDER_RESPONSE_ERASE = -2,
53 RB_RECORDER_RESPONSE_RETRY = -3
54 } RBRecorderResponse;
56 typedef enum {
57 RB_RECORDER_RESULT_ERROR,
58 RB_RECORDER_RESULT_CANCEL,
59 RB_RECORDER_RESULT_FINISHED,
60 RB_RECORDER_RESULT_RETRY
61 } RBRecorderResult;
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
78 GObject parent;
80 RBRecorderPrivate *priv;
81 } RBRecorder;
83 typedef struct
85 GObjectClass parent_class;
86 } RBRecorderClass;
89 GType rb_recorder_get_type (void);
91 RBRecorder * rb_recorder_new (GError **error);
93 void rb_recorder_open (RBRecorder *recorder,
94 const char *uri,
95 const char *cdtext,
96 GError **error);
98 gboolean rb_recorder_opened (RBRecorder *recorder);
100 void rb_recorder_close (RBRecorder *recorder,
101 GError **error);
103 void rb_recorder_write (RBRecorder *recorder,
104 GError **error);
105 void rb_recorder_pause (RBRecorder *recorder,
106 GError **error);
108 char * rb_recorder_get_default_device (void);
110 char * rb_recorder_get_device (RBRecorder *recorder,
111 GError **error);
113 gboolean rb_recorder_set_device (RBRecorder *recorder,
114 const char *device,
115 GError **error);
117 void rb_recorder_set_tmp_dir (RBRecorder *recorder,
118 const char *path,
119 GError **error);
121 gint64 rb_recorder_get_media_length (RBRecorder *recorder,
122 GError **error);
124 int rb_recorder_burn (RBRecorder *recorder,
125 int speed,
126 GError **error);
127 int rb_recorder_burn_cancel (RBRecorder *recorder);
129 gboolean rb_recorder_enabled (void);
131 G_END_DECLS
133 #endif /* __RB_RECORDER_H__ */