1 /* Totem Disc Content Detection
2  * (c) 2004 Ronald Bultje <rbultje@ronald.bitfreak.net>
3  *
4  * totem-disc.h: media content detection
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301  USA.
20  */
21 
22 #ifndef TOTEM_DISC_H
23 #define TOTEM_DISC_H
24 
25 #include <glib.h>
26 #include <glib-object.h>
27 
28 G_BEGIN_DECLS
29 
30 /**
31  * TotemDiscMediaType:
32  * @MEDIA_TYPE_ERROR: there was an error determining the media's type
33  * @MEDIA_TYPE_DATA: data disc
34  * @MEDIA_TYPE_CDDA: audio CD
35  * @MEDIA_TYPE_VCD: video CD
36  * @MEDIA_TYPE_DVD: video DVD
37  * @MEDIA_TYPE_DVB: digital television
38  * @MEDIA_TYPE_BD: video Blu-Ray
39  *
40  * Gives the media type of a disc, or %MEDIA_TYPE_ERROR if the media type
41  * could not be determined.
42  **/
43 typedef enum {
44   MEDIA_TYPE_ERROR = -1,
45   MEDIA_TYPE_DATA = 1,
46   MEDIA_TYPE_CDDA,
47   MEDIA_TYPE_VCD,
48   MEDIA_TYPE_DVD,
49   MEDIA_TYPE_DVB,
50   MEDIA_TYPE_BD
51 } TotemDiscMediaType;
52 
53 #define MediaType TotemDiscMediaType
54 
55 GQuark totem_disc_media_type_quark	(void) G_GNUC_CONST;
56 #define TOTEM_DISC_MEDIA_TYPE		totem_disc_media_type_quark ()
57 
58 TotemDiscMediaType	totem_cd_detect_type	(const char *device,
59 						 GError     **error);
60 TotemDiscMediaType	totem_cd_detect_type_with_url (const char  *device,
61 						       char       **mrl,
62 						       GError     **error);
63 TotemDiscMediaType	totem_cd_detect_type_from_dir (const char *dir,
64 						       char      **mrl,
65 						       GError    **error);
66 const char *	totem_cd_get_human_readable_name (TotemDiscMediaType type);
67 char *		totem_cd_mrl_from_type (const char *scheme, const char *dir);
68 gboolean	totem_cd_has_medium (const char  *device);
69 
70 G_END_DECLS
71 
72 #endif /* TOTEM_DISC_H */
73