27 #ifndef SQUASH_LICENSE_H
28 #define SQUASH_LICENSE_H
30 #if !defined (SQUASH_H_INSIDE) && !defined (SQUASH_COMPILATION)
31 #error "Only <squash/squash.h> can be included directly."
39 SQUASH_LICENSE_UNKNOWN = 0,
41 SQUASH_LICENSE_PERMISSIVE = 0x01 << 24,
42 SQUASH_LICENSE_STRONG_COPYLEFT = 0x02 << 24,
43 SQUASH_LICENSE_WEAK_COPYLEFT = 0x04 << 24,
44 SQUASH_LICENSE_PROPRIETARY = 0x08 << 24,
45 SQUASH_LICENSE_TYPE_MASK = 0xff << 24,
47 SQUASH_LICENSE_COPYLEFT_INCOMPATIBLE = 0x01 << 16,
48 SQUASH_LICENSE_OR_GREATER = 0x02 << 16,
49 SQUASH_LICENSE_FLAGS_MASK = 0xff << 16,
51 SQUASH_LICENSE_PUBLIC_DOMAIN = SQUASH_LICENSE_PERMISSIVE | 0x01,
52 SQUASH_LICENSE_BSD2 = SQUASH_LICENSE_PERMISSIVE | 0x02,
53 SQUASH_LICENSE_BSD3 = SQUASH_LICENSE_PERMISSIVE | 0x03,
54 SQUASH_LICENSE_BSD4 = SQUASH_LICENSE_PERMISSIVE | 0x04 | SQUASH_LICENSE_COPYLEFT_INCOMPATIBLE,
55 SQUASH_LICENSE_MIT = SQUASH_LICENSE_PERMISSIVE | 0x05,
56 SQUASH_LICENSE_ZLIB = SQUASH_LICENSE_PERMISSIVE | 0x06,
57 SQUASH_LICENSE_WTFPL = SQUASH_LICENSE_PERMISSIVE | 0x07,
58 SQUASH_LICENSE_X11 = SQUASH_LICENSE_PERMISSIVE | 0x08,
59 SQUASH_LICENSE_APACHE = SQUASH_LICENSE_PERMISSIVE | 0x09,
60 SQUASH_LICENSE_APACHE2 = SQUASH_LICENSE_PERMISSIVE | 0x0a,
61 SQUASH_LICENSE_CDDL = SQUASH_LICENSE_PERMISSIVE | 0x0b | SQUASH_LICENSE_COPYLEFT_INCOMPATIBLE,
62 SQUASH_LICENSE_MSPL = SQUASH_LICENSE_PERMISSIVE | 0x0c | SQUASH_LICENSE_COPYLEFT_INCOMPATIBLE,
64 SQUASH_LICENSE_MPL = SQUASH_LICENSE_WEAK_COPYLEFT | 0x01,
65 SQUASH_LICENSE_LGPL2P1 = SQUASH_LICENSE_WEAK_COPYLEFT | 0x02,
66 SQUASH_LICENSE_LGPL2P1_PLUS = SQUASH_LICENSE_LGPL2P1 | SQUASH_LICENSE_OR_GREATER,
67 SQUASH_LICENSE_LGPL3 = SQUASH_LICENSE_WEAK_COPYLEFT | 0x03,
68 SQUASH_LICENSE_LGPL3_PLUS = SQUASH_LICENSE_LGPL3 | SQUASH_LICENSE_OR_GREATER,
70 SQUASH_LICENSE_GPL1 = SQUASH_LICENSE_STRONG_COPYLEFT | 0x01,
71 SQUASH_LICENSE_GPL1_PLUS = SQUASH_LICENSE_GPL1 | SQUASH_LICENSE_OR_GREATER,
72 SQUASH_LICENSE_GPL2 = SQUASH_LICENSE_STRONG_COPYLEFT | 0x02,
73 SQUASH_LICENSE_GPL2_PLUS = SQUASH_LICENSE_GPL2 | SQUASH_LICENSE_OR_GREATER,
74 SQUASH_LICENSE_GPL3 = SQUASH_LICENSE_STRONG_COPYLEFT | 0x03,
75 SQUASH_LICENSE_GPL3_PLUS = SQUASH_LICENSE_GPL3 | SQUASH_LICENSE_OR_GREATER,
78 SQUASH_API SquashLicense squash_license_from_string (
const char* license);
79 SQUASH_API
const char* squash_license_to_string (SquashLicense license);