]> git.saurik.com Git - apple/security.git/blob - Security/authd/mechanism.h
Security-57031.1.35.tar.gz
[apple/security.git] / Security / authd / mechanism.h
1 /* Copyright (c) 2012 Apple Inc. All Rights Reserved. */
2
3 #ifndef _SECURITY_AUTH_MECHANISM_H_
4 #define _SECURITY_AUTH_MECHANISM_H_
5
6 #include "authdb.h"
7
8 #if defined(__cplusplus)
9 extern "C" {
10 #endif
11
12 enum {
13 kMechanismTypeEntitled = 1
14 };
15
16 AUTH_WARN_RESULT AUTH_MALLOC AUTH_NONNULL_ALL AUTH_RETURNS_RETAINED
17 mechanism_t mechanism_create_with_sql(auth_items_t);
18
19 AUTH_WARN_RESULT AUTH_MALLOC AUTH_NONNULL1 AUTH_RETURNS_RETAINED
20 mechanism_t mechanism_create_with_string(const char *,authdb_connection_t);
21
22 AUTH_NONNULL_ALL
23 bool mechanism_sql_fetch(mechanism_t,authdb_connection_t);
24
25 AUTH_NONNULL_ALL
26 bool mechanism_sql_commit(mechanism_t,authdb_connection_t);
27
28 AUTH_NONNULL_ALL
29 bool mechanism_exists(mechanism_t);
30
31 AUTH_NONNULL_ALL
32 const char * mechanism_get_string(mechanism_t);
33
34 AUTH_NONNULL_ALL
35 int64_t mechanism_get_id(mechanism_t);
36
37 AUTH_NONNULL_ALL
38 const char * mechanism_get_plugin(mechanism_t);
39
40 AUTH_NONNULL_ALL
41 const char * mechanism_get_param(mechanism_t);
42
43 AUTH_NONNULL_ALL
44 uint64_t mechanism_get_type(mechanism_t);
45
46 AUTH_NONNULL_ALL
47 bool mechanism_is_privileged(mechanism_t);
48
49 #if defined(__cplusplus)
50 }
51 #endif
52
53 #endif /* !_SECURITY_AUTH_MECHANISM_H_ */