Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
gslmagic.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __GSL_MAGIC_H__
3 #define __GSL_MAGIC_H__
4 
5 #include <bse/gsldefs.hh>
6 
7 
8 
9 
10 /* --- structures --- */
11 typedef struct _GslRealMagic GslRealMagic;
12 struct _GslMagic
13 {
14  gpointer data;
15  gchar *extension;
16 
17  /*< private >*/
18  gint priority;
19  GslRealMagic *match_list;
20 };
21 
22 
23 /* match entity with:
24  * prefix,
25  * extension,
26  * magic_spec
27  *
28  * where prefix has absolute preference, and extension is just
29  * a _hint_ for magic_spec match order, unless magic_spec==NULL
30  *
31  * no prefix for save handlers. (?) just extension matches.
32  *
33  * need pre-parse functionality, to figure name and type of a
34  * file's contents.
35  */
36 
37 
38 /* --- prototypes --- */
39 GslMagic* gsl_magic_create (gpointer data,
40  gint priority,
41  const gchar *extension,
42  const gchar *magic_spec);
43 GslMagic* gsl_magic_list_match_file (SfiRing *magic_list,
44  const gchar *file_name);
45 GslMagic* gsl_magic_list_match_file_skip (SfiRing *magic_list,
46  const gchar *file_name,
47  guint skip_bytes);
48 void gsl_magic_list_brute_match (SfiRing *magic_list,
49  const gchar *file_name,
50  guint skip_bytes,
51  GslMagic *skip_magic,
52  SfiRing **ext_matches,
53  SfiRing **other_matches);
54 
55 #endif /* __GSL_MAGIC_H__ */
Definition: sfiring.hh:21
Definition: gslmagic.hh:12