]> git.saurik.com Git - apple/security.git/blob - authd/session.h
Security-55471.14.8.tar.gz
[apple/security.git] / authd / session.h
1 /* Copyright (c) 2012 Apple Inc. All rights reserved. */
2
3 #ifndef _SECURITY_AUTH_SESSION_H_
4 #define _SECURITY_AUTH_SESSION_H_
5
6 #include "credential.h"
7 #include <Security/AuthSession.h>
8 #include <bsm/audit_session.h>
9
10 #if defined(__cplusplus)
11 extern "C" {
12 #endif
13
14 AUTH_WARN_RESULT AUTH_MALLOC AUTH_NONNULL_ALL AUTH_RETURNS_RETAINED
15 session_t session_create(session_id_t);
16
17 AUTH_NONNULL_ALL
18 bool session_update(session_t);
19
20 AUTH_NONNULL_ALL
21 uint64_t session_get_attributes(session_t);
22
23 AUTH_NONNULL_ALL
24 void session_set_attributes(session_t,uint64_t flags);
25
26 AUTH_NONNULL_ALL
27 void session_clear_attributes(session_t,uint64_t flags);
28
29 AUTH_NONNULL_ALL
30 const void * session_get_key(session_t);
31
32 AUTH_NONNULL_ALL
33 session_id_t session_get_id(session_t);
34
35 AUTH_NONNULL_ALL
36 uid_t session_get_uid(session_t);
37
38 AUTH_NONNULL_ALL
39 CFIndex session_add_process(session_t, process_t);
40
41 AUTH_NONNULL_ALL
42 CFIndex session_remove_process(session_t, process_t);
43
44 AUTH_NONNULL_ALL
45 CFIndex session_get_process_count(session_t);
46
47 AUTH_NONNULL_ALL
48 void session_set_credential(session_t,credential_t);
49
50 AUTH_NONNULL_ALL
51 void session_credentials_purge(session_t);
52
53 AUTH_NONNULL_ALL
54 bool session_credentials_iterate(session_t, credential_iterator_t iter);
55
56 #if defined(__cplusplus)
57 }
58 #endif
59
60 #endif /* !_SECURITY_AUTH_SESSION_H_ */