]> git.saurik.com Git - apple/security.git/blob - Security/authd/server.h
Security-57031.1.35.tar.gz
[apple/security.git] / Security / authd / server.h
1 /* Copyright (c) 2012-2013 Apple Inc. All Rights Reserved. */
2
3 #ifndef _SECURITY_AUTH_SERVER_H_
4 #define _SECURITY_AUTH_SERVER_H_
5
6 #include "authd_private.h"
7 #include <xpc/xpc.h>
8
9 #if defined(__cplusplus)
10 extern "C" {
11 #endif
12
13 OSStatus server_init(void);
14 void server_cleanup(void);
15 bool server_in_dark_wake(void);
16 authdb_t server_get_database(void);
17
18 AUTH_NONNULL_ALL
19 connection_t server_register_connection(xpc_connection_t);
20
21 AUTH_NONNULL_ALL
22 void server_unregister_connection(connection_t);
23
24 AUTH_NONNULL_ALL
25 void server_register_auth_token(auth_token_t);
26
27 AUTH_NONNULL_ALL
28 void server_unregister_auth_token(auth_token_t);
29
30 AUTH_NONNULL_ALL
31 auth_token_t server_find_copy_auth_token(AuthorizationBlob * blob);
32
33 AUTH_NONNULL_ALL
34 session_t server_find_copy_session(session_id_t,bool create);
35
36 void server_dev(void);
37
38 /* API */
39
40 AUTH_NONNULL_ALL
41 OSStatus authorization_create(connection_t,xpc_object_t,xpc_object_t);
42
43 AUTH_NONNULL_ALL
44 OSStatus authorization_create_with_audit_token(connection_t,xpc_object_t,xpc_object_t);
45
46 AUTH_NONNULL_ALL
47 OSStatus authorization_free(connection_t,xpc_object_t,xpc_object_t);
48
49 AUTH_NONNULL_ALL
50 OSStatus authorization_copy_rights(connection_t,xpc_object_t,xpc_object_t);
51
52 AUTH_NONNULL_ALL
53 OSStatus authorization_copy_info(connection_t,xpc_object_t,xpc_object_t);
54
55 AUTH_NONNULL_ALL
56 OSStatus authorization_make_external_form(connection_t,xpc_object_t,xpc_object_t);
57
58 AUTH_NONNULL_ALL
59 OSStatus authorization_create_from_external_form(connection_t,xpc_object_t,xpc_object_t);
60
61 AUTH_NONNULL_ALL
62 OSStatus authorization_right_get(connection_t,xpc_object_t,xpc_object_t);
63
64 AUTH_NONNULL_ALL
65 OSStatus authorization_right_set(connection_t,xpc_object_t,xpc_object_t);
66
67 AUTH_NONNULL_ALL
68 OSStatus authorization_enable_smartcard(connection_t,xpc_object_t,xpc_object_t);
69
70 AUTH_NONNULL_ALL
71 OSStatus authorization_right_remove(connection_t,xpc_object_t,xpc_object_t);
72
73 AUTH_NONNULL_ALL
74 OSStatus session_set_user_preferences(connection_t,xpc_object_t,xpc_object_t);
75
76 #if defined(__cplusplus)
77 }
78 #endif
79
80 #endif /* !_SECURITY_AUTH_SERVER_H_ */