kernelbase: Remove unnecessary handler from LocalLock.
[wine.git] / libs / xslt / libxslt / security.h
blobbab5c8c6b213ae0dec3160c08870e5232112cea4
1 /*
2 * Summary: interface for the libxslt security framework
3 * Description: the libxslt security framework allow to restrict
4 * the access to new resources (file or URL) from
5 * the stylesheet at runtime.
7 * Copy: See Copyright for the status of this software.
9 * Author: Daniel Veillard
12 #ifndef __XML_XSLT_SECURITY_H__
13 #define __XML_XSLT_SECURITY_H__
15 #include <libxml/tree.h>
16 #include "xsltexports.h"
17 #include "xsltInternals.h"
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
23 /**
24 * xsltSecurityPref:
26 * structure to indicate the preferences for security in the XSLT
27 * transformation.
29 typedef struct _xsltSecurityPrefs xsltSecurityPrefs;
30 typedef xsltSecurityPrefs *xsltSecurityPrefsPtr;
32 /**
33 * xsltSecurityOption:
35 * the set of option that can be configured
37 typedef enum {
38 XSLT_SECPREF_READ_FILE = 1,
39 XSLT_SECPREF_WRITE_FILE,
40 XSLT_SECPREF_CREATE_DIRECTORY,
41 XSLT_SECPREF_READ_NETWORK,
42 XSLT_SECPREF_WRITE_NETWORK
43 } xsltSecurityOption;
45 /**
46 * xsltSecurityCheck:
48 * User provided function to check the value of a string like a file
49 * path or an URL ...
51 typedef int (*xsltSecurityCheck) (xsltSecurityPrefsPtr sec,
52 xsltTransformContextPtr ctxt,
53 const char *value);
56 * Module interfaces
58 XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL
59 xsltNewSecurityPrefs (void);
60 XSLTPUBFUN void XSLTCALL
61 xsltFreeSecurityPrefs (xsltSecurityPrefsPtr sec);
62 XSLTPUBFUN int XSLTCALL
63 xsltSetSecurityPrefs (xsltSecurityPrefsPtr sec,
64 xsltSecurityOption option,
65 xsltSecurityCheck func);
66 XSLTPUBFUN xsltSecurityCheck XSLTCALL
67 xsltGetSecurityPrefs (xsltSecurityPrefsPtr sec,
68 xsltSecurityOption option);
70 XSLTPUBFUN void XSLTCALL
71 xsltSetDefaultSecurityPrefs (xsltSecurityPrefsPtr sec);
72 XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL
73 xsltGetDefaultSecurityPrefs (void);
75 XSLTPUBFUN int XSLTCALL
76 xsltSetCtxtSecurityPrefs (xsltSecurityPrefsPtr sec,
77 xsltTransformContextPtr ctxt);
79 XSLTPUBFUN int XSLTCALL
80 xsltSecurityAllow (xsltSecurityPrefsPtr sec,
81 xsltTransformContextPtr ctxt,
82 const char *value);
83 XSLTPUBFUN int XSLTCALL
84 xsltSecurityForbid (xsltSecurityPrefsPtr sec,
85 xsltTransformContextPtr ctxt,
86 const char *value);
88 * internal interfaces
90 XSLTPUBFUN int XSLTCALL
91 xsltCheckWrite (xsltSecurityPrefsPtr sec,
92 xsltTransformContextPtr ctxt,
93 const xmlChar *URL);
94 XSLTPUBFUN int XSLTCALL
95 xsltCheckRead (xsltSecurityPrefsPtr sec,
96 xsltTransformContextPtr ctxt,
97 const xmlChar *URL);
99 #ifdef __cplusplus
101 #endif
103 #endif /* __XML_XSLT_SECURITY_H__ */