#ifndef __heimodadmin_h__
#define __heimodadmin_h__ 1
#import <CoreFoundation/CoreFoundation.h>
#import <CFOpenDirectory/CFOpenDirectory.h>
#import <Security/Security.h>
#define kPrincipalFlagInitial CFSTR("Initial")
#define kPrincipalFlagForwardable CFSTR("Forwardable")
#define kPrincipalFlagProxyable CFSTR("Proxiable")
#define kPrincipalFlagRenewable CFSTR("Renewable")
#define kPrincipalFlagServer CFSTR("Server")
#define kPrincipalFlagPasswordChangeService CFSTR("PasswordChangeService")
#define kPrincipalFlagOKAsDelegate CFSTR("OkAsDelegate")
#define kPrincipalFlagRequireStrongPreAuthentication CFSTR("RequireStrongPreAuth")
#define kPrincipalFlagImmutable CFSTR("Immutable")
#define kPrincipalFlagInvalid CFSTR("Invalid")
#define kHeimODACLAll CFSTR("kHeimODACLAll")
#define kHeimODACLChangePassword CFSTR("kHeimODACLChangePassword")
#define kHeimODACLList CFSTR("kHeimODACLList")
#define kHeimODACLDelete CFSTR("kHeimODACLDelete")
#define kHeimODACLModify CFSTR("kHeimODACLModify")
#define kHeimODACLAdd CFSTR("kHeimODACLAdd")
#define kHeimODACLGet CFSTR("kHeimODACLGet")
#define kHeimSRPGroupRFC5054_4096_PBKDF2_SHA512 CFSTR("kHeimSRPGroupRFC5054_4096_PBKDF2_SHA512")
enum {
kHeimODAdminSetKeysAppendKey = 1,
kHeimODAdminAppendKeySet = 1,
kHeimODAdminDeleteEnctypes = 2
};
enum {
kHeimODAdminLoadAsAppend = 1
};
#ifdef __cplusplus
extern "C" {
#endif
int HeimODCreateRealm(ODNodeRef node, CFStringRef realm, CFErrorRef *error);
int HeimODCreatePrincipalData(ODNodeRef node, ODRecordRef record, CFTypeRef flags, CFStringRef principal, CFErrorRef *error);
int HeimODRemovePrincipalData(ODNodeRef node, ODRecordRef record, CFStringRef principal, CFErrorRef *error);
int HeimODSetKerberosFlags(ODNodeRef node, ODRecordRef record, CFTypeRef flags, CFErrorRef *error);
CFArrayRef HeimODCopyKerberosFlags(ODNodeRef node, ODRecordRef record, CFErrorRef *error);
int HeimODClearKerberosFlags(ODNodeRef node, ODRecordRef record, CFTypeRef flags, CFErrorRef *error);
int
HeimODSetACL(ODNodeRef node, ODRecordRef record, CFTypeRef flags, CFErrorRef *error);
CFArrayRef
HeimODCopyACL(ODNodeRef node, ODRecordRef record, CFErrorRef *error);
int
HeimODClearACL(ODNodeRef node, ODRecordRef record, CFTypeRef flags, CFErrorRef *error);
int HeimODAddServerAlias(ODNodeRef node, ODRecordRef record, CFStringRef alias, CFErrorRef *error);
int HeimODRemoveServerAlias(ODNodeRef node, ODRecordRef record, CFStringRef alias, CFErrorRef *error);
CFArrayRef HeimODCopyServerAliases(ODNodeRef node, ODRecordRef record, CFErrorRef *error);
int HeimODSetKerberosMaxLife(ODNodeRef node, ODRecordRef record, time_t, CFErrorRef *error);
time_t HeimODGetKerberosMaxLife(ODNodeRef node, ODRecordRef record, CFErrorRef *error);
int HeimODSetKerberosMaxRenewable(ODNodeRef node, ODRecordRef record, time_t, CFErrorRef *error);
time_t HeimODGetKerberosMaxRenewable(ODNodeRef node, ODRecordRef record, CFErrorRef *error);
int HeimODSetKeys(ODNodeRef node, ODRecordRef record, CFStringRef principal, CFArrayRef enctypes, CFTypeRef password, unsigned long flags, CFErrorRef *error);
CFArrayRef HeimODCopyDefaultEnctypes(CFErrorRef *error);
bool HeimODSetVerifiers(ODNodeRef node, ODRecordRef record, CFStringRef principal, CFArrayRef types, CFTypeRef password, unsigned long flags, CFErrorRef *error);
CFArrayRef HeimODModifyKeys(CFArrayRef prevKeyset, CFStringRef principal, CFArrayRef enctypes, CFTypeRef password, unsigned long flags, CFErrorRef *error) __attribute__((cf_returns_retained));
CFArrayRef HeimODCreateSRPKeys(CFArrayRef srptype, CFStringRef principal, CFTypeRef password, unsigned long flags, CFErrorRef *error);
CFStringRef HeimODKeysetToString(CFDataRef element, CFErrorRef *error) __attribute__((cf_returns_retained));
int HeimODAddCertificate(ODNodeRef node, ODRecordRef record, SecCertificateRef ref, CFErrorRef *error);
int HeimODAddSubjectAltCertName(ODNodeRef node, ODRecordRef record, CFStringRef subject, CFStringRef issuer, CFErrorRef *error);
int HeimODAddSubjectAltCertSHA1Digest(ODNodeRef node, ODRecordRef record, CFDataRef hash, CFErrorRef *error);
CFArrayRef HeimODCopySubjectAltNames(ODNodeRef node, ODRecordRef record, CFErrorRef *error);
int HeimODRemoveSubjectAltElement(ODNodeRef node, ODRecordRef record, CFTypeRef element, CFErrorRef *error);
int HeimODAddCertificateSubjectAndTrustAnchor(ODNodeRef node, ODRecordRef record, CFStringRef leafSubject, CFStringRef trustAnchorSubject, CFErrorRef *error);
int HeimODRemoveCertificateSubjectAndTrustAnchor(ODNodeRef node, ODRecordRef record, CFStringRef leafSubject, CFStringRef trustAnchorSubject, CFErrorRef *error);
int HeimODAddAppleIDAlias(ODNodeRef node, ODRecordRef record, CFStringRef alias, CFErrorRef *error);
int HeimODRemoveAppleIDAlias(ODNodeRef node, ODRecordRef record, CFStringRef alias, CFErrorRef *error);
CFDictionaryRef HeimODDumpRecord(ODNodeRef node, ODRecordRef record, CFStringRef principal, CFErrorRef *error) __attribute__((cf_returns_retained));
bool HeimODLoadRecord(ODNodeRef node, ODRecordRef record, CFDictionaryRef dict, unsigned long flags, CFErrorRef *error);
struct hdb_entry;
CFDictionaryRef HeimODDumpHdbEntry(struct hdb_entry *, CFErrorRef *error) __attribute__((cf_returns_retained));
#ifdef __cplusplus
};
#endif
#endif