1 /* Copyright (c) 2012 Apple Inc. All Rights Reserved. */
3 #ifndef _SECURITY_AUTH_MECHANISM_H_
4 #define _SECURITY_AUTH_MECHANISM_H_
8 #if defined(__cplusplus)
13 kMechanismTypeEntitled
= 1
16 AUTH_WARN_RESULT AUTH_MALLOC AUTH_NONNULL_ALL AUTH_RETURNS_RETAINED
17 mechanism_t
mechanism_create_with_sql(auth_items_t
);
19 AUTH_WARN_RESULT AUTH_MALLOC AUTH_NONNULL1 AUTH_RETURNS_RETAINED
20 mechanism_t
mechanism_create_with_string(const char *,authdb_connection_t
);
23 bool mechanism_sql_fetch(mechanism_t
,authdb_connection_t
);
26 bool mechanism_sql_commit(mechanism_t
,authdb_connection_t
);
29 bool mechanism_exists(mechanism_t
);
32 const char * mechanism_get_string(mechanism_t
);
35 int64_t mechanism_get_id(mechanism_t
);
38 const char * mechanism_get_plugin(mechanism_t
);
41 const char * mechanism_get_param(mechanism_t
);
44 uint64_t mechanism_get_type(mechanism_t
);
47 bool mechanism_is_privileged(mechanism_t
);
49 #if defined(__cplusplus)
53 #endif /* !_SECURITY_AUTH_MECHANISM_H_ */