CodeWriter: Write [Diagnostics] attribute
[vala-lang.git] / vapi / libmagic.vapi
blob2d1448b581b7d14551bccd73e08a70e73216a9d4
1 [CCode (cheader_filename = "magic.h")]
2 namespace LibMagic {
3         [Compact]
4         [CCode (cname = "struct magic_set", cprefix = "magic_", free_function = "magic_close")]
5         public class Magic {
6                 [CCode (cname = "magic_open")]
7                 public Magic (Flags flags = Flags.NONE);
8                 public unowned string? error ();
9                 public int errno ();
10                 public unowned string? file (string filename);
11                 public unowned string? buffer (void *buffer, size_t length);
12                 public int setflags (int flags);
13                 public int check (string? filename = null);
14                 public int compile (string? filename = null);
15                 public int load (string? filename = null);
16         }
18         [Flags]
19         [CCode (cprefix = "MAGIC_", cname = "int")]
20         public enum Flags {
21                 NONE,
22                 DEBUG,
23                 SYMLINK,
24                 COMPRESS,
25                 DEVICES,
26                 MIME_TYPE,
27                 MIME_ENCODING,
28                 CONTINUE,
29                 CHECK,
30                 PRESERVE_ATIME,
31                 RAW,
32                 ERROR,
33                 NO_CHECK_ATYPE,
34                 NO_CHECK_ASCII,
35                 NO_CHECK_COMPRESS,
36                 NO_CHECK_ELF,
37                 NO_CHECK_FORTRAN,
38                 NO_CHECK_SOFT,
39                 NO_CHECK_TAR,
40                 NO_CHECK_TOKENS,
41                 NO_CHECK_TROFF
42         }