DiffLoader didn't handle encoded name and caused mismatch between .NET.
[mono-project/dkf.git] / mono / mini / declsec.h
blob4c45a94171b1fa1c66af3158d08e7d70016c09fe
1 /*
2 * declsec.h: Declarative Security support
4 * Author:
5 * Sebastien Pouliot <sebastien@ximian.com>
7 * (C) 2004-2005 Novell (http://www.novell.com)
8 */
10 #ifndef _MONO_MINI_DECLSEC_H_
11 #define _MONO_MINI_DECLSEC_H_
13 #include <string.h>
15 #include "mono/metadata/class-internals.h"
16 #include "mono/metadata/domain-internals.h"
17 #include "mono/metadata/object.h"
18 #include "mono/metadata/tabledefs.h"
19 #include "mono/metadata/marshal.h"
20 #include "mono/metadata/security-manager.h"
21 #include "mono/metadata/exception.h"
22 #include "mono/utils/mono-compiler.h"
25 /* Definitions */
27 #define MONO_CAS_INITIAL_STACK_SIZE 6
30 /* keep in synch with RuntimeSecurityFrame in /mcs/class/corlib/System.Security/SecurityFrame.cs */
31 typedef struct {
32 MonoObject obj;
33 MonoAppDomain *domain;
34 MonoReflectionMethod *method;
35 MonoDeclSecurityEntry assert;
36 MonoDeclSecurityEntry deny;
37 MonoDeclSecurityEntry permitonly;
38 } MonoSecurityFrame;
41 /* limited flags used in MonoJitInfo for stack modifiers */
42 enum {
43 MONO_JITINFO_STACKMOD_ASSERT = 0x01,
44 MONO_JITINFO_STACKMOD_DENY = 0x02,
45 MONO_JITINFO_STACKMOD_PERMITONLY = 0x04
48 enum {
49 MONO_JIT_SECURITY_OK = 0x00,
50 MONO_JIT_LINKDEMAND_PERMISSION = 0x01,
51 MONO_JIT_LINKDEMAND_APTC = 0x02,
52 MONO_JIT_LINKDEMAND_ECMA = 0x04,
53 MONO_JIT_LINKDEMAND_PINVOKE = 0x08
56 /* Prototypes */
57 MonoBoolean mono_method_has_declsec (MonoMethod *method) MONO_INTERNAL;
58 void mono_declsec_cache_stack_modifiers (MonoJitInfo *jinfo) MONO_INTERNAL;
59 MonoSecurityFrame* mono_declsec_create_frame (MonoDomain *domain, MonoJitInfo *jinfo) MONO_INTERNAL;
61 guint32 mono_declsec_linkdemand (MonoDomain *domain, MonoMethod *caller, MonoMethod *callee) MONO_INTERNAL;
63 #endif /* _MONO_MINI_DECLSEC_H_ */