~ubuntu-branches/debian/experimental/brasero/experimental

« back to all changes in this revision

Viewing changes to libbrasero-media/brasero-media.h

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette, Pedro Fragoso, Luca Bruno, Josselin Mouette, Emilio Pozuelo Monfort
  • Date: 2009-06-24 18:59:46 UTC
  • mfrom: (1.2.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624185946-iyxkgf3gjptir5y3
Tags: 2.26.2-1
[ Pedro Fragoso ]
* Add myself to Maintainer field
  - Thanks Ondřej Surý
* New upstream version (Closes: #528945)
  - Split package into brasero, libbrasero-media0 and libbrasero-dev
  - Add Replaces to libbrasero-media0
  - Bump libgtk to 2.14.0
  - Remove libnotify Build-dep
  - Add Build-dep libnautilus-extension-dev (>= 2.22.2)
    and install it.
  - Add Build-dep to libsm-dev
  - Add Build-dep on intltool
* Install omf files to prevent crash on Help
* Move gstreamer0.10-plugins-bad to Suggests, and add
  dvdauthor and vcdimager
* Recommends gvfs (Closes: #491827)
* Pass --disable-scrollkeeper in DEB_CONFIGURE_EXTRA_FLAGS
* debian/patches/007-fix-gnome-doc-utils-path.patch:
  - Removed, not needed anymore
* debian/patches/008-fix-volume-identifier-crash.patch:
  - Removed, merged upstream
* debian/patches/011_nautilus_menu_move.patch:
 - Move CD/DVD Creator Menu to Acessories, taken from Ubuntu

[ Luca Bruno ]
* debian/control.in:
  - Add Build-Depend gtk-doc-tools 1.9.
* debian/patches/006-fix-libdvdcss.patch:
  - Removed as applied upstream.

[ Josselin Mouette ]
* New upstream release.
* Update build-dependencies.
* Move the translations and data to a new brasero-common package.
* Rewrite the descriptions.
* Add -dev depends to the development package.
* Remove inappropriate recommends in the library package.
* Let’s not forget dvd+rw-tools so that we can write DVDs too.
* Rework dependencies accordingly.
* Put the nautilus extension in brasero.
* Conflict against nautilus-cd-burner to avoid having two burning 
  extensions.
* Include clean-la.mk and gnome-version.mk; build-depend on 
  gnome-pkg-tools 0.7.
* Don’t run dh_makeshlibs on brasero and libbrasero-plugins.
* 011_nautilus_menu_move.patch: add NoDisplay=true, this icon is 
  duplicating existing functionality (brasero icon in sound&video 
  menu, and nautilus autorun).
* Update list of copyright holders.

[ Emilio Pozuelo Monfort ]
* debian/copyright: updated.

[ Josselin Mouette ]
* copyright: improve indentation, and point to versioned LGPL.
* 090_relibtoolize.patch: add a relibtoolization patch to avoid the 
  rpath crap.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 
2
/*
 
3
 * Brasero
 
4
 * Copyright (C) Philippe Rouquier 2005-2009 <bonfire-app@wanadoo.fr>
 
5
 *
 
6
 * Brasero is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation; either version 2 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * The Brasero authors hereby grant permission for non-GPL compatible
 
12
 * GStreamer plugins to be used and distributed together with GStreamer
 
13
 * and Brasero. This permission is above and beyond the permissions granted
 
14
 * by the GPL license by which Brasero is covered. If you modify this code
 
15
 * you may extend this exception to your version of the code, but you are not
 
16
 * obligated to do so. If you do not wish to do so, delete this exception
 
17
 * statement from your version.
 
18
 * 
 
19
 * Brasero is distributed in the hope that it will be useful,
 
20
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
21
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
22
 * GNU Library General Public License for more details.
 
23
 * 
 
24
 * You should have received a copy of the GNU General Public License
 
25
 * along with this program; if not, write to:
 
26
 *      The Free Software Foundation, Inc.,
 
27
 *      51 Franklin Street, Fifth Floor
 
28
 *      Boston, MA  02110-1301, USA.
 
29
 */
 
30
 
 
31
#ifndef _BURN_MEDIA_H
 
32
#define _BURN_MEDIA_H
 
33
 
 
34
#include <glib.h>
 
35
 
 
36
G_BEGIN_DECLS
 
37
 
 
38
/**
 
39
 * Some needed information about the library
 
40
 */
 
41
 
 
42
#define LIBBRASERO_MEDIA_VERSION_MAJOR                                          \
 
43
        2
 
44
#define LIBBRASERO_MEDIA_VERSION_MINOR                                          \
 
45
        26
 
46
#define LIBBRASERO_MEDIA_VERSION_MICRO                                          \
 
47
        2
 
48
#define LIBBRASERO_MEDIA_AGE                                                    \
 
49
        111
 
50
#define LIBBRASERO_MEDIA_INSTALL                                                        \
 
51
        "/usr/local"
 
52
 
 
53
/**
 
54
 * To start and stop the library
 
55
 */
 
56
 
 
57
void
 
58
brasero_media_library_start (void);
 
59
 
 
60
void
 
61
brasero_media_library_stop (void);
 
62
 
 
63
GOptionGroup *
 
64
brasero_media_get_option_group (void);
 
65
 
 
66
/**
 
67
 * Errors
 
68
 */
 
69
 
 
70
GQuark brasero_media_quark (void);
 
71
 
 
72
/**
 
73
 * BRASERO_MEDIA_ERROR:
 
74
 *
 
75
 * The GQuark used for BraseroMediaError
 
76
 */
 
77
#define BRASERO_MEDIA_ERROR brasero_media_quark()
 
78
 
 
79
/**
 
80
 * BraseroMediaError:
 
81
 *
 
82
 * Error codes returned by libbrasero-media
 
83
 *
 
84
 */
 
85
typedef enum {
 
86
        BRASERO_MEDIA_ERROR_NONE,
 
87
        BRASERO_MEDIA_ERROR_GENERAL,
 
88
        BRASERO_MEDIA_ERROR_IMAGE_INVALID,
 
89
} BraseroMediaError;
 
90
 
 
91
/**
 
92
 * BraseroMedia:
 
93
 *
 
94
 * This enum allows to define all characteristics for a media (closed, writable, ...)
 
95
 * and identify all types of optical media.
 
96
 *
 
97
 */
 
98
typedef enum {
 
99
        BRASERO_MEDIUM_UNSUPPORTED              = -2,
 
100
        BRASERO_MEDIUM_BUSY                     = -1,
 
101
        BRASERO_MEDIUM_NONE                     = 0,
 
102
 
 
103
        /* types */
 
104
        BRASERO_MEDIUM_FILE                     = 1,
 
105
 
 
106
        BRASERO_MEDIUM_CD                       = 1 << 1,
 
107
 
 
108
        BRASERO_MEDIUM_DVD                      = 1 << 2,
 
109
 
 
110
        BRASERO_MEDIUM_BD                       = 1 << 3,
 
111
 
 
112
        /* subtype for DVD and BD types */
 
113
        BRASERO_MEDIUM_DUAL_L                   = 1 << 4,
 
114
 
 
115
        /* DVD and DVD DL subtypes */
 
116
        BRASERO_MEDIUM_RAM                      = 1 << 5,
 
117
        BRASERO_MEDIUM_PLUS                     = 1 << 6,
 
118
        BRASERO_MEDIUM_SEQUENTIAL               = 1 << 7,
 
119
        BRASERO_MEDIUM_RESTRICTED               = 1 << 8,       /* DVD-RW only */
 
120
 
 
121
        /* DVD-R dual layer only subtype */
 
122
        BRASERO_MEDIUM_JUMP                     = 1 << 9,
 
123
 
 
124
        /* BD subtypes */
 
125
        BRASERO_MEDIUM_RANDOM                   = 1 << 10,
 
126
        BRASERO_MEDIUM_SRM                      = 1 << 11,
 
127
        BRASERO_MEDIUM_POW                      = 1 << 12,      /* This is Pseudo OverWrite */
 
128
 
 
129
        /* discs attributes */
 
130
        BRASERO_MEDIUM_REWRITABLE               = 1 << 14,
 
131
        BRASERO_MEDIUM_WRITABLE                 = 1 << 15,
 
132
        BRASERO_MEDIUM_ROM                      = 1 << 16,
 
133
 
 
134
        /* status of the disc */
 
135
        BRASERO_MEDIUM_BLANK                    = 1 << 17,
 
136
        BRASERO_MEDIUM_CLOSED                   = 1 << 18,
 
137
        BRASERO_MEDIUM_APPENDABLE               = 1 << 19,
 
138
 
 
139
        /* Only used for DVD+RW, DVD-RW restricted */
 
140
        BRASERO_MEDIUM_UNFORMATTED              = 1 << 20,
 
141
 
 
142
        BRASERO_MEDIUM_PROTECTED                = 1 << 21,
 
143
        BRASERO_MEDIUM_HAS_DATA                 = 1 << 22,
 
144
        BRASERO_MEDIUM_HAS_AUDIO                = 1 << 23,
 
145
} BraseroMedia;
 
146
 
 
147
#define BRASERO_MEDIUM_CDROM            (BRASERO_MEDIUM_CD|             \
 
148
                                         BRASERO_MEDIUM_ROM)
 
149
#define BRASERO_MEDIUM_CDR              (BRASERO_MEDIUM_CD|             \
 
150
                                         BRASERO_MEDIUM_WRITABLE)
 
151
#define BRASERO_MEDIUM_CDRW             (BRASERO_MEDIUM_CD|             \
 
152
                                         BRASERO_MEDIUM_REWRITABLE)
 
153
#define BRASERO_MEDIUM_DVD_ROM          (BRASERO_MEDIUM_DVD|            \
 
154
                                         BRASERO_MEDIUM_ROM)
 
155
#define BRASERO_MEDIUM_DVDR             (BRASERO_MEDIUM_DVD|            \
 
156
                                         BRASERO_MEDIUM_SEQUENTIAL|     \
 
157
                                         BRASERO_MEDIUM_WRITABLE)
 
158
#define BRASERO_MEDIUM_DVDRW            (BRASERO_MEDIUM_DVD|            \
 
159
                                         BRASERO_MEDIUM_SEQUENTIAL|     \
 
160
                                         BRASERO_MEDIUM_REWRITABLE)
 
161
#define BRASERO_MEDIUM_DVDRW_RESTRICTED (BRASERO_MEDIUM_DVD|            \
 
162
                                         BRASERO_MEDIUM_REWRITABLE|     \
 
163
                                         BRASERO_MEDIUM_RESTRICTED)
 
164
#define BRASERO_MEDIUM_DVDR_DL          (BRASERO_MEDIUM_DVD|            \
 
165
                                         BRASERO_MEDIUM_DUAL_L|         \
 
166
                                         BRASERO_MEDIUM_WRITABLE|       \
 
167
                                         BRASERO_MEDIUM_SEQUENTIAL)
 
168
#define BRASERO_MEDIUM_DVDR_JUMP_DL     (BRASERO_MEDIUM_DVD|            \
 
169
                                         BRASERO_MEDIUM_DUAL_L|         \
 
170
                                         BRASERO_MEDIUM_WRITABLE|       \
 
171
                                         BRASERO_MEDIUM_JUMP)
 
172
#define BRASERO_MEDIUM_DVDR_PLUS        (BRASERO_MEDIUM_DVD|            \
 
173
                                         BRASERO_MEDIUM_WRITABLE|       \
 
174
                                         BRASERO_MEDIUM_PLUS)
 
175
#define BRASERO_MEDIUM_DVDRW_PLUS       (BRASERO_MEDIUM_DVD|            \
 
176
                                         BRASERO_MEDIUM_REWRITABLE|     \
 
177
                                         BRASERO_MEDIUM_PLUS)
 
178
#define BRASERO_MEDIUM_DVDR_PLUS_DL     (BRASERO_MEDIUM_DVD|            \
 
179
                                         BRASERO_MEDIUM_DUAL_L|         \
 
180
                                         BRASERO_MEDIUM_WRITABLE|       \
 
181
                                         BRASERO_MEDIUM_PLUS)
 
182
#define BRASERO_MEDIUM_DVDRW_PLUS_DL    (BRASERO_MEDIUM_DVD|            \
 
183
                                         BRASERO_MEDIUM_DUAL_L|         \
 
184
                                         BRASERO_MEDIUM_REWRITABLE|     \
 
185
                                         BRASERO_MEDIUM_PLUS)
 
186
 
 
187
#define BRASERO_MEDIUM_DVD_RAM          (BRASERO_MEDIUM_DVD|            \
 
188
                                         BRASERO_MEDIUM_RAM)
 
189
 
 
190
/* BD types all exist in BD-R(E) DL as well */
 
191
#define BRASERO_MEDIUM_BD_ROM           (BRASERO_MEDIUM_BD|             \
 
192
                                         BRASERO_MEDIUM_ROM)
 
193
#define BRASERO_MEDIUM_BDR_SRM          (BRASERO_MEDIUM_BD|             \
 
194
                                         BRASERO_MEDIUM_SRM|            \
 
195
                                         BRASERO_MEDIUM_WRITABLE)
 
196
#define BRASERO_MEDIUM_BDR_SRM_POW      (BRASERO_MEDIUM_BD|             \
 
197
                                         BRASERO_MEDIUM_POW|            \
 
198
                                         BRASERO_MEDIUM_SRM|            \
 
199
                                         BRASERO_MEDIUM_WRITABLE)
 
200
 
 
201
/* This seems to be a really rare mode for BD-R */
 
202
#define BRASERO_MEDIUM_BDR_RANDOM       (BRASERO_MEDIUM_BD|             \
 
203
                                         BRASERO_MEDIUM_WRITABLE|       \
 
204
                                         BRASERO_MEDIUM_RANDOM)
 
205
/* This is always RANDOM write */
 
206
#define BRASERO_MEDIUM_BDRE             (BRASERO_MEDIUM_BD|                     \
 
207
                                         BRASERO_MEDIUM_REWRITABLE)
 
208
 
 
209
 
 
210
 
 
211
#define BRASERO_MEDIUM_VALID(media)     ((media) != BRASERO_MEDIUM_NONE &&      \
 
212
                                         (media) != BRASERO_MEDIUM_BUSY &&      \
 
213
                                         (media) != BRASERO_MEDIUM_UNSUPPORTED)
 
214
 
 
215
 
 
216
#define BRASERO_MEDIUM_TYPE(media)      ((media) & 0x003F)
 
217
#define BRASERO_MEDIUM_ATTR(media)      ((media) & 0x1C000)
 
218
#define BRASERO_MEDIUM_STATUS(media)    ((media) & 0xE0000)
 
219
#define BRASERO_MEDIUM_SUBTYPE(media)   ((media) & 0x1FC0)
 
220
#define BRASERO_MEDIUM_INFO(media)      ((media) & 0xFE0000)
 
221
 
 
222
#define BRASERO_MEDIUM_IS(media, type)  (((media)&(type))==(type))
 
223
 
 
224
/* These behave like random writable:
 
225
 * they can be appendable or closed, rewritable or writable */
 
226
#define BRASERO_MEDIUM_RANDOM_WRITABLE(media)                                   \
 
227
        (BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_DVDRW_PLUS) ||                \
 
228
         BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_DVDRW_RESTRICTED) ||          \
 
229
         BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_DVD_RAM) ||                   \
 
230
         BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_BDR_RANDOM) ||                \
 
231
         BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_BDR_SRM_POW) ||               \
 
232
         BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_BDRE))
 
233
 
 
234
 
 
235
G_END_DECLS
 
236
 
 
237
#endif /* _BURN_MEDIA_H */
 
238
 
 
239
 
 
240