Eneboo - Documentación para desarrolladores
src/libxslt/libxslt/security.h
Ir a la documentación de este archivo.
00001 /*
00002  * Summary: interface for the libxslt security framework
00003  * Description: the libxslt security framework allow to restrict
00004  *              the access to new resources (file or URL) from
00005  *              the stylesheet at runtime.
00006  *
00007  * Copy: See Copyright for the status of this software.
00008  *
00009  * Author: Daniel Veillard
00010  */
00011 
00012 #ifndef __XML_XSLT_SECURITY_H__
00013 #define __XML_XSLT_SECURITY_H__
00014 
00015 #include <libxml/tree.h>
00016 #include "xsltexports.h"
00017 #include "xsltInternals.h"
00018 
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022 
00029 typedef struct _xsltSecurityPrefs xsltSecurityPrefs;
00030 typedef xsltSecurityPrefs *xsltSecurityPrefsPtr;
00031 
00037 typedef enum {
00038     XSLT_SECPREF_READ_FILE = 1,
00039     XSLT_SECPREF_WRITE_FILE,
00040     XSLT_SECPREF_CREATE_DIRECTORY,
00041     XSLT_SECPREF_READ_NETWORK,
00042     XSLT_SECPREF_WRITE_NETWORK
00043 } xsltSecurityOption;
00044 
00051 typedef int (*xsltSecurityCheck)        (xsltSecurityPrefsPtr sec,
00052                                          xsltTransformContextPtr ctxt,
00053                                          const char *value);
00054 
00055 /*
00056  * Module interfaces
00057  */
00058 XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL        
00059                     xsltNewSecurityPrefs        (void);
00060 XSLTPUBFUN void XSLTCALL                        
00061                     xsltFreeSecurityPrefs       (xsltSecurityPrefsPtr sec);
00062 XSLTPUBFUN int XSLTCALL                 
00063                     xsltSetSecurityPrefs        (xsltSecurityPrefsPtr sec,
00064                                                  xsltSecurityOption option,
00065                                                  xsltSecurityCheck func);
00066 XSLTPUBFUN xsltSecurityCheck XSLTCALL   
00067                     xsltGetSecurityPrefs        (xsltSecurityPrefsPtr sec,
00068                                                  xsltSecurityOption option);
00069 
00070 XSLTPUBFUN void XSLTCALL                        
00071                     xsltSetDefaultSecurityPrefs (xsltSecurityPrefsPtr sec);
00072 XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL        
00073                     xsltGetDefaultSecurityPrefs (void);
00074 
00075 XSLTPUBFUN int XSLTCALL                 
00076                     xsltSetCtxtSecurityPrefs    (xsltSecurityPrefsPtr sec,
00077                                                  xsltTransformContextPtr ctxt);
00078 
00079 XSLTPUBFUN int XSLTCALL                 
00080                     xsltSecurityAllow           (xsltSecurityPrefsPtr sec,
00081                                                  xsltTransformContextPtr ctxt,
00082                                                  const char *value);
00083 XSLTPUBFUN int XSLTCALL 
00084                     xsltSecurityForbid          (xsltSecurityPrefsPtr sec,
00085                                                  xsltTransformContextPtr ctxt,
00086                                                  const char *value);
00087 /*
00088  * internal interfaces
00089  */
00090 XSLTPUBFUN int XSLTCALL                 
00091                     xsltCheckWrite              (xsltSecurityPrefsPtr sec,
00092                                                  xsltTransformContextPtr ctxt,
00093                                                  const xmlChar *URL);
00094 XSLTPUBFUN int XSLTCALL                 
00095                     xsltCheckRead               (xsltSecurityPrefsPtr sec,
00096                                                  xsltTransformContextPtr ctxt,
00097                                                  const xmlChar *URL);
00098 
00099 #ifdef __cplusplus
00100 }
00101 #endif
00102 
00103 #endif /* __XML_XSLT_SECURITY_H__ */
00104 
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'