1 /* Copyright (c) 2012-2013 Apple Inc. All Rights Reserved. */
3 #ifndef _SECURITY_AUTH_ENGINE_H_
4 #define _SECURITY_AUTH_ENGINE_H_
6 #include "credential.h"
7 #include <Security/Authorization.h>
9 #if defined(__cplusplus)
13 AUTH_WARN_RESULT AUTH_MALLOC AUTH_NONNULL_ALL AUTH_RETURNS_RETAINED
14 engine_t
engine_create(connection_t
, auth_token_t
);
16 AUTH_NONNULL1 AUTH_NONNULL2
17 OSStatus
engine_authorize(engine_t
, auth_rights_t rights
, auth_items_t environment
, AuthorizationFlags
);
19 AUTH_NONNULL1 AUTH_NONNULL2
20 OSStatus
engine_get_right_properties(engine_t engine
, const char *rightName
, CFDictionaryRef
*output
);
23 OSStatus
engine_verify_modification(engine_t
, rule_t
, bool remove
, bool force_modify
);
26 auth_rights_t
engine_get_granted_rights(engine_t
);
29 CFAbsoluteTime
engine_get_time(engine_t
);
32 void engine_destroy_agents(engine_t
);
35 void engine_interrupt_agent(engine_t engine
);
38 bool engine_acquire_sheet_data(engine_t engine
);
40 AUTH_NONNULL_ALL AUTH_RETURNS_RETAINED
41 CFTypeRef
engine_copy_context(engine_t engine
, auth_items_t source
);
43 #if defined(__cplusplus)
47 #endif /* !_SECURITY_AUTH_ENGINE_H_ */