Mercurial > projects > dstep
comparison dstep/security/AuthSession.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.AuthSession; | |
8 | |
9 import dstep.security.Authorization; | |
10 | |
11 alias uint SecuritySessionId; | |
12 alias uint SessionAttributeBits; | |
13 alias uint SessionCreationFlags; | |
14 | |
15 enum | |
16 { | |
17 noSecuritySession = 0, | |
18 callerSecuritySession = (cast(SecuritySessionId)-1) | |
19 } | |
20 | |
21 enum | |
22 { | |
23 sessionIsRoot = 0x0001, | |
24 sessionHasGraphicAccess = 0x0010, | |
25 sessionHasTTY = 0x0020, | |
26 sessionIsRemote = 0x1000, | |
27 sessionWasInitialized = 0x8000 | |
28 } | |
29 | |
30 enum | |
31 { | |
32 sessionKeepCurrentBootstrap = 0x8000 | |
33 } | |
34 | |
35 enum | |
36 { | |
37 errSessionSuccess = 0, | |
38 errSessionInvalidId = -60500, | |
39 errSessionInvalidAttributes = -60501, | |
40 errSessionAuthorizationDenied = -60502, | |
41 errSessionValueNotSet = -60503, | |
42 errSessionInternal = errAuthorizationInternal, | |
43 errSessionInvalidFlags = errAuthorizationInvalidFlags | |
44 } | |
45 | |
46 extern (C) | |
47 { | |
48 int SessionGetInfo (uint session, SecuritySessionId* sessionId, SessionAttributeBits* attributes); | |
49 int SessionCreate (uint flags, uint attributes); | |
50 } |