Mercurial > projects > dstep
comparison dstep/security/AuthorizationPlugin.d @ 11:07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sat, 01 Aug 2009 15:03:28 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
10:27e00625790b | 11:07194b026fa4 |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Jul 22, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.security.AuthorizationPlugin; | |
8 | |
9 import dstep.security.Authorization; | |
10 | |
11 struct __OpaqueAuthorizationEngine; | |
12 | |
13 alias uint AuthorizationContextFlags; | |
14 alias char* AuthorizationMechanismId; | |
15 alias char* AuthorizationPluginId; | |
16 alias void* AuthorizationPluginRef; | |
17 alias void* AuthorizationMechanismRef; | |
18 alias __OpaqueAuthorizationEngine* AuthorizationEngineRef; | |
19 alias void* AuthorizationSessionId; | |
20 alias uint AuthorizationResult; | |
21 | |
22 enum | |
23 { | |
24 kAuthorizationContextFlagExtractable = (1 << 0), | |
25 kAuthorizationContextFlagVolatile = (1 << 1), | |
26 kAuthorizationContextFlagSticky = (1 << 2) | |
27 } | |
28 | |
29 enum | |
30 { | |
31 kAuthorizationResultAllow, | |
32 kAuthorizationResultDeny, | |
33 kAuthorizationResultUndefined, | |
34 kAuthorizationResultUserCanceled | |
35 } | |
36 | |
37 enum | |
38 { | |
39 kAuthorizationPluginInterfaceVersion = 0 | |
40 } | |
41 | |
42 enum | |
43 { | |
44 kAuthorizationCallbacksVersion = 0 | |
45 } | |
46 | |
47 struct AuthorizationValue | |
48 { | |
49 uint length; | |
50 void* data; | |
51 } | |
52 | |
53 | |
54 struct AuthorizationValueVector | |
55 { | |
56 uint count; | |
57 AuthorizationValue* values; | |
58 } | |
59 | |
60 | |
61 struct AuthorizationCallbacks | |
62 { | |
63 uint version_; | |
64 char* inKey; | |
65 AuthorizationContextFlags* outContextFlags; | |
66 uint inContextFlags; | |
67 } | |
68 | |
69 | |
70 struct AuthorizationPluginInterface | |
71 { | |
72 uint version_; | |
73 AuthorizationEngineRef inEngine; | |
74 AuthorizationMechanismId mechanismId; | |
75 } | |
76 | |
77 extern (C) | |
78 { | |
79 int AuthorizationPluginCreate (AuthorizationCallbacks* callbacks, AuthorizationPluginRef* outPlugin, AuthorizationPluginInterface** outPluginInterface); | |
80 } |