···11+/*
22+ * Copyright (c) 1999-2015 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#ifndef __SYSTEM_DIRECTORIES_H__
2525+#define __SYSTEM_DIRECTORIES_H__
2626+2727+#include <os/base.h>
2828+#include <Availability.h>
2929+3030+// Available OSX 10.12, iOS 10.0, WatchOS 3.0 and TVOS 10.0. Not all enum identifiers return a useful path on all platforms.
3131+OS_ENUM(sysdir_search_path_directory, unsigned int,
3232+ SYSDIR_DIRECTORY_APPLICATION = 1, // supported applications (Applications)
3333+ SYSDIR_DIRECTORY_DEMO_APPLICATION = 2, // unsupported applications, demonstration versions (Applications/Demos)
3434+ SYSDIR_DIRECTORY_DEVELOPER_APPLICATION = 3, // developer applications (Developer/Applications) Soft deprecated as of __MAC_10_5 - there is no one single Developer directory
3535+ SYSDIR_DIRECTORY_ADMIN_APPLICATION = 4, // system and network administration applications (Applications/Utilities)
3636+ SYSDIR_DIRECTORY_LIBRARY = 5, // various user-visible documentation, support, and configuration files, resources (Library)
3737+ SYSDIR_DIRECTORY_DEVELOPER = 6, // developer resources (Developer) Soft deprecated as of __MAC_10_5 - there is no one single Developer directory
3838+ SYSDIR_DIRECTORY_USER = 7, // user home directories (Users)
3939+ SYSDIR_DIRECTORY_DOCUMENTATION = 8, // documentation (Library/Documentation)
4040+ SYSDIR_DIRECTORY_DOCUMENT = 9, // documents (Documents)
4141+ SYSDIR_DIRECTORY_CORESERVICE = 10, // location of core services (Library/CoreServices)
4242+ SYSDIR_DIRECTORY_AUTOSAVED_INFORMATION = 11, // location of user's directory for use with autosaving (Library/Autosave Information)
4343+ SYSDIR_DIRECTORY_DESKTOP = 12, // location of user's Desktop (Desktop)
4444+ SYSDIR_DIRECTORY_CACHES = 13, // location of discardable cache files (Library/Caches)
4545+ SYSDIR_DIRECTORY_APPLICATION_SUPPORT = 14, // location of application support files (plug-ins, etc) (Library/Application Support)
4646+ SYSDIR_DIRECTORY_DOWNLOADS = 15, // location of user's Downloads directory (Downloads)
4747+ SYSDIR_DIRECTORY_INPUT_METHODS = 16, // input methods (Library/Input Methods)
4848+ SYSDIR_DIRECTORY_MOVIES = 17, // location of user's Movies directory (Movies)
4949+ SYSDIR_DIRECTORY_MUSIC = 18, // location of user's Music directory (Music)
5050+ SYSDIR_DIRECTORY_PICTURES = 19, // location of user's Pictures directory (Pictures)
5151+ SYSDIR_DIRECTORY_PRINTER_DESCRIPTION = 20, // location of system's PPDs directory (Library/Printers/PPDs)
5252+ SYSDIR_DIRECTORY_SHARED_PUBLIC = 21, // location of user's Public sharing directory (Public)
5353+ SYSDIR_DIRECTORY_PREFERENCE_PANES = 22, // location of the PreferencePanes directory for use with System Preferences (Library/PreferencePanes)
5454+ SYSDIR_DIRECTORY_ALL_APPLICATIONS = 100, // all directories where applications can occur (Applications, Applications/Utilities, Developer/Applications, ...)
5555+ SYSDIR_DIRECTORY_ALL_LIBRARIES = 101, // all directories where resources can occur (Library, Developer)
5656+);
5757+5858+// Available OSX 10.12, iOS 10.0, WatchOS 3.0 and TVOS 10.0. Not all enum identifiers are useful on all platforms.
5959+OS_ENUM(sysdir_search_path_domain_mask, unsigned int,
6060+ SYSDIR_DOMAIN_MASK_USER = ( 1UL << 0 ), // user's home directory --- place to install user's personal items (~)
6161+ SYSDIR_DOMAIN_MASK_LOCAL = ( 1UL << 1 ), // local to the current machine --- place to install items available to everyone on this machine
6262+ SYSDIR_DOMAIN_MASK_NETWORK = ( 1UL << 2 ), // publically available location in the local area network --- place to install items available on the network (/Network)
6363+ SYSDIR_DOMAIN_MASK_SYSTEM = ( 1UL << 3 ), // provided by Apple
6464+ SYSDIR_DOMAIN_MASK_ALL = 0x0ffff, // all domains: all of the above and more, future items
6565+);
6666+6767+typedef unsigned int sysdir_search_path_enumeration_state;
6868+6969+__BEGIN_DECLS
7070+7171+extern sysdir_search_path_enumeration_state
7272+sysdir_start_search_path_enumeration(sysdir_search_path_directory_t dir, sysdir_search_path_domain_mask_t domainMask) __API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
7373+7474+extern sysdir_search_path_enumeration_state
7575+sysdir_get_next_search_path_enumeration(sysdir_search_path_enumeration_state state, char *path) __API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
7676+7777+__END_DECLS
7878+7979+#endif /* defined(__SYSTEM_DIRECTORIES_H__) */
···11+/*
22+ * Copyright (c) 2009 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#if !defined(__OPENDIRECTORY_CFODCONTEXT__)
2525+#define __OPENDIRECTORY_CFODCONTEXT__ 1
2626+2727+#include <CFOpenDirectory/CFOpenDirectory.h>
2828+2929+__BEGIN_DECLS
3030+3131+/*!
3232+ @function ODContextGetTypeID
3333+ @abstract Standard GetTypeID function support for CF-based objects
3434+ @discussion Returns the typeID for the ODContext object
3535+ @result a valid CFTypeID for the ODContext object
3636+*/
3737+CF_EXPORT
3838+CFTypeID ODContextGetTypeID(void);
3939+4040+__END_DECLS
4141+4242+#endif /* ! __OPENDIRECTORY_CFODCONTEXT__ */
···11+/*
22+ * Copyright (c) 2009-2012 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#if !defined(__OPENDIRECTORY_CFODNODE__)
2525+#define __OPENDIRECTORY_CFODNODE__ 1
2626+2727+#include <CFOpenDirectory/CFOpenDirectory.h>
2828+2929+__BEGIN_DECLS
3030+3131+/*!
3232+ @function ODNodeGetTypeID
3333+ @abstract Standard GetTypeID function support for CF-based objects
3434+ @discussion Returns the typeID for the ODNode objects
3535+ @result a valid CFTypeID for the ODNode object
3636+*/
3737+CF_EXPORT
3838+CFTypeID ODNodeGetTypeID(void) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
3939+4040+/*!
4141+ @function ODNodeCreateWithNodeType
4242+ @abstract Creates an ODNodeRef based on a specific node type
4343+ @discussion Creates an ODNodeRef based on a specific node type
4444+ @param allocator a memory allocator to use for this object
4545+ @param session an ODSessionRef, either kODSessionDefault or a valid ODSessionRef can be passed
4646+ @param nodeType an ODNodeType of the node to open
4747+ @param error an optional CFErrorRef reference for error details
4848+ @result a valid ODNodeRef if successful, otherwise returns NULL. outError can be checked for details upon
4949+ failure.
5050+*/
5151+CF_EXPORT
5252+ODNodeRef ODNodeCreateWithNodeType(CFAllocatorRef allocator, ODSessionRef session, ODNodeType nodeType, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
5353+5454+/*!
5555+ @function ODNodeCreateWithName
5656+ @abstract Creates an ODNodeRef based on a partciular node name
5757+ @discussion Creates an ODNodeRef based on a particular node name
5858+ @param allocator a memory allocator to use for this object
5959+ @param session an ODSessionRef, either kODSessionDefault or a valid ODSessionRef can be passed
6060+ @param nodeName a CFStringRef of the name of the node to open
6161+ @param error an optional CFErrorRef reference for error details
6262+ @result a valid ODNodeRef if successful, otherwise returns NULL. outError can be checked for specific
6363+ error
6464+*/
6565+CF_EXPORT
6666+ODNodeRef ODNodeCreateWithName(CFAllocatorRef allocator, ODSessionRef session, CFStringRef nodeName, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
6767+6868+/*!
6969+ @function ODNodeCreateCopy
7070+ @abstract Creates a copy, including any remote credentials used for Proxy and/or Node authentication
7171+ @discussion Creates a copy of the object including all credentials used for the original. Can be used for future
7272+ references to the same node setup.
7373+ @param allocator a memory allocator to use for this object
7474+ @param node an ODNodeRef to make a copy of
7575+ @param error an optional CFErrorRef reference for error details
7676+ @result a valid ODNodeRef if successful, otherwise returns NULL, with outError set to a CFErrorRef
7777+*/
7878+CF_EXPORT
7979+ODNodeRef ODNodeCreateCopy(CFAllocatorRef allocator, ODNodeRef node, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
8080+8181+/*!
8282+ @function ODNodeCopySubnodeNames
8383+ @abstract Returns a CFArray of subnode names for this node, which may contain sub-nodes or search policy nodes
8484+ @discussion Returns a CFArray of subnode names for this node, which may contain sub-nodes or search policy nodes.
8585+ Commonly used with Search policy nodes.
8686+ @param node an ODNodeRef to use
8787+ @param error an optional CFErrorRef reference for error details
8888+ @result a CFArrayRef with the list of nodes, otherwise NULL, with outError set to a CFErrorRef
8989+*/
9090+CF_EXPORT
9191+CFArrayRef ODNodeCopySubnodeNames(ODNodeRef node, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
9292+9393+/*!
9494+ @function ODNodeCopyUnreachableSubnodeNames
9595+ @abstract Will return names of subnodes that are not currently reachable.
9696+ @discussion Will return names of subnodes that are not currently reachable. Commonly used with Search policy nodes
9797+ to determine if any nodes are currently unreachable, but may also return other subnodes if the
9898+ Open Directory plugin supports.
9999+ @param node an ODNodeRef to use
100100+ @param error an optional CFErrorRef reference for error details
101101+ @result a CFArrayRef with the list of unreachable nodes or NULL if no bad nodes
102102+*/
103103+CF_EXPORT
104104+CFArrayRef ODNodeCopyUnreachableSubnodeNames(ODNodeRef node, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
105105+106106+/*!
107107+ @function ODNodeGetName
108108+ @abstract Returns the node name of the node that was opened
109109+ @discussion Returns the node name of the node that was opened
110110+ @param node an ODNodeRef to use
111111+ @result a CFStringRef of the node name that is current or NULL if no open node
112112+*/
113113+CF_EXPORT
114114+CFStringRef ODNodeGetName(ODNodeRef node) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
115115+116116+/*!
117117+ @function ODNodeCopyDetails
118118+ @abstract Returns a dictionary with details about the node in dictionary form
119119+ @discussion Returns a dictionary with details about the node in dictionary form.
120120+ @param node an ODNodeRef to use
121121+ @param keys a CFArrayRef listing the keys the user wants returned, such as
122122+ kODAttributeTypeStreet
123123+ @param error an optional CFErrorRef reference for error details
124124+ @result a CFDictionaryRef containing the requested key and values in form of a CFArray
125125+*/
126126+CF_EXPORT
127127+CFDictionaryRef ODNodeCopyDetails(ODNodeRef node, CFArrayRef keys, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
128128+129129+/*!
130130+ @function ODNodeCopySupportedRecordTypes
131131+ @abstract Returns a CFArrayRef of the record types supported by this node.
132132+ @discussion Returns a CFArrayRef of the record types supported by this node. If node does not support the check
133133+ then all possible types will be returned.
134134+ @param node an ODNodeRef to use
135135+ @param error an optional CFErrorRef reference for error details
136136+ @result a valid CFArrayRef of CFStrings listing the supported Record types on this node.
137137+*/
138138+CF_EXPORT
139139+CFArrayRef ODNodeCopySupportedRecordTypes(ODNodeRef node, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
140140+141141+/*!
142142+ @function ODNodeCopySupportedAttributes
143143+ @abstract Will return a list of attribute types supported for that attribute if possible
144144+ @discussion Will return a list of attribute types supported for that attribute if possible. If no specific
145145+ types are available, then all possible values will be returned instead.
146146+ @param node an ODNodeRef to use
147147+ @param recordType a ODRecordTypeRef with the type of record to check attribute types. If NULL is passed it will
148148+ return all possible attributes that are available.
149149+ @param error an optional CFErrorRef reference for error details
150150+ @result a valid CFArrayRef of CFStrings listing the attributes supported for the requested record type
151151+*/
152152+CF_EXPORT
153153+CFArrayRef ODNodeCopySupportedAttributes(ODNodeRef node, ODRecordType recordType, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
154154+155155+/*!
156156+ @function ODNodeSetCredentials
157157+ @abstract Sets the credentials for interaction with the ODNode
158158+ @discussion Sets the credentials for interaction with the ODNode. Record references, etc. will use these credentials
159159+ to query or change data. Setting the credentials on a node referenced by other OD object types will
160160+ change the credentials for all for all references.
161161+ @param node an ODNodeRef to use
162162+ @param recordType a ODRecordTypeRef of the Record Type to use, if NULL is passed, defaults to a
163163+ kODRecordTypeUsers
164164+ @param recordName a CFString of the username to be used for this node authentication
165165+ @param password a CFString of the password to be used for this node authentication
166166+ @param error an optional CFErrorRef reference for error details
167167+ @result returns true on success, otherwise outError can be checked for details. If the authentication failed,
168168+ the previous credentials are used.
169169+*/
170170+CF_EXPORT
171171+bool ODNodeSetCredentials(ODNodeRef node, ODRecordType recordType, CFStringRef recordName, CFStringRef password, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
172172+173173+/*!
174174+ @function ODNodeSetCredentialsExtended
175175+ @abstract Allows use of other Open Directory types of authentications to set the credentials for an ODNode
176176+ @discussion Allows the caller to use other types of authentications that are available in Open Directory, that may
177177+ require response-request loops, etc. Not all OD plugins will support this call, look for
178178+ kODErrorCredentialsMethodNotSupported in outError.
179179+ @param node an ODNodeRef to use
180180+ @param recordType a ODRecordType of the type of record to do the authentication with
181181+ @param authType a ODAuthenticationType of the type of authentication to be used (e.g., kDSStdAuthNTLMv2)
182182+ @param authItems a CFArray of CFData or CFString items that will be sent in order to the auth process
183183+ @param outAuthItems will be assigned to a pointer of a CFArray of CFData items if there are returned values
184184+ @param outContext will return a pointer to a context if caller supplies a container, and the call requires a
185185+ context. If a non-NULL value is returned, then more calls must be made with the Context to continue
186186+ the authorization.
187187+ @param error an optional CFErrorRef reference for error details
188188+ @result a bool will be returned with the result of the operation and outAuthItems set with response items
189189+ and outContext set for any needed continuation.
190190+*/
191191+CF_EXPORT
192192+bool ODNodeSetCredentialsExtended(ODNodeRef node, ODRecordType recordType, ODAuthenticationType authType, CFArrayRef authItems, CFArrayRef *outAuthItems, ODContextRef *outContext, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
193193+194194+/*!
195195+ @function ODNodeSetCredentialsUsingKerberosCache
196196+ @abstract Unsupported function.
197197+ @discussion Unsupported function.
198198+*/
199199+CF_EXPORT
200200+bool ODNodeSetCredentialsUsingKerberosCache(ODNodeRef node, CFStringRef cacheName, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_7, __IPHONE_NA, __IPHONE_NA);
201201+202202+/*!
203203+ @function ODNodeCreateRecord
204204+ @abstract Takes a record and all of the provided attributes and creates the record in the node
205205+ @discussion Takes all the provided attributes and type to create an entire record. The function will assign a
206206+ UUID to the record automatically. This UUID can be overwritten by the client by passing with the
207207+ other attributes.
208208+ @param node an ODNodeRef to use
209209+ @param recordType a ODRecordTypeRef of the type of record (e.g., kODRecordTypeUsers, etc.)
210210+ @param recordName a CFStringRef of the name of record
211211+ @param attributeDict a CFDictionaryRef of key-value pairs for attribute values. The key is a CFStringRef of the
212212+ attribute name or ODRecordType constant such as kODAttributeTypeRecordName. The value must be a CFArrayRef of
213213+ CFDataRef or CFStringRef. If additional kODAttributeTypeRecordName are to be set, they can be passed in the
214214+ inAttributes list. This parameter is optional and can be NULL. If any of the attributes passed
215215+ fail to be set, the record will be deleted and outError will be set with the appropriate error.
216216+ If a password is not supplied with a user account, then a random password will be set automatically. If
217217+ an empty password is expected, then the kODAttributeTypePassword should be set to an empty CFArray.
218218+ @param error an optional CFErrorRef reference for error details
219219+ @result returns a valid ODRecordRef. If the add fails, outError can be checked for details.
220220+*/
221221+CF_EXPORT
222222+ODRecordRef ODNodeCreateRecord(ODNodeRef node, ODRecordType recordType, CFStringRef recordName, CFDictionaryRef attributeDict, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
223223+224224+/*!
225225+ @function ODNodeCopyRecord
226226+ @abstract Simple API to open / create a references to a particular record on a Node
227227+ @discussion Simple API to open / create a references to a particular record on a Node
228228+ @param node an ODNodeRef to use
229229+ @param recordType a ODRecordTypeRef of the record type to copy
230230+ @param recordName a CFStringRef of the record name to copy
231231+ @param attributes (optional) a CFArrayRef (or single ODAttributeType) of the attributes to copy from the directory. Can be NULL when no
232232+ attributes are needed. Any standard types can be passed, for example
233233+ kODAttributeTypeAllAttributes will fetch all attributes up front. If just standard attributes are needed, then
234234+ kODAttributeTypeStandardOnly can be passed.
235235+ @param error an optional CFErrorRef reference for error details
236236+ @result returns a valid ODRecordRef. If the record copy fails, the error can be checked for details.
237237+ If the record is not found, will return NULL with a NULL error.
238238+*/
239239+CF_EXPORT
240240+ODRecordRef ODNodeCopyRecord(ODNodeRef node, ODRecordType recordType, CFStringRef recordName, CFTypeRef attributes, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
241241+242242+/*!
243243+ @function ODNodeCustomCall
244244+ @abstract Sends a custom call to a node.
245245+ @discussion This will send a custom call to a node along with the specified data, returning the result.
246246+ @param node an ODNodeRef to use
247247+ @param customCode the custom code to be sent to the node
248248+ @param data a data blob expected by the custom code, can be NULL of no send data
249249+ @param error an optional CFErrorRef reference for error details
250250+ @result a CFDataRef with the result of the operation, otherwise outError can be checked for specific details
251251+*/
252252+CF_EXPORT CF_RETURNS_RETAINED
253253+CFDataRef ODNodeCustomCall(ODNodeRef node, CFIndex customCode, CFDataRef data, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
254254+255255+/*!
256256+ * @function ODNodeCustomCall
257257+ *
258258+ * @abstract
259259+ * Sends a named custom function call to a node.
260260+ *
261261+ * @discussion
262262+ * Sends a named custom function call to a node. Custom functions are defined by the modules that implement them
263263+ * and the parameter is defined by the module.
264264+ *
265265+ * @param node
266266+ * An ODNodeRef to use
267267+ *
268268+ * @param function
269269+ * A CFStringRef that specifies the name of the function
270270+ *
271271+ * @param payload
272272+ * A CFType appropriate for the custom function. The type is dictated by the module implementing the function.
273273+ *
274274+ * @param error
275275+ * An optional CFErrorRef reference to receive any errors from the custom function call.
276276+ *
277277+ * @result
278278+ * Returns a CFType appropriate for the function.
279279+ */
280280+CF_EXPORT CF_RETURNS_RETAINED
281281+CFTypeRef
282282+ODNodeCustomFunction(ODNodeRef node, CFStringRef function, CFTypeRef payload, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
283283+284284+/*!
285285+ @function ODNodeCopyPolicies
286286+ @abstract This will copy any policies configured for the node.
287287+ @discussion This will copy any policies configured for the node.
288288+ @param node an ODNodeRef to use
289289+ @param error an optional CFErrorRef reference for error details
290290+ @result a CFDictionaryRef containing all currently set policies
291291+*/
292292+CF_EXPORT
293293+CFDictionaryRef ODNodeCopyPolicies(ODNodeRef node, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODNodeCopyAccountPolicies");
294294+295295+/*!
296296+ @function ODNodeCopySupportedPolicies
297297+ @abstract This will return a dictionary of supported policies.
298298+ @discussion This will return a dictionary of supported policies, if appropriate, the value will be the maximum value allowed
299299+ for the policy in question. For example, if password history is available, it will state how much history is
300300+ supported.
301301+ @param node an ODNodeRef to use
302302+ @param error an optional CFErrorRef reference for error details
303303+ @result a CFDictionaryRef containing all currently supported policies. The values will be the maximum value allowed.
304304+*/
305305+CF_EXPORT
306306+CFDictionaryRef ODNodeCopySupportedPolicies(ODNodeRef node, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA);
307307+308308+/*!
309309+ @function ODNodeSetPolicies
310310+ @abstract This will set the policy for the node.
311311+ @discussion This will set the policy for the node. Policies are evaluated in combination with record-level policies.
312312+ @param node an ODNodeRef to use
313313+ @param policies a CFDictionary of policies to be set
314314+ @param error an optional CFErrorRef reference for error details
315315+ @result a bool which signifies if the policy set succeeded, otherwise error is set.
316316+*/
317317+CF_EXPORT
318318+bool ODNodeSetPolicies(ODNodeRef node, CFDictionaryRef policies, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODNodeSetAccountPolicies");
319319+320320+/*!
321321+ @function ODNodeSetPolicy
322322+ @abstract This will set a specific policy setting for the node.
323323+ @discussion This will set a specific policy setting for the node.
324324+ @param node an ODNodeRef to use
325325+ @param policy a valid ODPolicyType
326326+ @param value a CFTypeRef to be set (should be of appropriate type for the policy)
327327+ @param error an optional CFErrorRef reference for error details
328328+ @result a bool which signifies if the policy set succeeded, otherwise error is set.
329329+*/
330330+CF_EXPORT
331331+bool ODNodeSetPolicy(ODNodeRef node, ODPolicyType policyType, CFTypeRef value, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODNodeAddAccountPolicy");
332332+333333+/*!
334334+ @function ODNodeRemovePolicy
335335+ @abstract This will remove a specific policy setting from the node.
336336+ @discussion This will remove a specific policy setting from the node.
337337+ @param node an ODNodeRef to use
338338+ @param policy a valid ODPolicyType
339339+ @param error an optional CFErrorRef reference for error details
340340+ @result a bool which signifies if the policy removal succeeded, otherwise error is set.
341341+*/
342342+CF_EXPORT
343343+bool ODNodeRemovePolicy(ODNodeRef node, ODPolicyType policyType, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODNodeRemoveAccountPolicy");
344344+345345+/*!
346346+ @function ODNodeAddAccountPolicy
347347+ @abstract This will add an account policy to the node for the specified category.
348348+ @discussion This will add an account policy to the node for the specified category.
349349+ The specified policy will be applied to all users in the
350350+ specified node when policies are evaluated.
351351+ @param node an ODNodeRef to use.
352352+ @param policy a dictionary containing the specific policy to be added.
353353+ The dictionary may contain the following keys:
354354+ kODPolicyKeyIdentifier a required key identifying the policy.
355355+ kODPolicyKeyParameters an optional key containing a dictionary of
356356+ parameters that can be used for informational purposes or in
357357+ the policy format string.
358358+ kODPolicyKeyContent a required key specifying the policy,
359359+ from which a predicate will be created for evaluating
360360+ the policy.
361361+ @param category a valid ODPolicyCategoryType to which the specified policy will be added.
362362+ @param error an optional CFErrorRef reference for error details.
363363+ @result a bool which signifies if the policy addition succeeded, otherwise error is set.
364364+*/
365365+CF_EXPORT
366366+bool ODNodeAddAccountPolicy(ODNodeRef node, CFDictionaryRef policy, ODPolicyCategoryType category, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
367367+368368+/*!
369369+ @function ODNodeRemoveAccountPolicy
370370+ @abstract This will remove an account policy from the node for the specified category.
371371+ @discussion This will remove an account policy from the node for the specified category.
372372+ @param node an ODNodeRef to use.
373373+ @param policy a dictionary containing the specific policy to be
374374+ removed, with the same format as described in ODNodeAddAccountPolicy.
375375+ @param category a valid ODPolicyCategoryType from which the specified policy will be removed.
376376+ @param error an optional CFErrorRef reference for error details.
377377+ @result a bool which signifies if the policy removal succeeded, otherwise error is set.
378378+*/
379379+CF_EXPORT
380380+bool ODNodeRemoveAccountPolicy(ODNodeRef node, CFDictionaryRef policy, ODPolicyCategoryType category, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
381381+382382+/*!
383383+ @function ODNodeSetAccountPolicies
384384+ @abstract This will set the policies for the node.
385385+ @discussion This will set the policies for the node, replacing any existing
386386+ policies.
387387+ @param node an ODNodeRef to use.
388388+ @param policies a dictionary containing all of the policies to be set
389389+ for the node. The dictionary may contain the following keys:
390390+ kODPolicyCategoryAuthentication an optional key with a value
391391+ of an array of policy dictionaries that specify when
392392+ authentications should be allowed.
393393+ kODPolicyCategoryPasswordContent an optional key with a
394394+ value of an array of policy dictionaries the specify the
395395+ required content of passwords.
396396+ kODPolicyCategoryPasswordChange an optional key with a value
397397+ of an array of policy dictionaries that specify when
398398+ passwords are required to be changed.
399399+ @param error an optional CFErrorRef reference for error details.
400400+ @result a bool which signifies if the policy set succeeded, otherwise error is set.
401401+*/
402402+CF_EXPORT
403403+bool ODNodeSetAccountPolicies(ODNodeRef node, CFDictionaryRef policies, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
404404+405405+/*!
406406+ @function ODNodeCopyAccountPolicies
407407+ @abstract This will copy any policies configured for the node.
408408+ @discussion This will copy any policies configured for the node.
409409+ @param node an ODNodeRef to use.
410410+ @param error an optional CFErrorRef reference for error details.
411411+ @result a CFDictionaryRef containing all currently set policies. The
412412+ format of the dictionary is the same as described in
413413+ ODNodeSetAccountPolicies().
414414+*/
415415+CF_EXPORT CF_RETURNS_RETAINED
416416+CFDictionaryRef ODNodeCopyAccountPolicies(ODNodeRef node, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
417417+418418+/*!
419419+ @function ODNodePasswordContentCheck
420420+ @abstract Validates a password against the node's password content policies.
421421+ @discussion Validates a password against the node's password content policies.
422422+ The node's password content policies will be evaluated to
423423+ determine if the password is acceptable. May be used prior to
424424+ creating the record.
425425+426426+ This check is only definitive at the time it was requested. The
427427+ policy or the environment could change before the password change
428428+ is actually requested. Errors from the password change request
429429+ should be consulted.
430430+431431+ @param node an ODNodeRef to use.
432432+ @param password the password to be evaluated against the content policies.
433433+ @param recordName the name of the record.
434434+ @param error an optional CFErrorRef reference for error details.
435435+ @result a bool which signifies if the password passes all content policies, otherwise error is set.
436436+ */
437437+CF_EXPORT
438438+bool ODNodePasswordContentCheck(ODNodeRef node, CFStringRef password, CFStringRef recordName, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
439439+440440+__END_DECLS
441441+442442+#endif /* ! __OPENDIRECTORY_CFODNODE__ */
···11+/*
22+ * Copyright (c) 2009 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#if !defined(__OPENDIRECTORY_CFODQUERY__)
2525+#define __OPENDIRECTORY_CFODQUERY__ 1
2626+2727+#include <CFOpenDirectory/CFOpenDirectory.h>
2828+2929+/*!
3030+ @header CFODQuery
3131+ @abstract ODQuery functions
3232+ @discussion This header describes functions for working with ODQueryRefs.
3333+*/
3434+3535+/*!
3636+ @typedef ODQueryCallback
3737+ @abstract Is called as results are returned from a query. The incoming result must be retained or copied.
3838+ @discussion Is called as results are returned from an CFRunLoop-based query. These results are only partial
3939+ and the callback is called repeatedly as results are available. The incoming result must be retained or copied. The
4040+ array will be released by the CFRunLoop upon return. Incoming results do not include previous results,
4141+ only the most recent results are returned. inResults can be NULL if an error occurs or the query is complete. If
4242+ inError and inResults are NULL then the query has completed.
4343+*/
4444+typedef void (*ODQueryCallback)(ODQueryRef query, CFArrayRef results, CFErrorRef error, void *context);
4545+4646+__BEGIN_DECLS
4747+4848+/*!
4949+ @function ODQueryGetTypeID
5050+ @abstract Standard GetTypeID function support for CF-based objects
5151+ @discussion Returns the typeID for the ODQuery object
5252+ @result a valid CFTypeID for the ODQuery object
5353+*/
5454+CF_EXPORT
5555+CFTypeID ODQueryGetTypeID(void) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
5656+5757+/*!
5858+ @function ODQueryCreateWithNode
5959+ @abstract Creates a query with the node using the parameters provided
6060+ @discussion Creates a query with the node using the supplied query parameters. Some parameters can either be CFString or
6161+ CFData or a CFArray of either CFString or CFData.
6262+ @param allocator a memory allocator to use for this object
6363+ @param node an ODNodeRef to use
6464+ @param recordTypeOrList a CFString of a type or CFArray with a list of record types
6565+ @param attribute a CFStringRef of the attribute name to query
6666+ @param matchType an ODMatchType value that signifies the type of query
6767+ @param queryValueOrList a CFStringRef, CFDataRef or CFArrayRef of either type for values to query in attribute
6868+ @param returnAttributeOrList a CFStringRef or CFArrayRef of CFStrings with the list of attributes to be returned
6969+ from the query. Passing NULL is equivalent to passing kODAttributeTypeStandardOnly.
7070+ @param maxResults a CFIndex of the total number of values the caller wants to be returned
7171+ @param error an optional CFErrorRef reference for error details
7272+ @result an ODQueryRef which should be passed into ODQueryCopyResults for immediate results or
7373+ ODQueryScheduleWithRunLoop for background behavior
7474+*/
7575+CF_EXPORT
7676+ODQueryRef ODQueryCreateWithNode(CFAllocatorRef allocator, ODNodeRef node, CFTypeRef recordTypeOrList, ODAttributeType attribute, ODMatchType matchType, CFTypeRef queryValueOrList, CFTypeRef returnAttributeOrList, CFIndex maxResults, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
7777+7878+/*!
7979+ @function ODQueryCreateWithNodeType
8080+ @abstract Creates a query object that is initialized to a particular node type.
8181+ @discussion Creates a query object that is initialized to a particular node type using the supplied
8282+ query options.
8383+ @param allocator a memory allocator to use for this object
8484+ @param nodeType an ODNodeType to use when doing a query
8585+ @param recordTypeOrList a ODRecordType of a type or CFArray with a list of record types
8686+ @param attribute a ODAttributeType or CFStringRef of the attribute name to query
8787+ @param matchType an ODMatchType value that signifies the type of query
8888+ @param queryValueOrList a CFStringRef, CFDataRef or CFArrayRef of either type for values to query in attribute
8989+ @param returnAttributeOrList a CFStringRef or CFArrayRef of CFStrings with the list of attributes to be returned
9090+ from the query. Passing NULL is equivalent to passing kODAttributeTypeStandardOnly.
9191+ @param maxResults a CFIndex of the total number of values the caller wants to be returned
9292+ @param error an optional CFErrorRef reference for error details
9393+ @result an ODQueryRef which should be passed into ODQueryCopyResults for immediate results or
9494+ ODQueryScheduleWithRunLoop for background behavior, see ODQueryCallback for details on RunLoop
9595+ behavior.
9696+*/
9797+CF_EXPORT
9898+ODQueryRef ODQueryCreateWithNodeType(CFAllocatorRef allocator, ODNodeType nodeType, CFTypeRef recordTypeOrList, ODAttributeType attribute, ODMatchType matchType, CFTypeRef queryValueOrList, CFTypeRef returnAttributeOrList, CFIndex maxResults, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
9999+100100+/*!
101101+ @function ODQueryCopyResults
102102+ @abstract Returns results from a provided ODQueryRef synchronously
103103+ @discussion Returns results from a provided ODQueryRef synchronously. Passing false to inAllowPartialResults
104104+ will block the call until all results are returned or an error occurs. true can be passed at any time
105105+ even if previous calls were made with false.
106106+ @param query an ODQueryRef to use
107107+ @param allowPartialResults a bool, passing true to retrieve any currently available results, or false to
108108+ wait for all results
109109+ @param error an optional CFErrorRef reference for error details
110110+ @result a CFArrayRef comprised of ODRecord objects. If partial results were requested but are complete, then
111111+ NULL will be returned with outError set to NULL. If an error occurs, NULL will be returned and
112112+ outError should be checked accordingly.
113113+*/
114114+CF_EXPORT
115115+CFArrayRef ODQueryCopyResults(ODQueryRef query, bool allowPartialResults, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
116116+117117+/*!
118118+ @function ODQuerySynchronize
119119+ @abstract Will dispose of any results and restart the query.
120120+ @discussion Will dispose of any results and restart the query for subsequent ODQueryCopyResults. If the query
121121+ is currently scheduled on a RunLoop, then the callback function will be called with inResults == NULL and
122122+ inError.error == kODErrorQuerySynchronize and inError.domain == kODErrorDomainFramework, signifying that
123123+ all existing results should be thrown away in preparation for new results.
124124+ @param query an ODQueryRef to use
125125+*/
126126+CF_EXPORT
127127+void ODQuerySynchronize(ODQueryRef query) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
128128+129129+/*!
130130+ @function ODQuerySetCallback
131131+ @abstract This call is used to set the callback function for an asynchronous query
132132+ @discussion This call is used to set the callback function for an asynchronous query, using a
133133+ CFRunLoop or a dispatch queue.
134134+ @param query an ODQueryRef to use
135135+ @param callback a function to call when a query has results to return
136136+ @param userInfo a user-defined pointer to be passed back to the Query callback function
137137+*/
138138+CF_EXPORT
139139+void ODQuerySetCallback(ODQueryRef query, ODQueryCallback callback, void *userInfo) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
140140+141141+/*!
142142+ @function ODQueryScheduleWithRunLoop
143143+ @abstract Allows a query to run off of a runloop, though it will spawn a thread to handle the work
144144+ @discussion Allows a query to run off of a runloop, though it will spawn a thread to handle the work.
145145+ When query is complete or stopped the callback function will be called with NULL results
146146+ and inError set to NULL. ODQueryUnscheduleFromRunLoop() must be called to remove this query
147147+ from Runloops if necessary.
148148+ @param query an ODQueryRef to put on the runloop
149149+ @param runLoop a CFRunLoopRef to put the ODQueryRef source onto
150150+ @param runLoopMode a CFStringRef with the runloop mode to add the ODQueryRef to
151151+*/
152152+CF_EXPORT
153153+void ODQueryScheduleWithRunLoop(ODQueryRef query, CFRunLoopRef runLoop, CFStringRef runLoopMode) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
154154+155155+/*!
156156+ @function ODQueryUnscheduleFromRunLoop
157157+ @abstract Removes the ODQueryRef from the provided runloop
158158+ @discussion Removes the ODQueryRef from the provided runloop
159159+ @param query an ODQueryRef to remove from the runloop
160160+ @param runLoop a CFRunLoopRef to remove the ODQuery source from
161161+ @param runLoopMode a CFStringRef of the mode to remove the ODQuery from
162162+*/
163163+CF_EXPORT
164164+void ODQueryUnscheduleFromRunLoop(ODQueryRef query, CFRunLoopRef runLoop, CFStringRef runLoopMode) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
165165+166166+/*!
167167+ @function ODQuerySetDispatchQueue
168168+ @abstract Performs the query and sends the results using the specified dispatch queue
169169+ @discussion Schedule the query to run and deliver its results using the specified dispatch queue.
170170+ The previously set callback will be called using the same semantics as
171171+ ODQueryScheduleWithRunLoop
172172+ @param query an ODQueryRef to perform
173173+ @param queue a dispatch queue to receive the query results
174174+*/
175175+CF_EXPORT
176176+void ODQuerySetDispatchQueue(ODQueryRef query, dispatch_queue_t queue) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
177177+178178+__END_DECLS
179179+180180+#endif /* ! __OPENDIRECTORY_CFODQUERY__ */
···11+/*
22+ * Copyright (c) 2009 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#if !defined(__OPENDIRECTORY_CFODRECORD__)
2525+#define __OPENDIRECTORY_CFODRECORD__
2626+2727+#include <CFOpenDirectory/CFOpenDirectory.h>
2828+2929+__BEGIN_DECLS
3030+3131+/*!
3232+ @function ODRecordGetTypeID
3333+ @abstract Standard GetTypeID function support for CF-based objects
3434+ @discussion Returns the typeID for the ODRecord object
3535+ @result a valid CFTypeID for the ODRecord object
3636+*/
3737+CF_EXPORT
3838+CFTypeID ODRecordGetTypeID(void) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
3939+4040+/*!
4141+ @function ODRecordSetNodeCredentials
4242+ @abstract Similar to calling ODNodeSetCredentials except credentials are only set for this particular record's node
4343+ @discussion Sets the credentials if necessary on the ODNodeRef referenced by this ODRecordRef. Very similar to
4444+ calling ODNodeSetCredentials except other records referencing the underlying ODNodeRef will not get
4545+ authenticated, therefore inadvertant changes cannot occur. If all records referencing a particular
4646+ ODNodeRef need to be updated, then use ODNodeSetCredentials on the original ODNodeRef instead. If the
4747+ ODNodeRef is already authenticated with the same name and password, this will be a NOOP call. The original
4848+ ODNodeRef held by an ODRecordRef will be released and a new ODNodeRef will be created when the credentials
4949+ are set for this ODRecordRef. Calling this on multiple records could result in multiple References into the
5050+ OpenDirectory daemon, which could cause errors logged into /var/log/system.log if a threshold is reached.
5151+ @param record an ODRecordRef to use
5252+ @param username a CFStringRef of the username used to authenticate
5353+ @param password a CFStringRef of the password used to authenticate
5454+ @param error an optional CFErrorRef reference for error details
5555+ @result returns true on success, otherwise outError can be checked for details. Upon failure the original node
5656+ will still be intact.
5757+*/
5858+CF_EXPORT
5959+bool ODRecordSetNodeCredentials(ODRecordRef record, CFStringRef username, CFStringRef password, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
6060+6161+/*!
6262+ @function ODRecordSetNodeCredentialsExtended
6363+ @abstract Similar to calling ODNodeSetCredentialsExtended except credentials are only set for this particular record's
6464+ node
6565+ @discussion Allows the caller to use other types of authentications that are available in Open Directory, that may
6666+ require response-request loops, etc. Not all OD plugins will support this call, look for
6767+ kODErrorCredentialsMethodNotSupported in outError. Same behavior as ODRecordSetNodeCredentials.
6868+ @param record an ODRecordRef to use
6969+ @param recordType a ODRecordTypeRef of the type of record to do the authentication with
7070+ @param authType a ODAuthenticationTypeRef of the type of authentication to be used (e.g., kDSStdAuthNTLMv2)
7171+ @param authItems a CFArrayRef of CFData or CFString items that will be sent in order to the auth process
7272+ @param outAuthItems a pointer to CFArrayRef that will be assigned to a CFArrayRef of CFData items if the
7373+ call returned any values followup values
7474+ @param outContext a pointer to ODContextRef if the call requires further calls for response-request auths.
7575+ @param error an optional CFErrorRef reference for error details
7676+ @result a bool will be returned with the result of the operation and outAuthItems set with response items
7777+ and outContext set for any needed continuation. Upon failure the original node will still be intact.
7878+*/
7979+CF_EXPORT
8080+bool ODRecordSetNodeCredentialsExtended(ODRecordRef record, ODRecordType recordType, ODAuthenticationType authType, CFArrayRef authItems, CFArrayRef *outAuthItems, ODContextRef *outContext, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
8181+8282+/*!
8383+ @function ODRecordSetNodeCredentialsUsingKerberosCache
8484+ @abstract Unsupported function.
8585+ @discussion Unsupported function.
8686+*/
8787+CF_EXPORT
8888+bool ODRecordSetNodeCredentialsUsingKerberosCache(ODRecordRef record, CFStringRef cacheName, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_7, __IPHONE_NA, __IPHONE_NA);
8989+9090+/*!
9191+ @function ODRecordCopyPasswordPolicy
9292+ @abstract Returns a CFDictionaryRef of the effective policy for the user if available
9393+ @discussion Returns a CFDictionaryRef of the effective policy for the user if available
9494+ @param allocator a CFAllocatorRef to use
9595+ @param record an ODRecordRef to use
9696+ @param error an optional CFErrorRef reference for error details
9797+ @result a CFDictionaryRef of the password policies for the supplied record, or NULL if no policy set
9898+*/
9999+CF_EXPORT
100100+CFDictionaryRef ODRecordCopyPasswordPolicy(CFAllocatorRef allocator, ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_6, __MAC_10_9, __IPHONE_NA, __IPHONE_NA, "use ODRecordCopyEffectivePolicies");
101101+102102+/*!
103103+ @function ODRecordVerifyPassword
104104+ @abstract Verifies the password provided is valid for the record
105105+ @discussion Verifies the password provided is valid for the record.
106106+ @param record an ODRecordRef to use
107107+ @param password a CFStringRef of the password that is being verified
108108+ @param error an optional CFErrorRef reference for error details
109109+ @result returns true on success, otherwise outError can be checked for details
110110+*/
111111+CF_EXPORT
112112+bool ODRecordVerifyPassword(ODRecordRef record, CFStringRef password, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
113113+114114+/*!
115115+ @function ODRecordVerifyPasswordExtended
116116+ @abstract Allows use of other Open Directory types of authentications to verify a record password
117117+ @discussion Allows the caller to use other types of authentications that are available in Open Directory, that may
118118+ require response-request loops, etc.
119119+ @param record an ODRecordRef to use
120120+ @param authType a ODAuthenticationTypeRef of the type of authentication to be used (e.g., kODAuthenticationTypeCRAM_MD5)
121121+ @param authItems a CFArrayRef of CFData or CFString items that will be sent in order to the auth process
122122+ @param outAuthItems a pointer to CFArrayRef that will be assigned to a CFArrayRef of CFData items if the
123123+ call returned any values followup values
124124+ @param outContext a pointer to ODContextRef if the call requires further calls for response-request auths.
125125+ @param error an optional CFErrorRef reference for error details
126126+ @result a bool will be returned with the result of the operation and outAuthItems set with response items
127127+ and outContext set for any needed continuation. Some ODNodes may not support the call so an error of
128128+ eNotHandledByThisNode or eNotYetImplemented may be returned.
129129+*/
130130+CF_EXPORT
131131+bool ODRecordVerifyPasswordExtended(ODRecordRef record, ODAuthenticationType authType, CFArrayRef authItems, CFArrayRef *outAuthItems, ODContextRef *outContext, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
132132+133133+/*!
134134+ @function ODRecordChangePassword
135135+ @abstract Changes the password of an ODRecord
136136+ @discussion Changes the password of an ODRecord. If NULL is passed into inOldPassword, then an attempt to set
137137+ the password will be tried. If changing a password, then both old and new passwords should be supplied.
138138+ @param record an ODRecordRef to use
139139+ @param oldPassword a CFString of the record's old password (NULL is optional).
140140+ @param newPassword a CFString of the record's new password
141141+ @param error an optional CFErrorRef reference for error details
142142+ @result returns true on success, otherwise outError can be checked for details
143143+*/
144144+CF_EXPORT
145145+bool ODRecordChangePassword(ODRecordRef record, CFStringRef oldPassword, CFStringRef newPassword, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
146146+147147+/*!
148148+ @function ODRecordGetRecordType
149149+ @abstract Returns the record type of an ODRecordRef
150150+ @discussion Returns the record type of an ODRecordRef
151151+ @param record an ODRecordRef to use
152152+ @result a CFStringRef of the record type for this ODRecordRef
153153+*/
154154+CF_EXPORT
155155+CFStringRef ODRecordGetRecordType(ODRecordRef record) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
156156+157157+/*!
158158+ @function ODRecordGetRecordName
159159+ @abstract Returns the official record name of an ODRecordRef
160160+ @discussion Returns the official record name of an ODRecordRef which typically corresponds to the first value
161161+ of the kODAttributeTypeRecordName attribute, but not always. This name should be a valid name in either case.
162162+ @param record an ODRecordRef to use
163163+ @result a CFStringRef of the record name for this ODRecordRef
164164+*/
165165+CF_EXPORT
166166+CFStringRef ODRecordGetRecordName(ODRecordRef record) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
167167+168168+/*!
169169+ @function ODRecordCopyValues
170170+ @abstract Returns the value of an attribute as an array of CFStringRef or CFDataRef types
171171+ @discussion Returns the value of an attribute as an array of CFStringRef or CFDataRef, depending on
172172+ whether the data is Binary or not. If the value has been fetched from the directory previously
173173+ a copy of the internal storage will be returned without going to the directory. If it has not been fetched
174174+ previously, then it will be fetched at that time.
175175+ @param record an ODRecordRef to use
176176+ @param attribute a CFStringRef or ODAttributeType of the attribute (e.g., kODAttributeTypeRecordName, etc.)
177177+ @param error an optional CFErrorRef reference for error details
178178+ @result a CFArrayRef of the attribute requested if possible, or NULL if the attribute doesn't exist
179179+*/
180180+CF_EXPORT
181181+CFArrayRef ODRecordCopyValues(ODRecordRef record, ODAttributeType attribute, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
182182+183183+/*!
184184+ @function ODRecordSetValue
185185+ @abstract Will take a CFDataRef or CFStringRef or a CFArrayRef of either type and set it for the attribute
186186+ @discussion Will take a CFDataRef or CFStringRef or a CFArrayRef of either type and set it for the attribute.
187187+ Any mixture of the types CFData and CFString are accepted.
188188+ @param record an ODRecordRef to use
189189+ @param attribute a CFStringRef of the attribute for values to be added too
190190+ @param valueOrValues a CFArrayRef of CFStringRef or CFDataRef types or either of the individual types, passing
191191+ an empty CFArray deletes the attribute. The underlying implementation will do this in the most efficient manner,
192192+ either by adding only new values or completely replacing the values depending on the capabilities of the
193193+ particular plugin.
194194+ @param error an optional CFErrorRef reference for error details
195195+ @result returns true on success, otherwise outError can be checked for details
196196+*/
197197+CF_EXPORT
198198+bool ODRecordSetValue(ODRecordRef record, ODAttributeType attribute, CFTypeRef valueOrValues, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
199199+200200+/*!
201201+ @function ODRecordAddValue
202202+ @abstract Adds a value to an attribute
203203+ @discussion Adds a value to an attribute.
204204+ @param record an ODRecordRef to use
205205+ @param attribute a CFStringRef of the attribute for values to be added too
206206+ @param value a CFTypeRef of the value to be added to the attribute, either CFStringRef or CFDataRef
207207+ @param error an optional CFErrorRef reference for error details
208208+ @result returns true on success, otherwise outError can be checked for details
209209+*/
210210+CF_EXPORT
211211+bool ODRecordAddValue(ODRecordRef record, ODAttributeType attribute, CFTypeRef value, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
212212+213213+/*!
214214+ @function ODRecordRemoveValue
215215+ @abstract Removes a particular value from an attribute.
216216+ @discussion Removes a particular value from an attribute.
217217+ @param record an ODRecordRef to use
218218+ @param attribute a CFStringRef of the attribute to remove the value from
219219+ @param value a CFTypeRef of the value to be removed from the attribute. Either CFStringRef or CFDataRef.
220220+ If the value does not exist, true will be returned and no error will be set.
221221+ @param error an optional CFErrorRef reference for error details
222222+ @result returns true on success, otherwise outError can be checked for details
223223+*/
224224+CF_EXPORT
225225+bool ODRecordRemoveValue(ODRecordRef record, ODAttributeType attribute, CFTypeRef value, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
226226+227227+/*!
228228+ @function ODRecordCopyDetails
229229+ @abstract Returns the attributes and values in the form of a key-value pair set for this record.
230230+ @discussion Returns the attributes and values in the form of a key-value pair set for this record. The key is a
231231+ CFStringRef or ODAttributeType of the attribute name (e.g., kODAttributeTypeRecordName, etc.) and the
232232+ value is an CFArrayRef of either CFDataRef or CFStringRef depending on the type of data. Binary data will
233233+ be returned as CFDataRef.
234234+ @param record an ODRecordRef to use
235235+ @param attributes a CFArrayRef of attributes. If an attribute has not been fetched previously, it will be
236236+ fetched in order to return the value. If this parameter is NULL then all currently fetched attributes
237237+ will be returned.
238238+ @param error an optional CFErrorRef reference for error details
239239+ @result a CFDictionaryRef of the attributes for the record
240240+*/
241241+CF_EXPORT
242242+CFDictionaryRef ODRecordCopyDetails(ODRecordRef record, CFArrayRef attributes, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
243243+244244+/*!
245245+ @function ODRecordSynchronize
246246+ @abstract Synchronizes the record from the Directory in order to get current data and commit pending changes
247247+ @discussion Synchronizes the record from the Directory in order to get current data. Any previously fetched attributes
248248+ will be refetched from the Directory. This will not refetch the entire record, unless the entire record
249249+ has been accessed. Additionally, any changes made to the record will be committed to the directory
250250+ if the node does not do immediate commits.
251251+ @param record an ODRecordRef to use
252252+ @param error an optional CFErrorRef reference for error details
253253+*/
254254+CF_EXPORT
255255+bool ODRecordSynchronize(ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
256256+257257+/*!
258258+ @function ODRecordDelete
259259+ @abstract Deletes the record from the node and invalidates the record.
260260+ @discussion Deletes the record from the node and invalidates the record. The ODRecordRef should be
261261+ released after deletion.
262262+ @param record an ODRecordRef to use
263263+ @param error an optional CFErrorRef reference for error details
264264+ @result returns true on success, otherwise outError can be checked for details
265265+*/
266266+CF_EXPORT
267267+bool ODRecordDelete(ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
268268+269269+/*!
270270+ @function ODRecordAddMember
271271+ @abstract Will add the record as a member of the group record that is provided
272272+ @discussion Will add the record as a member of the group record that is provided in an appopriate manner
273273+ based on what the directory will store. An error will be returned if the record is not a group record.
274274+ Additionally, if the member record is not an appropriate type allowed as part of a group an
275275+ error will be returned.
276276+ @param group an ODRecordRef of the group record to modify
277277+ @param member an ODRecordRef of the record to add to the group record
278278+ @param error an optional CFErrorRef reference for error details
279279+ @result returns true on success, otherwise outError can be checked for details
280280+*/
281281+CF_EXPORT
282282+bool ODRecordAddMember(ODRecordRef group, ODRecordRef member, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
283283+284284+/*!
285285+ @function ODRecordRemoveMember
286286+ @abstract Will remove the record as a member from the group record that is provided
287287+ @discussion Will remove the record as a member from the group record that is provided. If the record type
288288+ of group is not a Group, false will be returned with an appropriate error.
289289+ @param group an ODRecordRef of the group record to modify
290290+ @param member an ODRecordRef of the record to remove from the group record
291291+ @param error an optional CFErrorRef reference for error details
292292+ @result returns true on success, otherwise outError can be checked for details
293293+*/
294294+CF_EXPORT
295295+bool ODRecordRemoveMember(ODRecordRef group, ODRecordRef member, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
296296+297297+/*!
298298+ @function ODRecordContainsMember
299299+ @abstract Will use membership APIs to resolve group membership based on Group and Member record combination
300300+ @discussion Will use membership APIs to resolve group membership based on Group and Member record combination.
301301+ This API does not check attributes values directly, instead uses system APIs to deal with nested
302302+ memberships.
303303+ @param group an ODRecordRef of the group to be checked for membership
304304+ @param member an ODRecordRef of the member to be checked against the group
305305+ @param error an optional CFErrorRef reference for error details
306306+ @result returns true or false depending on result
307307+*/
308308+CF_EXPORT
309309+bool ODRecordContainsMember(ODRecordRef group, ODRecordRef member, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
310310+311311+/*!
312312+ @function ODRecordCopyPolicies
313313+ @abstract This will copy any policies configured for the record.
314314+ @discussion This will copy any policies configured for the record.
315315+ @param record an ODRecordRef to use
316316+ @param error an optional CFErrorRef reference for error details
317317+ @result a CFDictionaryRef containing all currently configured policies
318318+*/
319319+CF_EXPORT
320320+CFDictionaryRef ODRecordCopyPolicies(ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODRecordCopyAccountPolicies");
321321+322322+/*!
323323+ @function ODRecordCopyEffectivePolicies
324324+ @abstract This will copy the effective policies for the record (merging any node-level policies).
325325+ @discussion This will copy the effective policies for the record (merging any node-level policies).
326326+ @param record an ODRecordRef to use
327327+ @param error an optional CFErrorRef reference for error details
328328+ @result a CFDictionaryRef containing all currently configured policies (merging any node-level policies)
329329+*/
330330+CF_EXPORT
331331+CFDictionaryRef ODRecordCopyEffectivePolicies(ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODRecordAuthenticationAllowed and similar functions");
332332+333333+/*!
334334+ @function ODRecordCopySupportedPolicies
335335+ @abstract This will return a dictionary of supported policies.
336336+ @discussion This will return a dictionary of supported policies, if appropriate, the value will be the maximum value allowed
337337+ for the policy in question. For example, if password history is available, it will state how much history is
338338+ supported.
339339+ @param record an ODRecordRef to use
340340+ @param error an optional CFErrorRef reference for error details
341341+ @result a CFDictionaryRef containing all currently supported policies
342342+*/
343343+CF_EXPORT
344344+CFDictionaryRef ODRecordCopySupportedPolicies(ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA);
345345+346346+/*!
347347+ @function ODRecordSetPolicies
348348+ @abstract This will set the policy for the record.
349349+ @discussion This will set the policy for the record. Policies are evaluated in combination with node-level policies.
350350+ @param record an ODRecordRef to use
351351+ @param policies a CFDictionary of policies to be set
352352+ @param error an optional CFErrorRef reference for error details
353353+ @result a bool which signifies if the policy set succeeded, otherwise error is set.
354354+*/
355355+CF_EXPORT
356356+bool ODRecordSetPolicies(ODRecordRef record, CFDictionaryRef policies, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODRecordSetAccountPolicies");
357357+358358+/*!
359359+ @function ODRecordSetPolicy
360360+ @abstract This will set a specific policy setting for the record.
361361+ @discussion This will set a specific policy setting for the record.
362362+ @param record an ODRecordRef to use
363363+ @param policy a valid ODPolicyType
364364+ @param value a CFTypeRef to be set (should be of appropriate type for the policy)
365365+ @param error an optional CFErrorRef reference for error details
366366+ @result a bool which signifies if the policy set succeeded, otherwise error is set.
367367+*/
368368+CF_EXPORT
369369+bool ODRecordSetPolicy(ODRecordRef record, ODPolicyType policy, CFTypeRef value, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODRecordAddAccountPolicy");
370370+371371+/*!
372372+ @function ODRecordRemovePolicy
373373+ @abstract This will remove a specific policy setting from the record.
374374+ @discussion This will remove a specific policy setting from the record.
375375+ @param record an ODRecordRef to use
376376+ @param policy a valid ODPolicyType
377377+ @param error an optional CFErrorRef reference for error details
378378+ @result a bool which signifies if the policy removal succeeded, otherwise error is set.
379379+*/
380380+CF_EXPORT
381381+bool ODRecordRemovePolicy(ODRecordRef record, ODPolicyType policy, CFErrorRef *error) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use ODRecordRemoveAccountPolicy");
382382+383383+/*!
384384+ @function ODRecordAddAccountPolicy
385385+ @abstract This will add an account policy to the record for the specified category.
386386+ @discussion This will add an account policy to the record for the specified category.
387387+ The node-level and record-level policies will be combined and
388388+ evaluated as appropriate, ensuring the strongest policy is enforced.
389389+ @param record an ODRecordRef to use.
390390+ @param policy a dictionary containing the specific policy to be added.
391391+ The dictionary may contain the following keys:
392392+ kODPolicyKeyIdentifier a required key identifying the policy.
393393+ kODPolicyKeyParameters an optional key containing a dictionary of
394394+ parameters that can be used for informational purposes or in
395395+ the policy format string.
396396+ kODPolicyKeyContent a required key specifying the policy,
397397+ from which a predicate will be created for evaluating
398398+ the policy.
399399+ @param category a valid ODPolicyCategoryType to which the policy will be added.
400400+ @param error is an optional CFErrorRef reference for error details.
401401+ @result a bool which signifies if the policy addition succeeded, otherwise error is set.
402402+*/
403403+CF_EXPORT
404404+bool ODRecordAddAccountPolicy(ODRecordRef record, CFDictionaryRef policy, ODPolicyCategoryType category, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
405405+406406+/*!
407407+ @function ODRecordRemoveAccountPolicy
408408+ @abstract This will remove an account policy from the record for the specified category.
409409+ @discussion This will remove an account policy from the record for the specified category.
410410+ @param record an ODRecordRef to use.
411411+ @param policy a dictionary containing the specific policy to be
412412+ removed, with the same format as described in ODRecordAddAccountPolicy.
413413+ @param category a valid ODPolicyCategoryType from which the policy will be removed.
414414+ @param error an optional CFErrorRef reference for error details.
415415+ @result a bool which signifies if the policy removal succeeded, otherwise error is set.
416416+*/
417417+CF_EXPORT
418418+bool ODRecordRemoveAccountPolicy(ODRecordRef record, CFDictionaryRef policy, ODPolicyCategoryType category, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
419419+420420+/*!
421421+ @function ODRecordSetAccountPolicies
422422+ @abstract This will set the policies for the record.
423423+ @discussion This will set the policies for the record, replacing any
424424+ existing policies. All of the policies in the set will be
425425+ applied to the record when policies are evaluated.
426426+ @param record an ODRecordRef to use.
427427+ @param policies a dictionary containing all of the policies to be set
428428+ for the node. The dictionary may contain the following keys:
429429+ kODPolicyCategoryAuthentication an optional key with a value
430430+ of an array of policy dictionaries that specify when
431431+ authentications should be allowed.
432432+ kODPolicyCategoryPasswordContent an optional key with a
433433+ value of an array of policy dictionaries the specify the
434434+ required content of passwords.
435435+ kODPolicyCategoryPasswordChange an optional key with a value
436436+ of an array of policy dictionaries that specify when
437437+ passwords are required to be changed.
438438+ @param error an optional CFErrorRef reference for error details.
439439+ @result a bool which signifies if the policy set succeeded, otherwise error is set.
440440+*/
441441+CF_EXPORT
442442+bool ODRecordSetAccountPolicies(ODRecordRef record, CFDictionaryRef policies, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
443443+444444+/*!
445445+ @function ODRecordCopyAccountPolicies
446446+ @abstract This will copy any policies configured for the record.
447447+ @discussion This will copy any policies configured for the record. Does not
448448+ copy any policies set for the node.
449449+ @param record an ODRecordRef to use.
450450+ @param error an optional CFErrorRef reference for error details.
451451+ @result a CFDictionaryRef containing all currently set policies. The
452452+ format of the dictionary is the same as described in
453453+ ODRecordSetAccountPolicies().
454454+*/
455455+CF_EXPORT CF_RETURNS_RETAINED
456456+CFDictionaryRef ODRecordCopyAccountPolicies(ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
457457+458458+/*!
459459+ @function ODRecordAuthenticationAllowed
460460+ @abstract Determines if policies allow the account to authenticate.
461461+ @discussion Determines if policies allow the account to authenticate.
462462+ Authentication and password change policies are evaluated.
463463+ Record-level and node-level policies are evaluated in
464464+ combination, with record-level taking precedence over node-level
465465+ policies. The failure of any single policy will deny the
466466+ authentication.
467467+468468+ This check is only definitive at the time it was requested. The
469469+ policy or the environment could change before the authentication
470470+ is actually requested. Errors from the authentication request
471471+ should be consulted.
472472+473473+ It is not necessary to call this function when callingg
474474+ ODRecordVerifyPassword or ODRecordVerifyPasswordExtended
475475+ since those functions perform same policy evaluation.
476476+477477+ @param record an ODRecordRef to use.
478478+ @param error an optional CFErrorRef reference for error details.
479479+ @result a bool which signifies if the authentication is allowed, otherwise error is set.
480480+ */
481481+CF_EXPORT
482482+bool ODRecordAuthenticationAllowed(ODRecordRef record, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
483483+484484+/*!
485485+ @function ODRecordPasswordChangeAllowed
486486+ @abstract Determines if policies allow the password change.
487487+ @discussion Determines if policies allow the password change. Password
488488+ content policies are evaluated. Record-level and node-level
489489+ policies are evaluated in combination, with record-level taking
490490+ precedence over node-level policies. The failure of any single
491491+ policy will deny the password change.
492492+493493+ This check is only definitive at the time it was requested. The
494494+ policy or the environment could change before the password change
495495+ is actually requested. Errors from the password change request
496496+ should be consulted.
497497+498498+ @param record an ODRecordRef to use.
499499+ @param newPassword contains the password to be evaluated.
500500+ @param error an optional CFErrorRef reference for error details.
501501+ @result a bool which signifies if the password change is allowed, otherwise error is set.
502502+ */
503503+CF_EXPORT
504504+bool ODRecordPasswordChangeAllowed(ODRecordRef record, CFStringRef newPassword, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
505505+506506+/*!
507507+ @function ODRecordWillPasswordExpire
508508+ @abstract Determines if the password will expire within the specified time.
509509+ @discussion Determines if the password will expire (i.e. need to be changed)
510510+ between now and the specified number of seconds in the future.
511511+ Record-level and node-level policies are evaluated
512512+ together, with record-level taking precedence over node-level
513513+ policies.
514514+ @param record an ODRecordRef to use.
515515+ @param willExpireIn the number of seconds from the current time to be
516516+ used as the upper-bound for the password expiration period.
517517+ @result a bool which signifies if the password will expire within the
518518+ specified time.
519519+ */
520520+CF_EXPORT
521521+bool ODRecordWillPasswordExpire(ODRecordRef record, uint64_t willExpireIn) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
522522+523523+/*!
524524+ @function ODRecordWillAuthenticationsExpire
525525+ @abstract Determines if authentications will expire within the specified time.
526526+ @discussion Determines if authentications will expire (i.e. session and/or
527527+ account expires) between now and the specified number of seconds
528528+ in the future. Record-level and node-level policies are evaluated
529529+ together, with record-level taking precedence over node-level
530530+ policies.
531531+ @param record an ODRecordRef to use.
532532+ @param willExpireIn the number of seconds from the current time to be
533533+ used as the upper-bound for the authentication expiration period.
534534+ @result a bool which signifies if authentications will expire within the
535535+ specified time.
536536+ */
537537+CF_EXPORT
538538+bool ODRecordWillAuthenticationsExpire(ODRecordRef record, uint64_t willExpireIn) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
539539+540540+/*!
541541+ @function ODRecordSecondsUntilPasswordExpires
542542+ @abstract Determines how many seconds until the password expires.
543543+ @discussion Determines how many seconds until the password expires (i.e.
544544+ needs changing). Password change policies are evaluated.
545545+ Record-level and node-level policies are evaluated in
546546+ combination, with record-level taking precedence over node-level
547547+ policies.
548548+ @param record an ODRecordRef to use.
549549+ @result the number of seconds until the password expires. If multiple
550550+ policies will cause the password to expire, the soonest
551551+ expiration time is returned. If already expired,
552552+ kODExpirationTimeExpired is returned. If there are no password
553553+ change policies, kODExpirationTimeNeverExpires is returned.
554554+ */
555555+CF_EXPORT
556556+int64_t ODRecordSecondsUntilPasswordExpires(ODRecordRef record) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
557557+558558+/*!
559559+ @function ODRecordSecondsUntilAuthenticationsExpire
560560+ @abstract Determines how many seconds until authentications expire.
561561+ @discussion Determines how many seconds until authentications expire (i.e.
562562+ session and/or account expires). Record-level and node-level
563563+ policies are evaluated together, with record-level taking
564564+ precedence over node-level policies
565565+ @param record an ODRecordRef to use.
566566+ @result the number of seconds until authentications expire. If multiple
567567+ policies will cause authentications to expire, the soonest
568568+ expiration time is returned. If already expired,
569569+ kODExpirationTimeExpired is returned. If there are no
570570+ authentication policies controlling expiration,
571571+ kODExpirationTimeNeverExpires is returned.
572572+ */
573573+CF_EXPORT
574574+int64_t ODRecordSecondsUntilAuthenticationsExpire(ODRecordRef record) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
575575+576576+__END_DECLS
577577+578578+#endif /* ! __OPENDIRECTORY_CFODRECORD__ */
···11+/*
22+ * Copyright (c) 2009 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#if !defined(__OPENDIRECTORY_CFODSESSION__)
2525+#define __OPENDIRECTORY_CFODSESSION__
2626+2727+#include <CFOpenDirectory/CFOpenDirectory.h>
2828+2929+/*!
3030+ @const kODSessionDefault
3131+ @abstract is the default type of ODSessionRef used if there is no need to create a specific reference
3232+ @discussion is the default type of ODSessionRef used if there is no need to create a specific reference
3333+*/
3434+CF_EXPORT
3535+ODSessionRef kODSessionDefault __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
3636+3737+__BEGIN_DECLS
3838+3939+/*!
4040+ @function ODSessionGetTypeID
4141+ @abstract Standard GetTypeID function support for CF-based objects
4242+ @discussion Returns the typeID for ODSession objects
4343+ @result a valid CFTypeID for the ODSession object
4444+*/
4545+CF_EXPORT
4646+CFTypeID ODSessionGetTypeID(void) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
4747+4848+/*!
4949+ @function ODSessionCreate
5050+ @abstract Creates an ODSession object to be passed to ODNode functions
5151+ @discussion Creates an ODSession object to be passed to ODNode functions.
5252+ @param allocator a memory allocator to use for this object
5353+ @param options a CFDictionary of options associated with this ODSession. This is typically NULL
5454+ unless caller needs to proxy to another host.
5555+5656+ If proxy is required then a dictionary with keys should be:
5757+ Key Value
5858+ kODSessionProxyAddress CFString(hostname or IP)
5959+ kODSessionProxyPort CFNumber(IP port, should not be set as it will default)
6060+ kODSessionProxyUsername CFString(username)
6161+ kODSessionProxyPassword CFString(password)
6262+ @param error an optional CFErrorRef reference for error details
6363+ @result a valid ODSessionRef object or NULL if it cannot be created. Pass reference to CFErrorRef to
6464+ get error details
6565+*/
6666+CF_EXPORT
6767+ODSessionRef ODSessionCreate(CFAllocatorRef allocator, CFDictionaryRef options, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
6868+6969+/*!
7070+ @function ODSessionCopyNodeNames
7171+ @abstract Returns the node names that are registered on this ODSession
7272+ @discussion Returns the node names that are registered on this ODSession
7373+ @param allocator a memory allocator to use for this object
7474+ @param session an ODSessionRef, either kODSessionDefault or a valid ODSessionRef can be passed
7575+ @param error an optional CFErrorRef reference for error details
7676+ @result a valid CFArrayRef of node names that can be opened on the session reference
7777+*/
7878+CF_EXPORT
7979+CFArrayRef ODSessionCopyNodeNames(CFAllocatorRef allocator, ODSessionRef session, CFErrorRef *error) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
8080+8181+__END_DECLS
8282+8383+#endif /* !__OPENDIRECTORY_CFODSESSION__ */
···11+/*
22+ * Copyright (c) 2009 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#if !defined(__OPENDIRECTORY_CFOPENDIRECTORY__)
2525+#define __OPENDIRECTORY_CFOPENDIRECTORY__ 1
2626+2727+#include <CoreFoundation/CoreFoundation.h>
2828+2929+/*!
3030+ @typedef ODContextRef
3131+ @abstract Opaque reference for the ODContext object
3232+*/
3333+typedef const struct __ODContext *ODContextRef;
3434+3535+/*!
3636+ @typedef ODNodeRef
3737+ @abstract Opaque reference for the ODNode object
3838+*/
3939+typedef struct __ODNode *ODNodeRef;
4040+4141+/*!
4242+ @typedef ODQueryRef
4343+ @abstract Opaque reference for the ODQuery object
4444+*/
4545+typedef struct __ODQuery *ODQueryRef;
4646+4747+/*!
4848+ @typedef ODRecordRef
4949+ @abstract Opaque reference for the ODRecord object
5050+*/
5151+typedef struct __ODRecord *ODRecordRef;
5252+5353+/*!
5454+ @typedef ODSessionRef
5555+ @abstract Opaque reference for ODSession object
5656+*/
5757+typedef struct __ODSession *ODSessionRef;
5858+5959+/*!
6060+ @const kODErrorDomainFramework
6161+ @abstract the error domain for OpenDirectory.framework details
6262+ @discussion the error domain for OpenDirectory.framework details
6363+*/
6464+CF_EXPORT
6565+const CFStringRef kODErrorDomainFramework __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
6666+6767+#include <CFOpenDirectory/CFOpenDirectoryConstants.h>
6868+6969+#include <CFOpenDirectory/CFODContext.h>
7070+#include <CFOpenDirectory/CFODNode.h>
7171+#include <CFOpenDirectory/CFODQuery.h>
7272+#include <CFOpenDirectory/CFODRecord.h>
7373+#include <CFOpenDirectory/CFODSession.h>
7474+7575+#endif /* ! __OPENDIRECTORY_CFOPENDIRECTORY__ */
···11+/*
22+ * Copyright (c) 2009-2011 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#if !defined(__ODCONSTANTS_H)
2525+#define __ODCONSTANTS_H
2626+2727+/*!
2828+ @const kODSessionProxyAddress
2929+ @abstract the address to connect to via proxy, used when making the options dictionary
3030+ @discussion the address to connect to via proxy, used when making the options dictionary
3131+*/
3232+CF_EXPORT
3333+const CFStringRef kODSessionProxyAddress __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
3434+3535+/*!
3636+ @const kODSessionProxyPort
3737+ @abstract the port to connect to via proxy, used when making the options dictionary
3838+ @discussion the port to connect to via proxy, used when making the options dictionary. This parameter
3939+ is optional and should not be passed normally.
4040+*/
4141+CF_EXPORT
4242+const CFStringRef kODSessionProxyPort __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
4343+4444+/*!
4545+ @const kODSessionProxyUsername
4646+ @abstract the username to connect with via proxy, used when making the options dictionary
4747+ @discussion the username to connect with via proxy, used when making the options dictionary
4848+*/
4949+CF_EXPORT
5050+const CFStringRef kODSessionProxyUsername __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
5151+5252+/*!
5353+ @const kODSessionProxyPassword
5454+ @abstract the password to connect with via proxy, used when making the options dictionary
5555+ @discussion the password to connect with via proxy, used when making the options dictionary
5656+*/
5757+CF_EXPORT
5858+const CFStringRef kODSessionProxyPassword __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
5959+6060+/*!
6161+ @const kODModuleConfigOptionQueryTimeout
6262+ @abstract number of seconds before a query times out
6363+ @discussion number of seconds before a query times out
6464+ */
6565+CF_EXPORT
6666+const CFStringRef kODModuleConfigOptionQueryTimeout __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
6767+/*!
6868+ @const kODModuleConfigOptionConnectionSetupTimeout
6969+ @abstract number of seconds before a connection attempt times out
7070+ @discussion number of seconds before a connection attempt times out
7171+ */
7272+CF_EXPORT
7373+const CFStringRef kODModuleConfigOptionConnectionSetupTimeout __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
7474+/*!
7575+ @const kODModuleConfigOptionConnectionIdleDisconnect
7676+ @abstract number of seconds before a connection is idle disconnected
7777+ @discussion number of seconds before a connection is idle disconnected
7878+ */
7979+CF_EXPORT
8080+const CFStringRef kODModuleConfigOptionConnectionIdleDisconnect __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
8181+/*!
8282+ @const kODModuleConfigOptionPacketSigning
8383+ @abstract enable or disable packet signing
8484+ @discussion number of seconds before a query times out
8585+ */
8686+CF_EXPORT
8787+const CFStringRef kODModuleConfigOptionPacketSigning __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
8888+/*!
8989+ @const kODModuleConfigOptionPacketEncryption
9090+ @abstract enable or disable packet encryption
9191+ @discussion enable or disable packet encryption
9292+ */
9393+CF_EXPORT
9494+const CFStringRef kODModuleConfigOptionPacketEncryption __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
9595+/*!
9696+ @const kODModuleConfigOptionManInTheMiddle
9797+ @abstract enable or disable man-in-middle countermeasures
9898+ @discussion enable or disable man-in-middle countermeasures
9999+ */
100100+CF_EXPORT
101101+const CFStringRef kODModuleConfigOptionManInTheMiddle __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
102102+/*!
103103+ @enum ODNodeType
104104+ @abstract Types of nodes that can be opened
105105+ @discussion Various types of nodes that can be opened.
106106+ @constant kODNodeTypeAuthentication is a node type commonly used for all authentications or record lookups
107107+ @constant kODNodeTypeContacts is a node type commonly used for applications that deal with contact data
108108+ @constant kODNodeTypeNetwork is a node type used for looking for network resource type data
109109+ @constant kODNodeTypeLocalNodes is a node type that specifically looks at the local directory
110110+ @constant kODNodeTypeConfigure is a node type that refers to the configuration node within DS
111111+*/
112112+enum
113113+{
114114+ kODNodeTypeAuthentication = 0x2201,
115115+ kODNodeTypeContacts = 0x2204,
116116+ kODNodeTypeNetwork = 0x2205, /* deprecated, behaves identically to kODNodeTypeAuthentication */
117117+118118+ kODNodeTypeLocalNodes = 0x2200,
119119+ kODNodeTypeConfigure = 0x2202
120120+};
121121+typedef uint32_t ODNodeType;
122122+123123+/*!
124124+ @const kODNodeOptionsQuerySkippedSubnode
125125+ @abstract Used with nodes that support options.
126126+ @discussion Passed in an options dictionary where the value is a boolean (kCFBooleanTrue/kCFBooleanFalse).
127127+ If a node supports the option it will notify the client when a subnode is skipped during queries.
128128+ Supported options are listed in node details under kODAttributeTypeNodeOptions. Node may fail to
129129+ open if unsupported options are used.
130130+ */
131131+CF_EXPORT
132132+const CFStringRef kODNodeOptionsQuerySkippedSubnode __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_NA);
133133+134134+/*!
135135+ @enum ODMatchType
136136+ @abstract Are types of matching types used for doing searches. Each type is self explanatory based on the name.
137137+ @constant kODMatchAny is used to search for any records (typically passed with nil search value)
138138+ @constant kODMatchEqualTo is searching values that are equal to the provided value
139139+ @constant kODMatchBeginsWith is searching values that begin with the provided value
140140+ @constant kODMatchContains is searching values that contain the provided value
141141+ @constant kODMatchEndsWith is searching values that end with the provided value
142142+ @constant kODMatchGreaterThan is searching values greater than the provided value
143143+ @constant kODMatchLessThan is searching values less than the provided value
144144+ */
145145+enum
146146+{
147147+ kODMatchAny = 0x0001,
148148+149149+ kODMatchEqualTo = 0x2001,
150150+ kODMatchBeginsWith = 0x2002,
151151+ kODMatchContains = 0x2004,
152152+ kODMatchEndsWith = 0x2003,
153153+154154+ kODMatchInsensitiveEqualTo __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_6, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "case matching is defined by attribute schema") = 0x2101,
155155+ kODMatchInsensitiveBeginsWith __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_6, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "case matching is defined by attribute schema") = 0x2102,
156156+ kODMatchInsensitiveContains __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_6, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "case matching is defined by attribute schema") = 0x2104,
157157+ kODMatchInsensitiveEndsWith __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_6, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "case matching is defined by attribute schema") = 0x2103,
158158+159159+ kODMatchGreaterThan = 0x2006,
160160+ kODMatchLessThan = 0x2007,
161161+};
162162+typedef uint32_t ODMatchType;
163163+164164+/*!
165165+ @typedef ODRecordType
166166+ @abstract is used to define a specific record type
167167+ @discussion is used to define a specific record type common to DirectoryService.
168168+ Records types are strings that have a prefix:
169169+170170+ Standard records - "dsRecTypeStandard:"
171171+ Native to the node - "dsRecTypeNative:"
172172+173173+ The most commonly used Standard records are contained in this header.
174174+175175+ Note: CFStringRef can be use interchangeably with ODRecordType for ease
176176+ of use.
177177+*/
178178+#ifdef __OBJC__
179179+#include <Foundation/Foundation.h>
180180+typedef NSString *ODRecordType;
181181+#else
182182+typedef CFStringRef ODRecordType;
183183+#endif
184184+185185+/*!
186186+ @typedef ODAttributeType
187187+ @abstract is used to define a specific attribute type
188188+ @discussion is used to define a specific attribute type common to DirectoryService.
189189+ Attribute types are strings that have a prefix:
190190+191191+ Standard attributes - "dsAttrTypeStandard:"
192192+ Native to the node - "dsAttrTypeNative:"
193193+194194+ The most commonly used Standard attributes are contained in this header.
195195+196196+ Note: CFStringRef can be use interchangeably with ODAttributeType for ease
197197+ of use.
198198+*/
199199+#ifdef __OBJC__
200200+typedef NSString *ODAttributeType;
201201+#else
202202+typedef CFStringRef ODAttributeType;
203203+#endif
204204+205205+/*!
206206+ @typedef ODAuthenticationType
207207+ @abstract is used to define a specific credential method type
208208+ @discussion is used to define a specific credential method type common to DirectoryService.
209209+ Authentication types are strings that have a prefix:
210210+211211+ Standard attributes - "dsAuthMethodStandard:"
212212+ Native to the node - "dsAuthMethodNative:"
213213+214214+ The most commonly used Standard authentications are contained in this header.
215215+216216+ Note: CFStringRef can be use interchangeably with ODAuthenticationType for ease
217217+ of use.
218218+*/
219219+#ifdef __OBJC__
220220+typedef NSString *ODAuthenticationType;
221221+#else
222222+typedef CFStringRef ODAuthenticationType;
223223+#endif
224224+225225+/*!
226226+ @typedef ODPolicyType
227227+ @abstract is used to modify policies on nodes or records
228228+ @discussion is used to modify policies on nodes or records
229229+*/
230230+#ifdef __OBJC_
231231+typedef NSString *ODPolicyType;
232232+#else
233233+typedef CFStringRef ODPolicyType;
234234+#endif
235235+236236+// Compatibility
237237+typedef ODRecordType _ODRecordType;
238238+typedef ODAttributeType _ODAttributeType;
239239+typedef ODAuthenticationType _ODAuthenticationType;
240240+241241+#pragma mark Record Types
242242+243243+/*!
244244+ @const kODRecordTypeAttributeTypes
245245+ @abstract Identifies records that represent each possible attribute type.
246246+ @discussion Identifies records that represent each possible attribute type.
247247+*/
248248+CF_EXPORT
249249+const ODRecordType kODRecordTypeAttributeTypes;
250250+251251+/*!
252252+ @const kODRecordTypeAFPServer
253253+ @abstract Record type of AFP server records.
254254+ @discussion Record type of AFP server records.
255255+*/
256256+CF_EXPORT
257257+const ODRecordType kODRecordTypeAFPServer;
258258+259259+/*!
260260+ @const kODRecordTypeAliases
261261+ @abstract Used to represent alias records.
262262+ @discussion Used to represent alias records.
263263+*/
264264+CF_EXPORT
265265+const ODRecordType kODRecordTypeAliases;
266266+267267+/*!
268268+ @const kODRecordTypeAugments
269269+ @abstract Used to store augmented record data.
270270+ @discussion Used to store augmented record data.
271271+*/
272272+CF_EXPORT
273273+const ODRecordType kODRecordTypeAugments;
274274+275275+/*!
276276+ @const kODRecordTypeAutomount
277277+ @abstract Used to store automount record data.
278278+ @discussion Used to store automount record data.
279279+*/
280280+CF_EXPORT
281281+const ODRecordType kODRecordTypeAutomount;
282282+283283+/*!
284284+ @const kODRecordTypeAutomountMap
285285+ @abstract Used to store automountMap record data.
286286+ @discussion Used to store automountMap record data.
287287+*/
288288+CF_EXPORT
289289+const ODRecordType kODRecordTypeAutomountMap;
290290+291291+/*!
292292+ @const kODRecordTypeAutoServerSetup
293293+ @abstract Used to discover automated server setup information.
294294+ @discussion Used to discover automated server setup information.
295295+*/
296296+CF_EXPORT
297297+const ODRecordType kODRecordTypeAutoServerSetup;
298298+299299+/*!
300300+ @const kODRecordTypeBootp
301301+ @abstract Record in the local node for storing bootp info.
302302+ @discussion Record in the local node for storing bootp info.
303303+*/
304304+CF_EXPORT
305305+const ODRecordType kODRecordTypeBootp;
306306+307307+/*!
308308+ @const kODRecordTypeCertificateAuthorities
309309+ @abstract Record type that contains certificate authority information.
310310+ @discussion Record type that contains certificate authority information.
311311+*/
312312+CF_EXPORT
313313+const ODRecordType kODRecordTypeCertificateAuthorities;
314314+315315+/*!
316316+ @const kODRecordTypeComputerLists
317317+ @abstract Identifies computer list records.
318318+ @discussion Identifies computer list records.
319319+*/
320320+CF_EXPORT
321321+const ODRecordType kODRecordTypeComputerLists;
322322+323323+/*!
324324+ @const kODRecordTypeComputerGroups
325325+ @abstract Identifies computer group records.
326326+ @discussion Identifies computer group records.
327327+*/
328328+CF_EXPORT
329329+const ODRecordType kODRecordTypeComputerGroups;
330330+331331+/*!
332332+ @const kODRecordTypeComputers
333333+ @abstract Identifies computer records.
334334+ @discussion Identifies computer records.
335335+*/
336336+CF_EXPORT
337337+const ODRecordType kODRecordTypeComputers;
338338+339339+/*!
340340+ @const kODRecordTypeConfiguration
341341+ @abstract Identifies configuration records.
342342+ @discussion Identifies configuration records.
343343+*/
344344+CF_EXPORT
345345+const ODRecordType kODRecordTypeConfiguration;
346346+347347+/*!
348348+ @const kODRecordTypeEthernets
349349+ @abstract Record in the node for storing ethernets.
350350+ @discussion Record in the node for storing ethernets.
351351+*/
352352+CF_EXPORT
353353+const ODRecordType kODRecordTypeEthernets;
354354+355355+/*!
356356+ @const kODRecordTypeFileMakerServers
357357+ @abstract FileMaker servers record type.
358358+ @discussion FileMaker servers record type that describes available FileMaker servers,
359359+ used for service discovery.
360360+*/
361361+CF_EXPORT
362362+const ODRecordType kODRecordTypeFileMakerServers;
363363+364364+/*!
365365+ @const kODRecordTypeFTPServer
366366+ @abstract Identifies ftp server records.
367367+ @discussion Identifies ftp server records.
368368+*/
369369+CF_EXPORT
370370+const ODRecordType kODRecordTypeFTPServer;
371371+372372+/*!
373373+ @const kODRecordTypeGroups
374374+ @abstract Identifies group records.
375375+ @discussion Identifies group records.
376376+*/
377377+CF_EXPORT
378378+const ODRecordType kODRecordTypeGroups;
379379+380380+/*!
381381+ @const kODRecordTypeHostServices
382382+ @abstract Record in the local node for storing host services.
383383+ @discussion Record in the local node for storing host services.
384384+*/
385385+CF_EXPORT
386386+const ODRecordType kODRecordTypeHostServices;
387387+388388+/*!
389389+ @const kODRecordTypeHosts
390390+ @abstract Identifies host records.
391391+ @discussion Identifies host records.
392392+*/
393393+CF_EXPORT
394394+const ODRecordType kODRecordTypeHosts;
395395+396396+/*!
397397+ @const kODRecordTypeLDAPServer
398398+ @abstract Identifies LDAP server records.
399399+ @discussion Identifies LDAP server records.
400400+*/
401401+CF_EXPORT
402402+const ODRecordType kODRecordTypeLDAPServer;
403403+404404+/*!
405405+ @const kODRecordTypeLocations
406406+ @abstract Location record type.
407407+ @discussion Location record type.
408408+*/
409409+CF_EXPORT
410410+const ODRecordType kODRecordTypeLocations;
411411+412412+/*!
413413+ @const kODRecordTypeMounts
414414+ @abstract Identifies mount records.
415415+ @discussion Identifies mount records.
416416+*/
417417+CF_EXPORT
418418+const ODRecordType kODRecordTypeMounts;
419419+420420+/*!
421421+ @const kODRecordTypeNFS
422422+ @abstract Identifies NFS records.
423423+ @discussion Identifies NFS records.
424424+*/
425425+CF_EXPORT
426426+const ODRecordType kODRecordTypeNFS;
427427+428428+/*!
429429+ @const kODRecordTypeNetDomains
430430+ @abstract Record in the local node for storing net domains.
431431+ @discussion Record in the local node for storing net domains.
432432+*/
433433+CF_EXPORT
434434+const ODRecordType kODRecordTypeNetDomains;
435435+436436+/*!
437437+ @const kODRecordTypeNetGroups
438438+ @abstract Record in the local node for storing net groups.
439439+ @discussion Record in the local node for storing net groups.
440440+*/
441441+CF_EXPORT
442442+const ODRecordType kODRecordTypeNetGroups;
443443+444444+/*!
445445+ @const kODRecordTypeNetworks
446446+ @abstract Identifies network records.
447447+ @discussion Identifies network records.
448448+*/
449449+CF_EXPORT
450450+const ODRecordType kODRecordTypeNetworks;
451451+452452+/*!
453453+ @const kODRecordTypePeople
454454+ @abstract Record type that contains "People" records used for contact information.
455455+ @discussion Record type that contains "People" records used for contact information.
456456+*/
457457+CF_EXPORT
458458+const ODRecordType kODRecordTypePeople;
459459+460460+/*!
461461+ @const kODRecordTypePresetComputers
462462+ @abstract The computer record type used for presets in record creation.
463463+ @discussion The computer record type used for presets in record creation.
464464+*/
465465+CF_EXPORT
466466+const ODRecordType kODRecordTypePresetComputers;
467467+468468+/*!
469469+ @const kODRecordTypePresetComputerGroups
470470+ @abstract The computer group record type used for presets in record creation.
471471+ @discussion The computer group record type used for presets in record creation.
472472+*/
473473+CF_EXPORT
474474+const ODRecordType kODRecordTypePresetComputerGroups;
475475+476476+/*!
477477+ @const kODRecordTypePresetComputerLists
478478+ @abstract The computer list record type used for presets in record creation.
479479+ @discussion The computer list record type used for presets in record creation.
480480+*/
481481+CF_EXPORT
482482+const ODRecordType kODRecordTypePresetComputerLists;
483483+484484+/*!
485485+ @const kODRecordTypePresetGroups
486486+ @abstract The group record type used for presets in record creation.
487487+ @discussion The group record type used for presets in record creation.
488488+*/
489489+CF_EXPORT
490490+const ODRecordType kODRecordTypePresetGroups;
491491+492492+/*!
493493+ @const kODRecordTypePresetUsers
494494+ @abstract The user record type used for presets in record creation.
495495+ @discussion The user record type used for presets in record creation.
496496+*/
497497+CF_EXPORT
498498+const ODRecordType kODRecordTypePresetUsers;
499499+500500+/*!
501501+ @const kODRecordTypePrintService
502502+ @abstract Identifies print service records.
503503+ @discussion Identifies print service records.
504504+*/
505505+CF_EXPORT
506506+const ODRecordType kODRecordTypePrintService;
507507+508508+/*!
509509+ @const kODRecordTypePrintServiceUser
510510+ @abstract Record in the local node for storing quota usage for a user.
511511+ @discussion Record in the local node for storing quota usage for a user.
512512+*/
513513+CF_EXPORT
514514+const ODRecordType kODRecordTypePrintServiceUser;
515515+516516+/*!
517517+ @const kODRecordTypePrinters
518518+ @abstract Identifies printer records.
519519+ @discussion Identifies printer records.
520520+*/
521521+CF_EXPORT
522522+const ODRecordType kODRecordTypePrinters;
523523+524524+/*!
525525+ @const kODRecordTypeProtocols
526526+ @abstract Identifies protocol records.
527527+ @discussion Identifies protocol records.
528528+*/
529529+CF_EXPORT
530530+const ODRecordType kODRecordTypeProtocols;
531531+532532+/*!
533533+ @const kODRecordTypeQTSServer
534534+ @abstract Identifies quicktime streaming server records.
535535+ @discussion Identifies quicktime streaming server records.
536536+*/
537537+CF_EXPORT
538538+const ODRecordType kODRecordTypeQTSServer;
539539+540540+/*!
541541+ @const kODRecordTypeQueryInformation
542542+ @abstract Special query information record
543543+ @discussion Specifically to return query information inline such as skipped nodes
544544+ */
545545+CF_EXPORT
546546+const ODRecordType kODRecordTypeQueryInformation;
547547+548548+/*!
549549+ @const kODRecordTypeRecordTypes
550550+ @abstract Identifies records that represent each possible record type.
551551+ @discussion Identifies records that represent each possible record type.
552552+*/
553553+CF_EXPORT
554554+const ODRecordType kODRecordTypeRecordTypes;
555555+556556+/*!
557557+ @const kODRecordTypeResources
558558+ @abstract Identifies resources used in group services.
559559+ @discussion Identifies resources used in group services.
560560+*/
561561+CF_EXPORT
562562+const ODRecordType kODRecordTypeResources;
563563+564564+/*!
565565+ @const kODRecordTypeRPC
566566+ @abstract Identifies remote procedure call records.
567567+ @discussion Identifies remote procedure call records.
568568+*/
569569+CF_EXPORT
570570+const ODRecordType kODRecordTypeRPC;
571571+572572+/*!
573573+ @const kODRecordTypeSMBServer
574574+ @abstract Identifies SMB server records.
575575+ @discussion Identifies SMB server records.
576576+*/
577577+CF_EXPORT
578578+const ODRecordType kODRecordTypeSMBServer;
579579+580580+/*!
581581+ @const kODRecordTypeServer
582582+ @abstract Identifies generic server records.
583583+ @discussion Identifies generic server records.
584584+*/
585585+CF_EXPORT
586586+const ODRecordType kODRecordTypeServer;
587587+588588+/*!
589589+ @const kODRecordTypeServices
590590+ @abstract Identifies directory based service records.
591591+ @discussion Identifies directory based service records.
592592+*/
593593+CF_EXPORT
594594+const ODRecordType kODRecordTypeServices;
595595+596596+/*!
597597+ @const kODRecordTypeSharePoints
598598+ @abstract Share point record type.
599599+ @discussion Share point record type.
600600+*/
601601+CF_EXPORT
602602+const ODRecordType kODRecordTypeSharePoints;
603603+604604+/*!
605605+ @const kODRecordTypeUsers
606606+ @abstract Identifies user records.
607607+ @discussion Identifies user records.
608608+*/
609609+CF_EXPORT
610610+const ODRecordType kODRecordTypeUsers;
611611+612612+/*!
613613+ @const kODRecordTypeWebServer
614614+ @abstract Identifies web server records.
615615+ @discussion Identifies web server records.
616616+*/
617617+CF_EXPORT
618618+const ODRecordType kODRecordTypeWebServer;
619619+620620+#pragma mark Attribute Types
621621+622622+/*!
623623+ @const kODAttributeTypeAllAttributes
624624+ @abstract Used in requesting all attribute types in a search.
625625+ @discussion Used in requesting all attribute types in a search.
626626+*/
627627+CF_EXPORT
628628+const ODAttributeType kODAttributeTypeAllAttributes;
629629+630630+/*!
631631+ @const kODAttributeTypeStandardOnly
632632+ @abstract Used in requesting all standard attribute types in a query.
633633+ @discussion Used in requesting all standard attribute types in a query.
634634+*/
635635+CF_EXPORT
636636+const ODAttributeType kODAttributeTypeStandardOnly;
637637+638638+/*!
639639+ @const kODAttributeTypeNativeOnly
640640+ @abstract Used in requesting all native attribute types in a search.
641641+ @discussion Used in requesting all native attribute types in a search.
642642+*/
643643+CF_EXPORT
644644+const ODAttributeType kODAttributeTypeNativeOnly;
645645+646646+/*!
647647+ @const kODAttributeTypeMetaAmbiguousName
648648+ @abstract Used to disambiguate a provided name.
649649+ @discussion Searches a configured list of attributes; by default: RecordName, FullName, EMailAddress.
650650+*/
651651+CF_EXPORT
652652+const ODAttributeType kODAttributeTypeMetaAmbiguousName;
653653+654654+/*!
655655+ @const kODAttributeTypeMetaAugmentedAttributes
656656+ @abstract Attributes that have been augmented.
657657+ @discussion Attributes that have been augmented.
658658+*/
659659+CF_EXPORT
660660+const ODAttributeType kODAttributeTypeMetaAugmentedAttributes;
661661+662662+/*!
663663+ @const kODAttributeTypeMetaRecordName
664664+ @abstract Native record name.
665665+ @discussion Native record name, e.g. LDAP DN
666666+*/
667667+CF_EXPORT
668668+const ODAttributeType kODAttributeTypeMetaRecordName;
669669+670670+/*!
671671+ @const kODAttributeTypeAdminLimits
672672+ @abstract XML plist indicating what an admin user can edit.
673673+ @discussion XML plist indicating what an admin user can edit. Found in kODRecordTypeUsers records.
674674+*/
675675+CF_EXPORT
676676+const ODAttributeType kODAttributeTypeAdminLimits;
677677+678678+/*!
679679+ @const kODAttributeTypeAltSecurityIdentities
680680+ @abstract Used to store alternate identities for the record
681681+ @discussion Used to store alternate identities for the record. Values will have standardized form as
682682+ specified by Microsoft LDAP schema (1.2.840.113556.1.4.867).
683683+684684+ Kerberos:user\@REALM
685685+ */
686686+CF_EXPORT
687687+const ODAttributeType kODAttributeTypeAltSecurityIdentities __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
688688+689689+/*!
690690+ @const kODAttributeTypeAuthenticationHint
691691+ @abstract Used to identify the authentication hint phrase.
692692+ @discussion Used to identify the authentication hint phrase.
693693+*/
694694+CF_EXPORT
695695+const ODAttributeType kODAttributeTypeAuthenticationHint;
696696+697697+/*!
698698+ @const kODAttributeTypeAllTypes
699699+ @abstract Used to indicated recommended attribute types for a record type in the Config node.
700700+ @discussion Used to indicated recommended attribute types for a record type in the Config node.
701701+*/
702702+CF_EXPORT
703703+const ODAttributeType kODAttributeTypeAllTypes;
704704+705705+/*!
706706+ @const kODAttributeTypeAuthorityRevocationList
707707+ @abstract Attribute containing the binary of the authority revocation list
708708+ @discussion Attribute containing the binary of the authority revocation list.
709709+ A certificate revocation list that defines certificate authority certificates
710710+ which are no longer trusted. No user certificates are included in this list.
711711+ Usually found in kODRecordTypeCertificateAuthorities records.
712712+*/
713713+CF_EXPORT
714714+const ODAttributeType kODAttributeTypeAuthorityRevocationList;
715715+716716+/*!
717717+ @const kODAttributeTypeBirthday
718718+ @abstract Single-valued attribute that defines the user's birthday.
719719+ @discussion Single-valued attribute that defines the user's birthday.
720720+ Format is x.208 standard YYYYMMDDHHMMSSZ which we will require as GMT time.
721721+*/
722722+CF_EXPORT
723723+const ODAttributeType kODAttributeTypeBirthday;
724724+725725+/*!
726726+ @const kODAttributeTypeCACertificate
727727+ @abstract Attribute containing the binary of the certificate of a certificate authority.
728728+ @discussion Attribute containing the binary of the certificate of a certificate authority.
729729+ Its corresponding private key is used to sign certificates.
730730+ Usually found in kODRecordTypeCertificateAuthority records.
731731+*/
732732+CF_EXPORT
733733+const ODAttributeType kODAttributeTypeCACertificate;
734734+735735+/*!
736736+ @const kODAttributeTypeCapacity
737737+ @abstract Attribute type for the capacity of a resource.
738738+ @discussion Attribute type for the capacity of a resource.
739739+ found in resource records (kODRecordTypeResources).
740740+ Example: 50
741741+*/
742742+CF_EXPORT
743743+const ODAttributeType kODAttributeTypeCapacity;
744744+745745+/*!
746746+ @const kODAttributeTypeCertificateRevocationList
747747+ @abstract Attribute containing the binary of the certificate revocation list.
748748+ @discussion Attribute containing the binary of the certificate revocation list.
749749+ This is a list of certificates which are no longer trusted.
750750+ Usually found in kODRecordTypeCertificateAuthority records.
751751+*/
752752+CF_EXPORT
753753+const ODAttributeType kODAttributeTypeCertificateRevocationList;
754754+755755+/*!
756756+ @const kODAttributeTypeComment
757757+ @abstract Attribute used for unformatted comment.
758758+ @discussion Attribute used for unformatted comment.
759759+*/
760760+CF_EXPORT
761761+const ODAttributeType kODAttributeTypeComment;
762762+763763+/*!
764764+ @const kODAttributeTypeContactGUID
765765+ @abstract Attribute type for the contact GUID of a group.
766766+ @discussion Attribute type for the contact GUID of a group.
767767+ Usually found in group records (kODRecordTypeGroups)
768768+*/
769769+CF_EXPORT
770770+const ODAttributeType kODAttributeTypeContactGUID;
771771+772772+/*!
773773+ @const kODAttributeTypeContactPerson
774774+ @abstract Attribute type for the contact person of the machine.
775775+ @discussion Attribute type for the contact person of the machine.
776776+ Found in host or machine records.
777777+*/
778778+CF_EXPORT
779779+const ODAttributeType kODAttributeTypeContactPerson;
780780+781781+/*!
782782+ @const kODAttributeTypeCreationTimestamp
783783+ @abstract Attribute showing date/time of record creation.
784784+ @discussion Attribute showing date/time of record creation.
785785+ Format is x.208 standard YYYYMMDDHHMMSSZ which should be GMT time.
786786+*/
787787+CF_EXPORT
788788+const ODAttributeType kODAttributeTypeCreationTimestamp;
789789+790790+/*!
791791+ @const kODAttributeTypeCrossCertificatePair
792792+ @abstract Attribute containing the binary of a pair of certificates which
793793+ verify each other.
794794+ @discussion Attribute containing the binary of a pair of certificates which
795795+ verify each other. Both certificates have the same level of authority.
796796+ Usually found in kODRecordTypeCertificateAuthority records.
797797+*/
798798+CF_EXPORT
799799+const ODAttributeType kODAttributeTypeCrossCertificatePair;
800800+801801+/*!
802802+ @const kODAttributeTypeDataStamp
803803+ @abstract Attribute for checksum/meta data
804804+ @discussion Attribute for checksum/meta data
805805+*/
806806+CF_EXPORT
807807+const ODAttributeType kODAttributeTypeDataStamp;
808808+809809+/*!
810810+ @const kODAttributeTypeFullName
811811+ @abstract Full name of a record
812812+ @discussion Full name of a record (e.g., "John Doe", "John Doe's Computer")
813813+*/
814814+CF_EXPORT
815815+const ODAttributeType kODAttributeTypeFullName;
816816+817817+/*!
818818+ @const kODAttributeTypeDNSDomain
819819+ @abstract DNS Resolver domain attribute.
820820+ @discussion DNS Resolver domain attribute.
821821+*/
822822+CF_EXPORT
823823+const ODAttributeType kODAttributeTypeDNSDomain;
824824+825825+/*!
826826+ @const kODAttributeTypeDNSNameServer
827827+ @abstract DNS Resolver nameserver attribute.
828828+ @discussion DNS Resolver nameserver attribute.
829829+*/
830830+CF_EXPORT
831831+const ODAttributeType kODAttributeTypeDNSNameServer;
832832+833833+/*!
834834+ @const kODAttributeTypeENetAddress
835835+ @abstract Attribute for hardware Ethernet address (MAC address).
836836+ @discussion Attribute for hardware Ethernet address (MAC address).
837837+ Found in computer records (kODRecordTypeComputers).
838838+*/
839839+CF_EXPORT
840840+const ODAttributeType kODAttributeTypeENetAddress;
841841+842842+/*!
843843+ @const kODAttributeTypeExpire
844844+ @abstract Used for expiration date or time depending on association.
845845+ @discussion Used for expiration date or time depending on association.
846846+*/
847847+CF_EXPORT
848848+const ODAttributeType kODAttributeTypeExpire;
849849+850850+/*!
851851+ @const kODAttributeTypeFirstName
852852+ @abstract Used for first name of user or person record.
853853+ @discussion Used for first name of user or person record.
854854+*/
855855+CF_EXPORT
856856+const ODAttributeType kODAttributeTypeFirstName;
857857+858858+/*!
859859+ @const kODAttributeTypeGUID
860860+ @abstract Used for 36 character (128 bit) unique ID.
861861+ @discussion Used for 36 character (128 bit) unique ID. An example value is
862862+ "A579E95E-CDFE-4EBC-B7E7-F2158562170F". The standard format contains
863863+ 32 uppercase hex characters and four hyphen characters.
864864+*/
865865+CF_EXPORT
866866+const ODAttributeType kODAttributeTypeGUID;
867867+868868+/*!
869869+ @const kODAttributeTypeHardwareUUID
870870+ @abstract Used to store hardware UUID in string form
871871+ @discussion Used to store hardware UUID in string form for a record. Typically found in
872872+ kODRecordTypeComputers.
873873+*/
874874+CF_EXPORT
875875+const ODAttributeType kODAttributeTypeHardwareUUID __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
876876+877877+/*!
878878+ @const kODAttributeTypeHomeDirectoryQuota
879879+ @abstract Represents the allowed usage for a user's home directory in bytes.
880880+ @discussion Represents the allowed usage for a user's home directory in bytes.
881881+ Found in user records (kODRecordTypeUsers).
882882+*/
883883+CF_EXPORT
884884+const ODAttributeType kODAttributeTypeHomeDirectoryQuota;
885885+886886+/*!
887887+ @const kODAttributeTypeHomeDirectorySoftQuota
888888+ @abstract Used to define home directory size limit in bytes when user is notified
889889+ that the hard limit is approaching.
890890+ @discussion Used to define home directory size limit in bytes when user is notified
891891+ that the hard limit is approaching.
892892+*/
893893+CF_EXPORT
894894+const ODAttributeType kODAttributeTypeHomeDirectorySoftQuota;
895895+896896+/*!
897897+ @const kODAttributeTypeHomeLocOwner
898898+ @abstract Represents the owner of a workgroup's shared home directory.
899899+ @discussion Represents the owner of a workgroup's shared home directory.
900900+ Typically found in kODRecordTypeGroups records.
901901+*/
902902+CF_EXPORT
903903+const ODAttributeType kODAttributeTypeHomeLocOwner;
904904+905905+/*!
906906+ @const kODAttributeTypeInternetAlias
907907+ @abstract Used to track internet alias.
908908+ @discussion Used to track internet alias.
909909+*/
910910+CF_EXPORT
911911+const ODAttributeType kODAttributeTypeInternetAlias;
912912+913913+/*!
914914+ @const kODAttributeTypeKDCConfigData
915915+ @abstract Contents of the kdc.conf file.
916916+ @discussion Contents of the kdc.conf file.
917917+*/
918918+CF_EXPORT
919919+const ODAttributeType kODAttributeTypeKDCConfigData;
920920+921921+/*!
922922+ @const kODAttributeTypeKerberosServices
923923+ @abstract This is used to store the principals in host records (i.e., "host", "vnc", etc.)
924924+ @discussion This is used to store the principals in host records (i.e., "host", "vnc", etc.)
925925+*/
926926+CF_EXPORT
927927+const ODAttributeType kODAttributeTypeKerberosServices __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA);
928928+929929+/*!
930930+ @const kODAttributeTypeLastName
931931+ @abstract Used for the last name of user or person record.
932932+ @discussion Used for the last name of user or person record.
933933+*/
934934+CF_EXPORT
935935+const ODAttributeType kODAttributeTypeLastName;
936936+937937+/*!
938938+ @const kODAttributeTypeLDAPSearchBaseSuffix
939939+ @abstract Search base suffix for a LDAP server.
940940+ @discussion Search base suffix for a LDAP server.
941941+*/
942942+CF_EXPORT
943943+const ODAttributeType kODAttributeTypeLDAPSearchBaseSuffix;
944944+945945+/*!
946946+ @const kODAttributeTypeLocation
947947+ @abstract Represents the location a service is available from (usually domain name)
948948+ @discussion Represents the location a service is available from (usually domain name).
949949+ Typically found in service record types including kODRecordTypeAFPServer,
950950+ kODRecordTypeLDAPServer, and kODRecordTypeWebServer.
951951+*/
952952+CF_EXPORT
953953+const ODAttributeType kODAttributeTypeLocation;
954954+955955+/*!
956956+ @const kODAttributeTypeMapGUID
957957+ @abstract Represents the GUID for a record's map
958958+ @discussion Represents the GUID for a record's map.
959959+*/
960960+CF_EXPORT
961961+const ODAttributeType kODAttributeTypeMapGUID;
962962+963963+/*!
964964+ @const kODAttributeTypeMCXFlags
965965+ @abstract Used by ManagedClient
966966+ @discussion Used by ManagedClient.
967967+*/
968968+CF_EXPORT
969969+const ODAttributeType kODAttributeTypeMCXFlags;
970970+971971+/*!
972972+ @const kODAttributeTypeMCXSettings
973973+ @abstract Used by ManagedClient
974974+ @discussion Used by ManagedClient.
975975+*/
976976+CF_EXPORT
977977+const ODAttributeType kODAttributeTypeMCXSettings;
978978+979979+/*!
980980+ @const kODAttributeTypeMailAttribute
981981+ @abstract Holds the mail account config data
982982+ @discussion Holds the mail account config data.
983983+*/
984984+CF_EXPORT
985985+const ODAttributeType kODAttributeTypeMailAttribute;
986986+987987+/*!
988988+ @const kODAttributeTypeMetaAutomountMap
989989+ @abstract Used to query for kODRecordTypeAutomount entries
990990+ @discussion Used to query for kODRecordTypeAutomount entries associated with a specific
991991+ kODRecordTypeAutomountMap.
992992+*/
993993+CF_EXPORT
994994+const ODAttributeType kODAttributeTypeMetaAutomountMap;
995995+996996+/*!
997997+ @const kODAttributeTypeMiddleName
998998+ @abstract Used for the middle name of user or person record.
999999+ @discussion Used for the middle name of user or person record.
10001000+*/
10011001+CF_EXPORT
10021002+const ODAttributeType kODAttributeTypeMiddleName;
10031003+10041004+/*!
10051005+ @const kODAttributeTypeModificationTimestamp
10061006+ @abstract Attribute showing date/time of record modification.
10071007+ @discussion Attribute showing date/time of record modification.
10081008+ Format is x.208 standard YYYYMMDDHHMMSSZ which is required as GMT time.
10091009+*/
10101010+CF_EXPORT
10111011+const ODAttributeType kODAttributeTypeModificationTimestamp;
10121012+10131013+/*!
10141014+ @const kODAttributeTypeNFSHomeDirectory
10151015+ @abstract Defines a user's home directory mount point on the local machine.
10161016+ @discussion Defines a user's home directory mount point on the local machine.
10171017+*/
10181018+CF_EXPORT
10191019+const ODAttributeType kODAttributeTypeNFSHomeDirectory;
10201020+10211021+/*!
10221022+ @const kODAttributeTypeNote
10231023+ @abstract Note attribute.
10241024+ @discussion Note attribute.
10251025+*/
10261026+CF_EXPORT
10271027+const ODAttributeType kODAttributeTypeNote;
10281028+10291029+/*!
10301030+ @const kODAttributeTypeOperatingSystem
10311031+ @abstract Returns the operating system type where the daemon is running
10321032+ @discussion Returns the operating system type where the daemon is running,
10331033+ e.g., Mac OS X or Mac OS X Server
10341034+*/
10351035+CF_EXPORT
10361036+const ODAttributeType kODAttributeTypeOperatingSystem __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
10371037+10381038+/*!
10391039+ @const kODAttributeTypeOperatingSystemVersion
10401040+ @abstract Returns the operating system version where the daemon is running
10411041+ @discussion Returns the operating system version where the daemon is running,
10421042+ e.g., 10.6
10431043+ */
10441044+CF_EXPORT
10451045+const ODAttributeType kODAttributeTypeOperatingSystemVersion __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA);
10461046+10471047+/*!
10481048+ @const kODAttributeTypeOwner
10491049+ @abstract Attribute type for the owner of a record.
10501050+ @discussion Attribute type for the owner of a record.
10511051+ Typically the value is a LDAP distinguished name.
10521052+*/
10531053+CF_EXPORT
10541054+const ODAttributeType kODAttributeTypeOwner;
10551055+10561056+/*!
10571057+ @const kODAttributeTypeOwnerGUID
10581058+ @abstract Attribute type for the owner GUID of a group.
10591059+ @discussion Attribute type for the owner GUID of a group.
10601060+ Found in group records (kODRecordTypeGroups).
10611061+*/
10621062+CF_EXPORT
10631063+const ODAttributeType kODAttributeTypeOwnerGUID;
10641064+10651065+/*!
10661066+ @const kODAttributeTypePassword
10671067+ @abstract Holds the password or credential value.
10681068+ @discussion Holds the password or credential value.
10691069+*/
10701070+CF_EXPORT
10711071+const ODAttributeType kODAttributeTypePassword;
10721072+10731073+/*!
10741074+ @const kODAttributeTypePasswordPlus
10751075+ @abstract Holds marker data to indicate possible authentication redirection.
10761076+ @discussion Holds marker data to indicate possible authentication redirection.
10771077+*/
10781078+CF_EXPORT
10791079+const ODAttributeType kODAttributeTypePasswordPlus;
10801080+10811081+/*!
10821082+ @const kODAttributeTypePasswordPolicyOptions
10831083+ @abstract Collection of password policy options in single attribute.
10841084+ @discussion Collection of password policy options in single attribute.
10851085+ Used in user presets record.
10861086+*/
10871087+CF_EXPORT
10881088+const ODAttributeType kODAttributeTypePasswordPolicyOptions;
10891089+10901090+/*!
10911091+ @const kODAttributeTypePasswordServerList
10921092+ @abstract Represents the attribute for storing the password server's replication information.
10931093+ @discussion Represents the attribute for storing the password server's replication information.
10941094+*/
10951095+CF_EXPORT
10961096+const ODAttributeType kODAttributeTypePasswordServerList;
10971097+10981098+/*!
10991099+ @const kODAttributeTypePasswordServerLocation
11001100+ @abstract Specifies the IP address or domain name of the Password Server associated
11011101+ with a given directory node.
11021102+ @discussion Specifies the IP address or domain name of the Password Server associated
11031103+ with a given directory node. Found in a config record named PasswordServer.
11041104+*/
11051105+CF_EXPORT
11061106+const ODAttributeType kODAttributeTypePasswordServerLocation;
11071107+11081108+/*!
11091109+ @const kODAttributeTypePicture
11101110+ @abstract Represents the path of the picture for each user displayed in the login window.
11111111+ @discussion Represents the path of the picture for each user displayed in the login window.
11121112+ Found in user records (kODRecordTypeUsers).
11131113+*/
11141114+CF_EXPORT
11151115+const ODAttributeType kODAttributeTypePicture;
11161116+11171117+/*!
11181118+ @const kODAttributeTypePort
11191119+ @abstract Represents the port number a service is available on.
11201120+ @discussion Represents the port number a service is available on.
11211121+ Typically found in service record types including kODRecordTypeAFPServer,
11221122+ kODRecordTypeLDAPServer, and kODRecordTypeWebServer.
11231123+*/
11241124+CF_EXPORT
11251125+const ODAttributeType kODAttributeTypePort;
11261126+11271127+/*!
11281128+ @const kODAttributeTypePresetUserIsAdmin
11291129+ @abstract Flag to indicate whether users created from this preset are administrators
11301130+ by default.
11311131+ @discussion Flag to indicate whether users created from this preset are administrators
11321132+ by default. Found in kODRecordTypePresetUsers records.
11331133+*/
11341134+CF_EXPORT
11351135+const ODAttributeType kODAttributeTypePresetUserIsAdmin;
11361136+11371137+/*!
11381138+ @const kODAttributeTypePrimaryComputerGUID
11391139+ @abstract An attribute that defines a primary computer of the computer group.
11401140+ @discussion An attribute that defines a primary computer of the computer group.
11411141+ Added to computer group record type (kODRecordTypeComputerGroups)
11421142+*/
11431143+CF_EXPORT
11441144+const ODAttributeType kODAttributeTypePrimaryComputerGUID;
11451145+11461146+/*!
11471147+ @const kODAttributeTypePrimaryComputerList
11481148+ @abstract The GUID of the computer list with which this computer record is associated.
11491149+ @discussion The GUID of the computer list with which this computer record is associated.
11501150+*/
11511151+CF_EXPORT
11521152+const ODAttributeType kODAttributeTypePrimaryComputerList;
11531153+11541154+/*!
11551155+ @const kODAttributeTypePrimaryGroupID
11561156+ @abstract This is the 32 bit unique ID that represents the primary group
11571157+ a user is part of, or the ID of a group.
11581158+ @discussion This is the 32 bit unique ID that represents the primary group
11591159+ a user is part of, or the ID of a group. Format is a signed 32 bit integer
11601160+ represented as a string.
11611161+*/
11621162+CF_EXPORT
11631163+const ODAttributeType kODAttributeTypePrimaryGroupID;
11641164+11651165+/*!
11661166+ @const kODAttributeTypePrinter1284DeviceID
11671167+ @abstract Attribute that defines the IEEE 1284 DeviceID of a printer.
11681168+ @discussion Attribute that defines the IEEE 1284 DeviceID of a printer.
11691169+ This is used when configuring a printer.
11701170+*/
11711171+CF_EXPORT
11721172+const ODAttributeType kODAttributeTypePrinter1284DeviceID;
11731173+11741174+/*!
11751175+ @const kODAttributeTypePrinterLPRHost
11761176+ @abstract Standard attribute type for kODRecordTypePrinters.
11771177+ @discussion Standard attribute type for kODRecordTypePrinters.
11781178+*/
11791179+CF_EXPORT
11801180+const ODAttributeType kODAttributeTypePrinterLPRHost;
11811181+11821182+/*!
11831183+ @const kODAttributeTypePrinterLPRQueue
11841184+ @abstract Standard attribute type for kODRecordTypePrinters.
11851185+ @discussion Standard attribute type for kODRecordTypePrinters.
11861186+*/
11871187+CF_EXPORT
11881188+const ODAttributeType kODAttributeTypePrinterLPRQueue;
11891189+11901190+/*!
11911191+ @const kODAttributeTypePrinterMakeAndModel
11921192+ @abstract Attribute for definition of the Printer Make and Model.
11931193+ @discussion Attribute for definition of the Printer Make and Model. An example
11941194+ value would be "HP LaserJet 2200". This would be used to determine the proper PPD
11951195+ file to be used when configuring a printer from the Directory. This attribute
11961196+ is based on the IPP Printing Specification RFC and IETF IPP-LDAP Printer Record.
11971197+*/
11981198+CF_EXPORT
11991199+const ODAttributeType kODAttributeTypePrinterMakeAndModel;
12001200+12011201+/*!
12021202+ @const kODAttributeTypePrinterType
12031203+ @abstract Standard attribute type for kODRecordTypePrinters.
12041204+ @discussion Standard attribute type for kODRecordTypePrinters.
12051205+*/
12061206+CF_EXPORT
12071207+const ODAttributeType kODAttributeTypePrinterType;
12081208+12091209+/*!
12101210+ @const kODAttributeTypePrinterURI
12111211+ @abstract Attribute that defines the URI of a printer "ipp://address" or
12121212+ "smb://server/queue".
12131213+ @discussion Attribute that defines the URI of a printer "ipp://address" or
12141214+ "smb://server/queue". This is used when configuring a printer. This attribute
12151215+ is based on the IPP Printing Specification RFC and IETF IPP-LDAP Printer Record.
12161216+*/
12171217+CF_EXPORT
12181218+const ODAttributeType kODAttributeTypePrinterURI;
12191219+12201220+/*!
12211221+ @const kODAttributeTypePrinterXRISupported
12221222+ @abstract Attribute that defines additional URIs supported by a printer.
12231223+ @discussion attribute that defines additional URIs supported by a printer.
12241224+ This is used when configuring a printer. This attribute is based on the IPP
12251225+ Printing Specification RFC and IETF IPP-LDAP Printer Record.
12261226+*/
12271227+CF_EXPORT
12281228+const ODAttributeType kODAttributeTypePrinterXRISupported;
12291229+12301230+/*!
12311231+ @const kODAttributeTypePrintServiceInfoText
12321232+ @abstract Standard attribute type for kODRecordTypePrinters.
12331233+ @discussion Standard attribute type for kODRecordTypePrinters.
12341234+*/
12351235+CF_EXPORT
12361236+const ODAttributeType kODAttributeTypePrintServiceInfoText;
12371237+12381238+/*!
12391239+ @const kODAttributeTypePrintServiceInfoXML
12401240+ @abstract Standard attribute type for kODRecordTypePrinters.
12411241+ @discussion Standard attribute type for kODRecordTypePrinters.
12421242+*/
12431243+CF_EXPORT
12441244+const ODAttributeType kODAttributeTypePrintServiceInfoXML;
12451245+12461246+/*!
12471247+ @const kODAttributeTypePrintServiceUserData
12481248+ @abstract Attribute for print quota configuration or statistics (XML data).
12491249+ @discussion Attribute for print quota configuration or statistics (XML data).
12501250+ Found in user records (kODRecordTypeUsers) or print service
12511251+ statistics records (kODRecordTypePrintServiceUser).
12521252+*/
12531253+CF_EXPORT
12541254+const ODAttributeType kODAttributeTypePrintServiceUserData;
12551255+12561256+/*!
12571257+ @const kODAttributeTypeRealUserID
12581258+ @abstract Used by Managed Client.
12591259+ @discussion Used by Managed Client
12601260+*/
12611261+CF_EXPORT
12621262+const ODAttributeType kODAttributeTypeRealUserID;
12631263+12641264+/*!
12651265+ @const kODAttributeTypeRelativeDNPrefix
12661266+ @abstract Used to map the first native LDAP attribute type required in the building of the
12671267+ Relative Distinguished Name for LDAP record creation.
12681268+ @discussion Used to map the first native LDAP attribute type required in the building of the
12691269+ Relative Distinguished Name for LDAP record creation.
12701270+*/
12711271+CF_EXPORT
12721272+const ODAttributeType kODAttributeTypeRelativeDNPrefix;
12731273+12741274+/*!
12751275+ @const kODAttributeTypeSMBAcctFlags
12761276+ @abstract Account control flag.
12771277+ @discussion Account control flag.
12781278+*/
12791279+CF_EXPORT
12801280+const ODAttributeType kODAttributeTypeSMBAcctFlags;
12811281+12821282+/*!
12831283+ @const kODAttributeTypeSMBGroupRID
12841284+ @abstract Constant for supporting PDC SMB interaction with DirectoryService.
12851285+ @discussion Constant for supporting PDC SMB interaction with DirectoryService.
12861286+*/
12871287+CF_EXPORT
12881288+const ODAttributeType kODAttributeTypeSMBGroupRID;
12891289+12901290+/*!
12911291+ @const kODAttributeTypeSMBHome
12921292+ @abstract UNC address of Windows homedirectory mount point (\\server\\sharepoint).
12931293+ @discussion UNC address of Windows homedirectory mount point (\\server\\sharepoint).
12941294+*/
12951295+CF_EXPORT
12961296+const ODAttributeType kODAttributeTypeSMBHome;
12971297+12981298+/*!
12991299+ @const kODAttributeTypeSMBHomeDrive
13001300+ @abstract Drive letter for homedirectory mount point.
13011301+ @discussion Drive letter for homedirectory mount point.
13021302+*/
13031303+CF_EXPORT
13041304+const ODAttributeType kODAttributeTypeSMBHomeDrive;
13051305+13061306+/*!
13071307+ @const kODAttributeTypeSMBKickoffTime
13081308+ @abstract Attribute in support of SMB interaction.
13091309+ @discussion Attribute in support of SMB interaction.
13101310+*/
13111311+CF_EXPORT
13121312+const ODAttributeType kODAttributeTypeSMBKickoffTime;
13131313+13141314+/*!
13151315+ @const kODAttributeTypeSMBLogoffTime
13161316+ @abstract Attribute in support of SMB interaction.
13171317+ @discussion Attribute in support of SMB interaction.
13181318+*/
13191319+CF_EXPORT
13201320+const ODAttributeType kODAttributeTypeSMBLogoffTime;
13211321+13221322+/*!
13231323+ @const kODAttributeTypeSMBLogonTime
13241324+ @abstract Attribute in support of SMB interaction.
13251325+ @discussion Attribute in support of SMB interaction.
13261326+*/
13271327+CF_EXPORT
13281328+const ODAttributeType kODAttributeTypeSMBLogonTime;
13291329+13301330+/*!
13311331+ @const kODAttributeTypeSMBPrimaryGroupSID
13321332+ @abstract SMB Primary Group Security ID, stored as a string attribute of
13331333+ up to 64 bytes.
13341334+ @discussion SMB Primary Group Security ID, stored as a string attribute of
13351335+ up to 64 bytes. Found in user, group, and computer records
13361336+ (kODRecordTypeUsers, kODRecordTypeGroups, kODRecordTypeComputers).
13371337+*/
13381338+CF_EXPORT
13391339+const ODAttributeType kODAttributeTypeSMBPrimaryGroupSID;
13401340+13411341+/*!
13421342+ @const kODAttributeTypeSMBPWDLastSet
13431343+ @abstract Attribute in support of SMB interaction.
13441344+ @discussion Attribute in support of SMB interaction.
13451345+*/
13461346+CF_EXPORT
13471347+const ODAttributeType kODAttributeTypeSMBPWDLastSet;
13481348+13491349+/*!
13501350+ @const kODAttributeTypeSMBProfilePath
13511351+ @abstract Desktop management info (dock, desktop links, etc).
13521352+ @discussion Desktop management info (dock, desktop links, etc).
13531353+*/
13541354+CF_EXPORT
13551355+const ODAttributeType kODAttributeTypeSMBProfilePath;
13561356+13571357+/*!
13581358+ @const kODAttributeTypeSMBRID
13591359+ @abstract Attribute in support of SMB interaction.
13601360+ @discussion Attribute in support of SMB interaction.
13611361+*/
13621362+CF_EXPORT
13631363+const ODAttributeType kODAttributeTypeSMBRID;
13641364+13651365+/*!
13661366+ @const kODAttributeTypeSMBScriptPath
13671367+ @abstract Login script path.
13681368+ @discussion Login script path.
13691369+*/
13701370+CF_EXPORT
13711371+const ODAttributeType kODAttributeTypeSMBScriptPath;
13721372+13731373+/*!
13741374+ @const kODAttributeTypeSMBSID
13751375+ @abstract SMB Security ID, stored as a string attribute of up to 64 bytes.
13761376+ @discussion SMB Security ID, stored as a string attribute of up to 64 bytes.
13771377+ Found in user, group, and computer records (kODRecordTypeUsers,
13781378+ kODRecordTypeGroups, kODRecordTypeComputers).
13791379+*/
13801380+CF_EXPORT
13811381+const ODAttributeType kODAttributeTypeSMBSID;
13821382+13831383+/*!
13841384+ @const kODAttributeTypeSMBUserWorkstations
13851385+ @abstract List of workstations user can login from (machine account names).
13861386+ @discussion List of workstations user can login from (machine account names).
13871387+*/
13881388+CF_EXPORT
13891389+const ODAttributeType kODAttributeTypeSMBUserWorkstations;
13901390+13911391+/*!
13921392+ @const kODAttributeTypeServiceType
13931393+ @abstract Represents the service type for the service. This is the raw service type of the
13941394+ service.
13951395+ @discussion Represents the service type for the service. This is the raw service type of the
13961396+ service. For example a service record type of kODRecordTypeWebServer
13971397+ might have a service type of "http" or "https".
13981398+*/
13991399+CF_EXPORT
14001400+const ODAttributeType kODAttributeTypeServiceType;
14011401+14021402+/*!
14031403+ @const kODAttributeTypeSetupAdvertising
14041404+ @abstract Used for Setup Assistant automatic population.
14051405+ @discussion Used for Setup Assistant automatic population.
14061406+*/
14071407+CF_EXPORT
14081408+const ODAttributeType kODAttributeTypeSetupAdvertising;
14091409+14101410+/*!
14111411+ @const kODAttributeTypeSetupAutoRegister
14121412+ @abstract Used for Setup Assistant automatic population.
14131413+ @discussion Used for Setup Assistant automatic population.
14141414+*/
14151415+CF_EXPORT
14161416+const ODAttributeType kODAttributeTypeSetupAutoRegister;
14171417+14181418+/*!
14191419+ @const kODAttributeTypeSetupLocation
14201420+ @abstract Used for Setup Assistant automatic population.
14211421+ @discussion Used for Setup Assistant automatic population.
14221422+*/
14231423+CF_EXPORT
14241424+const ODAttributeType kODAttributeTypeSetupLocation;
14251425+14261426+/*!
14271427+ @const kODAttributeTypeSetupOccupation
14281428+ @abstract Used for Setup Assistant automatic population.
14291429+ @discussion Used for Setup Assistant automatic population.
14301430+*/
14311431+CF_EXPORT
14321432+const ODAttributeType kODAttributeTypeSetupOccupation;
14331433+14341434+/*!
14351435+ @const kODAttributeTypeTimeToLive
14361436+ @abstract Attribute recommending how long to cache the record's attribute values.
14371437+ @discussion Attribute recommending how long to cache the record's attribute values.
14381438+ Format is an unsigned 32 bit representing seconds. ie. 300 is 5 minutes.
14391439+*/
14401440+CF_EXPORT
14411441+const ODAttributeType kODAttributeTypeTimeToLive;
14421442+14431443+/*!
14441444+ @const kODAttributeTypeTrustInformation
14451445+ @abstract Used to describe a node's trust information.
14461446+ @discussion Used to describe a node's trust information.
14471447+*/
14481448+CF_EXPORT
14491449+const ODAttributeType kODAttributeTypeTrustInformation;
14501450+14511451+/*!
14521452+ @const kODAttributeTypeUniqueID
14531453+ @abstract This is the 32 bit unique ID that represents the user in the legacy manner.
14541454+ @discussion This is the 32 bit unique ID that represents the user in the legacy manner.
14551455+ Format is a signed integer represented as a string.
14561456+*/
14571457+CF_EXPORT
14581458+const ODAttributeType kODAttributeTypeUniqueID;
14591459+14601460+/*!
14611461+ @const kODAttributeTypeUserCertificate
14621462+ @abstract Attribute containing the binary of the user's certificate.
14631463+ @discussion Attribute containing the binary of the user's certificate.
14641464+ Usually found in user records. The certificate is data which identifies a user.
14651465+ This data is attested to by a known party, and can be independently verified
14661466+ by a third party.
14671467+*/
14681468+CF_EXPORT
14691469+const ODAttributeType kODAttributeTypeUserCertificate;
14701470+14711471+/*!
14721472+ @const kODAttributeTypeUserPKCS12Data
14731473+ @abstract Attribute containing binary data in PKCS #12 format.
14741474+ @discussion Attribute containing binary data in PKCS #12 format.
14751475+ Usually found in user records. The value can contain keys, certificates,
14761476+ and other related information and is encrypted with a passphrase.
14771477+*/
14781478+CF_EXPORT
14791479+const ODAttributeType kODAttributeTypeUserPKCS12Data;
14801480+14811481+/*!
14821482+ @const kODAttributeTypeUserShell
14831483+ @abstract Used to represent the user's shell setting.
14841484+ @discussion Used to represent the user's shell setting.
14851485+*/
14861486+CF_EXPORT
14871487+const ODAttributeType kODAttributeTypeUserShell;
14881488+14891489+/*!
14901490+ @const kODAttributeTypeUserSMIMECertificate
14911491+ @abstract Attribute containing the binary of the user's SMIME certificate.
14921492+ @discussion Attribute containing the binary of the user's SMIME certificate.
14931493+ Usually found in user records. The certificate is data which identifies a user.
14941494+ This data is attested to by a known party, and can be independently verified
14951495+ by a third party. SMIME certificates are often used for signed or encrypted
14961496+ emails.
14971497+*/
14981498+CF_EXPORT
14991499+const ODAttributeType kODAttributeTypeUserSMIMECertificate;
15001500+15011501+/*!
15021502+ @const kODAttributeTypeVFSDumpFreq
15031503+ @abstract Attribute used to support mount records.
15041504+ @discussion Attribute used to support mount records.
15051505+*/
15061506+CF_EXPORT
15071507+const ODAttributeType kODAttributeTypeVFSDumpFreq;
15081508+15091509+/*!
15101510+ @const kODAttributeTypeVFSLinkDir
15111511+ @abstract Attribute used to support mount records.
15121512+ @discussion Attribute used to support mount records.
15131513+*/
15141514+CF_EXPORT
15151515+const ODAttributeType kODAttributeTypeVFSLinkDir;
15161516+15171517+/*!
15181518+ @const kODAttributeTypeVFSPassNo
15191519+ @abstract Attribute used to support mount records.
15201520+ @discussion Attribute used to support mount records.
15211521+*/
15221522+CF_EXPORT
15231523+const ODAttributeType kODAttributeTypeVFSPassNo;
15241524+15251525+/*!
15261526+ @const kODAttributeTypeVFSType
15271527+ @abstract Attribute used to support mount records.
15281528+ @discussion Attribute used to support mount records.
15291529+*/
15301530+CF_EXPORT
15311531+const ODAttributeType kODAttributeTypeVFSType;
15321532+15331533+/*!
15341534+ @const kODAttributeTypeWeblogURI
15351535+ @abstract attribute that defines the URI of a user's weblog.
15361536+ @discussion attribute that defines the URI of a user's weblog.
15371537+ Usually found in user records (kODRecordTypeUsers).
15381538+ Example: http://example.com/blog/jsmith
15391539+*/
15401540+CF_EXPORT
15411541+const ODAttributeType kODAttributeTypeWeblogURI;
15421542+15431543+/*!
15441544+ @const kODAttributeTypeXMLPlist
15451545+ @abstract XML plist used.
15461546+ @discussion XML plist used.
15471547+*/
15481548+CF_EXPORT
15491549+const ODAttributeType kODAttributeTypeXMLPlist;
15501550+15511551+/*!
15521552+ @const kODAttributeTypeProtocolNumber
15531553+ @abstract Attribute that defines a protocol number.
15541554+ @discussion Attribute that defines a protocol number. Usually found
15551555+ in protocol records (kODRecordTypeProtocols)
15561556+*/
15571557+CF_EXPORT
15581558+const ODAttributeType kODAttributeTypeProtocolNumber;
15591559+15601560+/*!
15611561+ @const kODAttributeTypeRPCNumber
15621562+ @abstract Attribute that defines an RPC number.
15631563+ @discussion Attribute that defines an RPC number. Usually found
15641564+ in RPC records (kODRecordTypeRPC)
15651565+*/
15661566+CF_EXPORT
15671567+const ODAttributeType kODAttributeTypeRPCNumber;
15681568+15691569+/*!
15701570+ @const kODAttributeTypeNetworkNumber
15711571+ @abstract Attribute that defines a network number.
15721572+ @discussion Attribute that defines a network number. Usually found
15731573+ in network records (kODRecordTypeNetworks)
15741574+*/
15751575+CF_EXPORT
15761576+const ODAttributeType kODAttributeTypeNetworkNumber;
15771577+15781578+/*!
15791579+ @const kODAttributeTypeAccessControlEntry
15801580+ @abstract Attribute type which stores directory access control directives.
15811581+ @discussion Attribute type which stores directory access control directives.
15821582+*/
15831583+CF_EXPORT
15841584+const ODAttributeType kODAttributeTypeAccessControlEntry;
15851585+15861586+/*!
15871587+ @const kODAttributeTypeAddressLine1
15881588+ @abstract Line one of multiple lines of address data for a user.
15891589+ @discussion Line one of multiple lines of address data for a user.
15901590+*/
15911591+CF_EXPORT
15921592+const ODAttributeType kODAttributeTypeAddressLine1;
15931593+15941594+/*!
15951595+ @const kODAttributeTypeAddressLine2
15961596+ @abstract Line two of multiple lines of address data for a user.
15971597+ @discussion Line two of multiple lines of address data for a user.
15981598+*/
15991599+CF_EXPORT
16001600+const ODAttributeType kODAttributeTypeAddressLine2;
16011601+16021602+/*!
16031603+ @const kODAttributeTypeAddressLine3
16041604+ @abstract Line three of multiple lines of address data for a user.
16051605+ @discussion Line three of multiple lines of address data for a user.
16061606+*/
16071607+CF_EXPORT
16081608+const ODAttributeType kODAttributeTypeAddressLine3;
16091609+16101610+/*!
16111611+ @const kODAttributeTypeAreaCode
16121612+ @abstract Area code of a user's phone number.
16131613+ @discussion Area code of a user's phone number.
16141614+*/
16151615+CF_EXPORT
16161616+const ODAttributeType kODAttributeTypeAreaCode;
16171617+16181618+/*!
16191619+ @const kODAttributeTypeAuthenticationAuthority
16201620+ @abstract Determines what mechanism is used to verify or set a user's password.
16211621+ @discussion Determines what mechanism is used to verify or set a user's password.
16221622+ If multiple values are present, the first attributes returned take precedence.
16231623+ Typically found in User records (kODRecordTypeUsers).
16241624+16251625+ Authentication authorities are a multi-part string separated by semi-colons.
16261626+ One component is the "type" of authority, such as those listed below:
16271627+16281628+ "basic" - is a crypt password
16291629+ "ShadowHash" - is a hashed password stored in a secure location
16301630+ "ApplePasswordServer" - is a password server-based account
16311631+ "Kerberosv5" - is a Kerberosv5 based
16321632+ "LocalCachedUser" - is a cached account based on an account from another node, using a ShadowHash password
16331633+ "DisabledUser" - is an account that has been disabled
16341634+*/
16351635+CF_EXPORT
16361636+const ODAttributeType kODAttributeTypeAuthenticationAuthority;
16371637+16381638+/*!
16391639+ @const kODAttributeTypeAutomountInformation
16401640+ @abstract Determines what mechanism is used to verify or set a user's password.
16411641+ @discussion Determines what mechanism is used to verify or set a user's password.
16421642+ If multiple values are present, the first attributes returned take precedence.
16431643+ Typically found in User records (kODRecordTypeUsers).
16441644+*/
16451645+CF_EXPORT
16461646+const ODAttributeType kODAttributeTypeAutomountInformation;
16471647+16481648+/*!
16491649+ @const kODAttributeTypeBootParams
16501650+ @abstract Attribute type in host or machine records for storing boot params.
16511651+ @discussion Attribute type in host or machine records for storing boot params.
16521652+*/
16531653+CF_EXPORT
16541654+const ODAttributeType kODAttributeTypeBootParams;
16551655+16561656+/*!
16571657+ @const kODAttributeTypeBuilding
16581658+ @abstract Represents the building name for a user or person record.
16591659+ @discussion Represents the building name for a user or person record.
16601660+ Usually found in user or people records (kODRecordTypeUsers or
16611661+ kODRecordTypePeople).
16621662+*/
16631663+CF_EXPORT
16641664+const ODAttributeType kODAttributeTypeBuilding;
16651665+16661666+/*!
16671667+ @const kODAttributeTypeServicesLocator
16681668+ @abstract the URI for a record's calendar
16691669+ @discussion the URI for a record's calendar
16701670+*/
16711671+CF_EXPORT
16721672+const ODAttributeType kODAttributeTypeServicesLocator;
16731673+16741674+/*!
16751675+ @const kODAttributeTypeCity
16761676+ @abstract Usually, city for a user or person record.
16771677+ @discussion Usually, city for a user or person record.
16781678+ Usually found in user or people records (kODRecordTypeUsers or
16791679+ kODRecordTypePeople).
16801680+*/
16811681+CF_EXPORT
16821682+const ODAttributeType kODAttributeTypeCity;
16831683+16841684+/*!
16851685+ @const kODAttributeTypeCompany
16861686+ @abstract attribute that defines the user's company.
16871687+ @discussion attribute that defines the user's company.
16881688+ Example: Apple Inc.
16891689+*/
16901690+CF_EXPORT
16911691+const ODAttributeType kODAttributeTypeCompany;
16921692+16931693+/*!
16941694+ @const kODAttributeTypeComputers
16951695+ @abstract List of computers.
16961696+ @discussion List of computers.
16971697+*/
16981698+CF_EXPORT
16991699+const ODAttributeType kODAttributeTypeComputers;
17001700+17011701+/*!
17021702+ @const kODAttributeTypeCountry
17031703+ @abstract Represents country of a record entry.
17041704+ @discussion Represents country of a record entry.
17051705+ Usually found in user or people records (kODRecordTypeUsers or
17061706+ kODRecordTypePeople).
17071707+*/
17081708+CF_EXPORT
17091709+const ODAttributeType kODAttributeTypeCountry;
17101710+17111711+/*!
17121712+ @const kODAttributeTypeDepartment
17131713+ @abstract Represents the department name of a user or person.
17141714+ @discussion Represents the department name of a user or person.
17151715+ Usually found in user or people records (kODRecordTypeUsers or
17161716+ kODRecordTypePeople).
17171717+*/
17181718+CF_EXPORT
17191719+const ODAttributeType kODAttributeTypeDepartment;
17201720+17211721+/*!
17221722+ @const kODAttributeTypeDNSName
17231723+ @abstract DNS Resolver nameserver attribute.
17241724+ @discussion DNS Resolver nameserver attribute.
17251725+*/
17261726+CF_EXPORT
17271727+const ODAttributeType kODAttributeTypeDNSName;
17281728+17291729+/*!
17301730+ @const kODAttributeTypeEMailAddress
17311731+ @abstract Email address of usually a user record.
17321732+ @discussion Email address of usually a user record.
17331733+*/
17341734+CF_EXPORT
17351735+const ODAttributeType kODAttributeTypeEMailAddress;
17361736+17371737+/*!
17381738+ @const kODAttributeTypeEMailContacts
17391739+ @abstract Attribute that defines a record's custom email addresses.
17401740+ @discussion Attribute that defines a record's custom email addresses.
17411741+ found in user records (kODRecordTypeUsers).
17421742+ Example: home:johndoe\@mymail.com
17431743+*/
17441744+CF_EXPORT
17451745+const ODAttributeType kODAttributeTypeEMailContacts;
17461746+17471747+/*!
17481748+ @const kODAttributeTypeFaxNumber
17491749+ @abstract Represents the FAX numbers of a user or person.
17501750+ @discussion Represents the FAX numbers of a user or person.
17511751+ Usually found in user or people records (kODRecordTypeUsers or
17521752+ kODRecordTypePeople).
17531753+*/
17541754+CF_EXPORT
17551755+const ODAttributeType kODAttributeTypeFaxNumber;
17561756+17571757+/*!
17581758+ @const kODAttributeTypeGroup
17591759+ @abstract List of groups.
17601760+ @discussion List of groups.
17611761+*/
17621762+CF_EXPORT
17631763+const ODAttributeType kODAttributeTypeGroup;
17641764+17651765+/*!
17661766+ @const kODAttributeTypeGroupMembers
17671767+ @abstract Attribute type in group records containing lists of GUID values for members other than groups.
17681768+ @discussion Attribute type in group records containing lists of GUID values for members other than groups.
17691769+*/
17701770+CF_EXPORT
17711771+const ODAttributeType kODAttributeTypeGroupMembers;
17721772+17731773+/*!
17741774+ @const kODAttributeTypeGroupMembership
17751775+ @abstract Usually a list of users that below to a given group record.
17761776+ @discussion Usually a list of users that below to a given group record.
17771777+*/
17781778+CF_EXPORT
17791779+const ODAttributeType kODAttributeTypeGroupMembership;
17801780+17811781+/*!
17821782+ @const kODAttributeTypeGroupServices
17831783+ @abstract xml-plist attribute that defines a group's services.
17841784+ @discussion xml-plist attribute that defines a group's services.
17851785+ Found in group records (kODRecordTypeGroups).
17861786+*/
17871787+CF_EXPORT
17881788+const ODAttributeType kODAttributeTypeGroupServices;
17891789+17901790+/*!
17911791+ @const kODAttributeTypeHomePhoneNumber
17921792+ @abstract Home telephone number of a user or person.
17931793+ @discussion Home telephone number of a user or person.
17941794+*/
17951795+CF_EXPORT
17961796+const ODAttributeType kODAttributeTypeHomePhoneNumber;
17971797+17981798+/*!
17991799+ @const kODAttributeTypeHTML
18001800+ @abstract HTML location.
18011801+ @discussion HTML location.
18021802+*/
18031803+CF_EXPORT
18041804+const ODAttributeType kODAttributeTypeHTML;
18051805+18061806+/*!
18071807+ @const kODAttributeTypeHomeDirectory
18081808+ @abstract Network home directory URL.
18091809+ @discussion Network home directory URL.
18101810+*/
18111811+CF_EXPORT
18121812+const ODAttributeType kODAttributeTypeHomeDirectory;
18131813+18141814+/*!
18151815+ @const kODAttributeTypeIMHandle
18161816+ @abstract Represents the Instant Messaging handles of a user.
18171817+ @discussion Represents the Instant Messaging handles of a user.
18181818+ Values should be prefixed with the appropriate IM type
18191819+ (i.e., AIM:, Jabber:, MSN:, Yahoo:, or ICQ:).
18201820+ Usually found in user records (kODRecordTypeUsers).
18211821+*/
18221822+CF_EXPORT
18231823+const ODAttributeType kODAttributeTypeIMHandle;
18241824+18251825+/*!
18261826+ @const kODAttributeTypeIPAddress
18271827+ @abstract IP address expressed either as domain or IP notation.
18281828+ @discussion IP address expressed either as domain or IP notation.
18291829+*/
18301830+CF_EXPORT
18311831+const ODAttributeType kODAttributeTypeIPAddress;
18321832+18331833+/*!
18341834+ @const kODAttributeTypeIPAddressAndENetAddress
18351835+ @abstract A pairing of IPv4 or IPv6 addresses with Ethernet addresses
18361836+ @discussion A pairing of IPv4 or IPv6 addresses with Ethernet addresses
18371837+ (e.g., "10.1.1.1/00:16:cb:92:56:41"). Usually found on kODRecordTypeComputers for use by
18381838+ services that need specific pairing of the two values. This should be in addition to
18391839+ kODAttributeTypeIPAddress, kODAttributeTypeIPv6Address and kODAttributeTypeENetAddress. This is
18401840+ necessary because not all directories return attribute values in a guaranteed order.
18411841+*/
18421842+CF_EXPORT
18431843+const ODAttributeType kODAttributeTypeIPAddressAndENetAddress;
18441844+18451845+/*!
18461846+ @const kODAttributeTypeIPv6Address
18471847+ @abstract IPv6 address expressed in the standard notation
18481848+ @discussion IPv6 address expressed in the standard notation (e.g., "fe80::236:caff:fcc2:5641")
18491849+ Usually found on kODRecordTypeComputers and kODRecordTypeHosts.
18501850+*/
18511851+CF_EXPORT
18521852+const ODAttributeType kODAttributeTypeIPv6Address;
18531853+18541854+/*!
18551855+ @const kODAttributeTypeJPEGPhoto
18561856+ @abstract Used to store binary picture data in JPEG format.
18571857+ @discussion Used to store binary picture data in JPEG format.
18581858+ Usually found in user, people or group records (kODRecordTypeUsers,
18591859+ kODRecordTypePeople, kODRecordTypeGroups).
18601860+*/
18611861+CF_EXPORT
18621862+const ODAttributeType kODAttributeTypeJPEGPhoto;
18631863+18641864+/*!
18651865+ @const kODAttributeTypeJobTitle
18661866+ @abstract Represents the job title of a user.
18671867+ @discussion Represents the job title of a user.
18681868+ Usually found in user or people records (kODRecordTypeUsers or
18691869+ kODRecordTypePeople).
18701870+*/
18711871+CF_EXPORT
18721872+const ODAttributeType kODAttributeTypeJobTitle;
18731873+18741874+/*!
18751875+ @const kODAttributeTypeKDCAuthKey
18761876+ @abstract KDC master key RSA encrypted with realm public key.
18771877+ @discussion KDC master key RSA encrypted with realm public key.
18781878+*/
18791879+CF_EXPORT
18801880+const ODAttributeType kODAttributeTypeKDCAuthKey;
18811881+18821882+/*!
18831883+ @const kODAttributeTypeKeywords
18841884+ @abstract Keywords using for searching capability.
18851885+ @discussion Keywords using for searching capability.
18861886+*/
18871887+CF_EXPORT
18881888+const ODAttributeType kODAttributeTypeKeywords;
18891889+18901890+/*!
18911891+ @const kODAttributeTypeLDAPReadReplicas
18921892+ @abstract List of LDAP server URLs which can each be used to read directory data.
18931893+ @discussion List of LDAP server URLs which can each be used to read directory data.
18941894+*/
18951895+CF_EXPORT
18961896+const ODAttributeType kODAttributeTypeLDAPReadReplicas;
18971897+18981898+/*!
18991899+ @const kODAttributeTypeLDAPWriteReplicas
19001900+ @abstract List of LDAP server URLs which can each be used to write directory data.
19011901+ @discussion List of LDAP server URLs which can each be used to write directory data.
19021902+*/
19031903+CF_EXPORT
19041904+const ODAttributeType kODAttributeTypeLDAPWriteReplicas;
19051905+19061906+/*!
19071907+ @const kODAttributeTypeMapCoordinates
19081908+ @abstract attribute that defines coordinates for a user's location.
19091909+ @discussion attribute that defines coordinates for a user's location .
19101910+ found in user records (kODRecordTypeUsers) and resource records (kODRecordTypeResources).
19111911+ Example: 7.7,10.6
19121912+*/
19131913+CF_EXPORT
19141914+const ODAttributeType kODAttributeTypeMapCoordinates;
19151915+19161916+/*!
19171917+ @const kODAttributeTypeMapURI
19181918+ @abstract attribute that defines the URI of a user's location.
19191919+ @discussion attribute that defines the URI of a user's location.
19201920+ Usually found in user records (kODRecordTypeUsers).
19211921+ Example: http://example.com/bldg1
19221922+*/
19231923+CF_EXPORT
19241924+const ODAttributeType kODAttributeTypeMapURI;
19251925+19261926+/*!
19271927+ @const kODAttributeTypeMIME
19281928+ @abstract Data contained in this attribute type is a fully qualified MIME Type.
19291929+ @discussion Data contained in this attribute type is a fully qualified MIME Type.
19301930+*/
19311931+CF_EXPORT
19321932+const ODAttributeType kODAttributeTypeMIME;
19331933+19341934+/*!
19351935+ @const kODAttributeTypeMobileNumber
19361936+ @abstract Represents the mobile numbers of a user or person.
19371937+ @discussion Represents the mobile numbers of a user or person.
19381938+ Usually found in user or people records (kODRecordTypeUsers or
19391939+ kODRecordTypePeople).
19401940+*/
19411941+CF_EXPORT
19421942+const ODAttributeType kODAttributeTypeMobileNumber;
19431943+19441944+/*!
19451945+ @const kODAttributeTypeNestedGroups
19461946+ @abstract Attribute type in group records for the list of GUID values for nested groups.
19471947+ @discussion Attribute type in group records for the list of GUID values for nested groups.
19481948+*/
19491949+CF_EXPORT
19501950+const ODAttributeType kODAttributeTypeNestedGroups;
19511951+19521952+/*!
19531953+ @const kODAttributeTypeNetGroups
19541954+ @abstract Attribute type that indicates which netgroups its record is a member of.
19551955+ @discussion Attribute type that indicates which netgroups its record is a member of.
19561956+ Found in user and host records.
19571957+*/
19581958+CF_EXPORT
19591959+const ODAttributeType kODAttributeTypeNetGroups;
19601960+19611961+/*!
19621962+ @const kODAttributeTypeNickName
19631963+ @abstract Represents the nickname of a user or person.
19641964+ @discussion Represents the nickname of a user or person.
19651965+ Usually found in user or people records (kODRecordTypeUsers or
19661966+ kODRecordTypePeople).
19671967+*/
19681968+CF_EXPORT
19691969+const ODAttributeType kODAttributeTypeNickName;
19701970+19711971+/*!
19721972+ @const kODAttributeTypeOrganizationInfo
19731973+ @abstract Usually the organization info of a user.
19741974+ @discussion Usually the organization info of a user.
19751975+*/
19761976+CF_EXPORT
19771977+const ODAttributeType kODAttributeTypeOrganizationInfo;
19781978+19791979+/*!
19801980+ @const kODAttributeTypeOrganizationName
19811981+ @abstract Usually the organization of a user.
19821982+ @discussion Usually the organization of a user.
19831983+*/
19841984+CF_EXPORT
19851985+const ODAttributeType kODAttributeTypeOrganizationName;
19861986+19871987+/*!
19881988+ @const kODAttributeTypePagerNumber
19891989+ @abstract Represents the pager numbers of a user or person.
19901990+ @discussion Represents the pager numbers of a user or person.
19911991+ Usually found in user or people records (kODRecordTypeUsers or
19921992+ kODRecordTypePeople).
19931993+*/
19941994+CF_EXPORT
19951995+const ODAttributeType kODAttributeTypePagerNumber;
19961996+19971997+/*!
19981998+ @const kODAttributeTypePhoneContacts
19991999+ @abstract attribute that defines a record's custom phone numbers.
20002000+ @discussion attribute that defines a record's custom phone numbers.
20012001+ found in user or people records.
20022002+ Example: home fax:408-555-4444
20032003+*/
20042004+CF_EXPORT
20052005+const ODAttributeType kODAttributeTypePhoneContacts;
20062006+20072007+/*!
20082008+ @const kODAttributeTypePhoneNumber
20092009+ @abstract Telephone number of a user.
20102010+ @discussion Telephone number of a user.
20112011+*/
20122012+CF_EXPORT
20132013+const ODAttributeType kODAttributeTypePhoneNumber;
20142014+20152015+/*!
20162016+ @const kODAttributeTypePGPPublicKey
20172017+ @abstract Pretty Good Privacy public encryption key.
20182018+ @discussion Pretty Good Privacy public encryption key.
20192019+*/
20202020+CF_EXPORT
20212021+const ODAttributeType kODAttributeTypePGPPublicKey;
20222022+20232023+/*!
20242024+ @const kODAttributeTypePostalAddress
20252025+ @abstract The postal address usually excluding postal code.
20262026+ @discussion The postal address usually excluding postal code.
20272027+*/
20282028+CF_EXPORT
20292029+const ODAttributeType kODAttributeTypePostalAddress;
20302030+20312031+/*!
20322032+ @const kODAttributeTypePostalAddressContacts
20332033+ @abstract attribute that defines a record's alternate postal addresses.
20342034+ @discussion attribute that defines a record's alternate postal addresses.
20352035+ Found in user records (kODRecordTypeUsers) and resource records (kODRecordTypeResources).
20362036+*/
20372037+CF_EXPORT
20382038+const ODAttributeType kODAttributeTypePostalAddressContacts;
20392039+20402040+/*!
20412041+ @const kODAttributeTypePostalCode
20422042+ @abstract The postal code such as zip code in the USA.
20432043+ @discussion The postal code such as zip code in the USA.
20442044+*/
20452045+CF_EXPORT
20462046+const ODAttributeType kODAttributeTypePostalCode;
20472047+20482048+/*!
20492049+ @const kODAttributeTypeNamePrefix
20502050+ @abstract Represents the title prefix of a user or person.
20512051+ @discussion Represents the title prefix of a user or person.
20522052+ ie. Mr., Ms., Mrs., Dr., etc.
20532053+ Usually found in user or people records (kODRecordTypeUsers or
20542054+ kODRecordTypePeople).
20552055+*/
20562056+CF_EXPORT
20572057+const ODAttributeType kODAttributeTypeNamePrefix;
20582058+20592059+/*!
20602060+ @const kODAttributeTypeProfiles
20612061+ @abstract Profiles associated with the record.
20622062+ */
20632063+CF_EXPORT
20642064+const ODAttributeType kODAttributeTypeProfiles __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
20652065+20662066+/*!
20672067+ @const kODAttributeTypeProfilesTimestamp
20682068+ @abstract Timestamp for the profiles associated with the record.
20692069+ */
20702070+CF_EXPORT
20712071+const ODAttributeType kODAttributeTypeProfilesTimestamp __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
20722072+20732073+/*!
20742074+ @const kODAttributeTypeProtocols
20752075+ @abstract List of protocols.
20762076+ @discussion List of protocols.
20772077+*/
20782078+CF_EXPORT
20792079+const ODAttributeType kODAttributeTypeProtocols;
20802080+20812081+/*!
20822082+ @const kODAttributeTypeRecordName
20832083+ @abstract List of names/keys for this record.
20842084+ @discussion List of names/keys for this record.
20852085+*/
20862086+CF_EXPORT
20872087+const ODAttributeType kODAttributeTypeRecordName;
20882088+20892089+/*!
20902090+ @const kODAttributeTypeRelationships
20912091+ @abstract attribute that defines the relationship to the record type.
20922092+ @discussion attribute that defines the relationship to the record type.
20932093+ found in user records (kODRecordTypeUsers).
20942094+ Example: brother:John
20952095+*/
20962096+CF_EXPORT
20972097+const ODAttributeType kODAttributeTypeRelationships;
20982098+20992099+/*!
21002100+ @const kODAttributeTypeResourceInfo
21012101+ @abstract attribute that defines a resource record's info.
21022102+ @discussion attribute that defines a resource record's info.
21032103+*/
21042104+CF_EXPORT
21052105+const ODAttributeType kODAttributeTypeResourceInfo;
21062106+21072107+/*!
21082108+ @const kODAttributeTypeResourceType
21092109+ @abstract Attribute type for the kind of resource.
21102110+ @discussion Attribute type for the kind of resource.
21112111+ found in resource records (kODRecordTypeResources).
21122112+ Example: ConferenceRoom
21132113+*/
21142114+CF_EXPORT
21152115+const ODAttributeType kODAttributeTypeResourceType;
21162116+21172117+/*!
21182118+ @const kODAttributeTypeState
21192119+ @abstract The state or province of a country.
21202120+ @discussion The state or province of a country.
21212121+*/
21222122+CF_EXPORT
21232123+const ODAttributeType kODAttributeTypeState;
21242124+21252125+/*!
21262126+ @const kODAttributeTypeStreet
21272127+ @abstract Represents the street address of a user or person.
21282128+ @discussion Represents the street address of a user or person.
21292129+ Usually found in user or people records (kODRecordTypeUsers or
21302130+ kODRecordTypePeople).
21312131+*/
21322132+CF_EXPORT
21332133+const ODAttributeType kODAttributeTypeStreet;
21342134+21352135+/*!
21362136+ @const kODAttributeTypeNameSuffix
21372137+ @abstract Represents the name suffix of a user or person.
21382138+ @discussion Represents the name suffix of a user or person.
21392139+ i.e., Jr., Sr., etc.
21402140+ Usually found in user or people records (kODRecordTypeUsers or
21412141+ kODRecordTypePeople).
21422142+*/
21432143+CF_EXPORT
21442144+const ODAttributeType kODAttributeTypeNameSuffix;
21452145+21462146+/*!
21472147+ @const kODAttributeTypeURL
21482148+ @abstract List of URLs.
21492149+ @discussion List of URLs.
21502150+*/
21512151+CF_EXPORT
21522152+const ODAttributeType kODAttributeTypeURL;
21532153+21542154+/*!
21552155+ @const kODAttributeTypeVFSOpts
21562156+ @abstract Used in support of mount records.
21572157+ @discussion Used in support of mount records.
21582158+*/
21592159+CF_EXPORT
21602160+const ODAttributeType kODAttributeTypeVFSOpts;
21612161+21622162+/*!
21632163+ @const kODAttributeTypeAlias
21642164+ @abstract Alias attribute, contain pointer to another node/record/attribute.
21652165+ @discussion Alias attribute, contain pointer to another node/record/attribute.
21662166+*/
21672167+CF_EXPORT
21682168+const ODAttributeType kODAttributeTypeAlias;
21692169+21702170+/*!
21712171+ @const kODAttributeTypeAuthCredential
21722172+ @abstract An authentication credential, to be used to authenticate to a Directory.
21732173+ @discussion An authentication credential, to be used to authenticate to a Directory.
21742174+*/
21752175+CF_EXPORT
21762176+const ODAttributeType kODAttributeTypeAuthCredential;
21772177+21782178+/*!
21792179+ @const kODAttributeTypeCopyTimestamp
21802180+ @abstract Timestamp used in local account caching.
21812181+ @discussion Timestamp used in local account caching.
21822182+*/
21832183+CF_EXPORT
21842184+const ODAttributeType kODAttributeTypeCopyTimestamp;
21852185+21862186+/*!
21872187+ @const kODAttributeTypeDateRecordCreated
21882188+ @abstract Date of record creation.
21892189+ @discussion Date of record creation.
21902190+*/
21912191+CF_EXPORT
21922192+const ODAttributeType kODAttributeTypeDateRecordCreated;
21932193+21942194+/*!
21952195+ @const kODAttributeTypeKerberosRealm
21962196+ @abstract Supports Kerberized SMB Server services.
21972197+ @discussion Supports Kerberized SMB Server services.
21982198+*/
21992199+CF_EXPORT
22002200+const ODAttributeType kODAttributeTypeKerberosRealm;
22012201+22022202+/*!
22032203+ @const kODAttributeTypeNTDomainComputerAccount
22042204+ @abstract Supports Kerberized SMB Server services.
22052205+ @discussion Supports Kerberized SMB Server services.
22062206+*/
22072207+CF_EXPORT
22082208+const ODAttributeType kODAttributeTypeNTDomainComputerAccount;
22092209+22102210+/*!
22112211+ @const kODAttributeTypeOriginalHomeDirectory
22122212+ @abstract Home directory URL used in local account caching.
22132213+ @discussion Home directory URL used in local account caching.
22142214+*/
22152215+CF_EXPORT
22162216+const ODAttributeType kODAttributeTypeOriginalHomeDirectory;
22172217+22182218+/*!
22192219+ @const kODAttributeTypeOriginalNFSHomeDirectory
22202220+ @abstract NFS home directory used in local account caching.
22212221+ @discussion NFS home directory used in local account caching.
22222222+*/
22232223+CF_EXPORT
22242224+const ODAttributeType kODAttributeTypeOriginalNFSHomeDirectory;
22252225+22262226+/*!
22272227+ @const kODAttributeTypeOriginalNodeName
22282228+ @abstract Nodename used in local account caching.
22292229+ @discussion Nodename used in local account caching.
22302230+*/
22312231+CF_EXPORT
22322232+const ODAttributeType kODAttributeTypeOriginalNodeName;
22332233+22342234+/*!
22352235+ @const kODAttributeTypePrimaryNTDomain
22362236+ @abstract Supports Kerberized SMB Server services.
22372237+ @discussion Supports Kerberized SMB Server services.
22382238+*/
22392239+CF_EXPORT
22402240+const ODAttributeType kODAttributeTypePrimaryNTDomain;
22412241+22422242+/*!
22432243+ @const kODAttributeTypePwdAgingPolicy
22442244+ @abstract Contains the password aging policy data for an authentication capable record.
22452245+ @discussion Contains the password aging policy data for an authentication capable record.
22462246+*/
22472247+CF_EXPORT
22482248+const ODAttributeType kODAttributeTypePwdAgingPolicy;
22492249+22502250+/*!
22512251+ @const kODAttributeTypeReadOnlyNode
22522252+ @abstract Can be found using dsGetDirNodeInfo and will return one of
22532253+ ReadOnly, ReadWrite, or WriteOnly strings.
22542254+ @discussion Can be found using dsGetDirNodeInfo and will return one of
22552255+ ReadOnly, ReadWrite, or WriteOnly strings.
22562256+ Note that ReadWrite does not imply fully readable or writable
22572257+*/
22582258+CF_EXPORT
22592259+const ODAttributeType kODAttributeTypeReadOnlyNode;
22602260+22612261+/*!
22622262+ @const kODAttributeTypeTimePackage
22632263+ @abstract Data of Create, Modify, Backup time in UTC.
22642264+ @discussion Data of Create, Modify, Backup time in UTC.
22652265+*/
22662266+CF_EXPORT
22672267+const ODAttributeType kODAttributeTypeTimePackage;
22682268+22692269+/*!
22702270+ @const kODAttributeTypeTotalSize
22712271+ @abstract checksum/meta data.
22722272+ @discussion checksum/meta data.
22732273+*/
22742274+CF_EXPORT
22752275+const ODAttributeType kODAttributeTypeTotalSize;
22762276+22772277+/*!
22782278+ @const kODAttributeTypeAuthMethod
22792279+ @abstract Authentication method for an authentication capable record.
22802280+ @discussion Authentication method for an authentication capable record.
22812281+*/
22822282+CF_EXPORT
22832283+const ODAttributeType kODAttributeTypeAuthMethod;
22842284+22852285+/*!
22862286+ @const kODAttributeTypeMetaNodeLocation
22872287+ @abstract Meta attribute returning registered node name by directory node plugin.
22882288+ @discussion Meta attribute returning registered node name by directory node plugin.
22892289+*/
22902290+CF_EXPORT
22912291+const ODAttributeType kODAttributeTypeMetaNodeLocation;
22922292+22932293+/*!
22942294+ @const kODAttributeTypeNodePath
22952295+ @abstract Attribute type in Neighborhood records describing the DS Node to search while
22962296+ looking up aliases in this neighborhood.
22972297+ @discussion Attribute type in Neighborhood records describing the DS Node to search while
22982298+ looking up aliases in this neighborhood.
22992299+*/
23002300+CF_EXPORT
23012301+const ODAttributeType kODAttributeTypeNodePath;
23022302+23032303+/*!
23042304+ @const kODAttributeTypePlugInInfo
23052305+ @abstract Information (version, signature, about, credits, etc.) about the plug-in
23062306+ that is actually servicing a particular directory node.
23072307+ @discussion Information (version, signature, about, credits, etc.) about the plug-in
23082308+ that is actually servicing a particular directory node.
23092309+ Has never been supported.
23102310+*/
23112311+CF_EXPORT
23122312+const ODAttributeType kODAttributeTypePlugInInfo;
23132313+23142314+/*!
23152315+ @const kODAttributeTypeRecordType
23162316+ @abstract Attribute for a Record or a Directory Node.
23172317+ @discussion Attribute for a Record or a Directory Node.
23182318+*/
23192319+CF_EXPORT
23202320+const ODAttributeType kODAttributeTypeRecordType;
23212321+23222322+/*!
23232323+ @const kODAttributeTypeSchema
23242324+ @abstract List of attribute types.
23252325+ @discussion List of attribute types.
23262326+*/
23272327+CF_EXPORT
23282328+const ODAttributeType kODAttributeTypeSchema;
23292329+23302330+/*!
23312331+ @const kODAttributeTypeSubNodes
23322332+ @abstract Attribute of a node which lists the available subnodes
23332333+ of that node.
23342334+ @discussion Attribute of a node which lists the available subnodes
23352335+ of that node.
23362336+*/
23372337+CF_EXPORT
23382338+const ODAttributeType kODAttributeTypeSubNodes;
23392339+23402340+/*!
23412341+ @const kODAttributeTypeNetGroupTriplet
23422342+ @abstract Attribute that defines the host, user and domain triplet combinations
23432343+ to support NetGroups. Each attribute value is comma separated string to maintain the
23442344+ triplet (e.g., host,user,domain).
23452345+ @discussion Attribute that defines the host, user and domain triplet combinations
23462346+ to support NetGroups. Each attribute value is comma separated string to maintain the
23472347+ triplet (e.g., host,user,domain).
23482348+*/
23492349+CF_EXPORT
23502350+const ODAttributeType kODAttributeTypeNetGroupTriplet;
23512351+23522352+/*!
23532353+ @const kODAttributeTypeSearchPath
23542354+ @abstract Search path used by the search node.
23552355+ @discussion Search path used by the search node.
23562356+*/
23572357+CF_EXPORT
23582358+const ODAttributeType kODAttributeTypeSearchPath;
23592359+23602360+/*!
23612361+ @const kODAttributeTypeSearchPolicy
23622362+ @abstract Search policy for the search node.
23632363+ @discussion Search policy for the search node.
23642364+*/
23652365+CF_EXPORT
23662366+const ODAttributeType kODAttributeTypeSearchPolicy;
23672367+23682368+/*!
23692369+ @const kODAttributeTypeAutomaticSearchPath
23702370+ @abstract Automatic search path defined by the search node.
23712371+ @discussion Automatic search path defined by the search node.
23722372+*/
23732373+CF_EXPORT
23742374+const ODAttributeType kODAttributeTypeAutomaticSearchPath;
23752375+23762376+/*!
23772377+ @const kODAttributeTypeLocalOnlySearchPath
23782378+ @abstract Local only search path defined by the search node.
23792379+ @discussion Local only search path defined by the search node.
23802380+*/
23812381+CF_EXPORT
23822382+const ODAttributeType kODAttributeTypeLocalOnlySearchPath;
23832383+23842384+/*!
23852385+ @const kODAttributeTypeCustomSearchPath
23862386+ @abstract Admin user configured custom search path defined by the search node.
23872387+ @discussion Admin user configured custom search path defined by the search node.
23882388+*/
23892389+CF_EXPORT
23902390+const ODAttributeType kODAttributeTypeCustomSearchPath;
23912391+23922392+/*!
23932393+ @const kODAttributeTypeNodeOptions
23942394+ @abstract Any extended options supported by the node during creation
23952395+ @discussion Any extended options supported by the node during creation
23962396+ */
23972397+CF_EXPORT
23982398+const ODAttributeType kODAttributeTypeNodeOptions __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA);
23992399+24002400+/*!
24012401+ @const kODAttributeTypeNodeSASLRealm
24022402+ @abstract Contains the SASL realm associated with this node (if any)
24032403+ @discussion Contains the SASL realm associated with this node (if any)
24042404+ */
24052405+CF_EXPORT
24062406+const ODAttributeType kODAttributeTypeNodeSASLRealm __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
24072407+24082408+/*!
24092409+ @const kODAttributeTypeAdvertisedServices
24102410+*/
24112411+CF_EXPORT
24122412+const ODAttributeType kODAttributeTypeAdvertisedServices __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA);
24132413+24142414+/*!
24152415+ @const kODAttributeTypeLocaleRelay
24162416+*/
24172417+CF_EXPORT
24182418+const ODAttributeType kODAttributeTypeLocaleRelay __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA);
24192419+24202420+/*!
24212421+ @const kODAttributeTypeLocaleSubnets
24222422+*/
24232423+CF_EXPORT
24242424+const ODAttributeType kODAttributeTypeLocaleSubnets __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA);
24252425+24262426+/*!
24272427+ @const kODAttributeTypeNetworkInterfaces
24282428+*/
24292429+CF_EXPORT
24302430+const ODAttributeType kODAttributeTypeNetworkInterfaces __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA);
24312431+24322432+/*!
24332433+ @const kODAttributeTypeParentLocales
24342434+*/
24352435+CF_EXPORT
24362436+const ODAttributeType kODAttributeTypeParentLocales __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA);
24372437+24382438+/*!
24392439+ @const kODAttributeTypePrimaryLocale
24402440+*/
24412441+CF_EXPORT
24422442+const ODAttributeType kODAttributeTypePrimaryLocale __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA);
24432443+24442444+#pragma mark Attribute Types (Configure Node)
24452445+24462446+/*!
24472447+ @const kODAttributeTypeBuildVersion
24482448+ @abstract Build version for reference.
24492449+ @discussion Build version for reference.
24502450+*/
24512451+CF_EXPORT
24522452+const ODAttributeType kODAttributeTypeBuildVersion;
24532453+24542454+/*!
24552455+ @const kODAttributeTypeConfigAvail
24562456+ @abstract Config avail tag.
24572457+ @discussion Config avail tag.
24582458+*/
24592459+CF_EXPORT
24602460+const ODAttributeType kODAttributeTypeConfigAvailable;
24612461+24622462+/*!
24632463+ @const kODAttributeTypeConfigFile
24642464+ @abstract Config file name.
24652465+ @discussion Config file name.
24662466+*/
24672467+CF_EXPORT
24682468+const ODAttributeType kODAttributeTypeConfigFile;
24692469+24702470+/*!
24712471+ @const kODAttributeTypeCoreFWVersion
24722472+ @abstract Core FW version for reference.
24732473+ @discussion Core FW version for reference.
24742474+*/
24752475+CF_EXPORT
24762476+const ODAttributeType kODAttributeTypeCoreFWVersion;
24772477+24782478+/*!
24792479+ @const kODAttributeTypeFunctionalState
24802480+ @abstract Functional state of plugin for example.
24812481+ @discussion Functional state of plugin for example.
24822482+*/
24832483+CF_EXPORT
24842484+const ODAttributeType kODAttributeTypeFunctionalState;
24852485+24862486+/*!
24872487+ @const kODAttributeTypeFWVersion
24882488+ @abstract Framework version for reference.
24892489+ @discussion Framework version for reference.
24902490+*/
24912491+CF_EXPORT
24922492+const ODAttributeType kODAttributeTypeFWVersion;
24932493+24942494+/*!
24952495+ @const kODAttributeTypePluginIndex
24962496+ @abstract Plugin index for reference.
24972497+ @discussion Plugin index for reference.
24982498+*/
24992499+CF_EXPORT
25002500+const ODAttributeType kODAttributeTypePluginIndex;
25012501+25022502+/*!
25032503+ @const kODAttributeTypeNumTableList
25042504+ @abstract Summary of the reference table entries presented as attribute values
25052505+ from the Configure node.
25062506+ @discussion Summary of the reference table entries presented as attribute values
25072507+ from the Configure node.
25082508+*/
25092509+CF_EXPORT
25102510+const ODAttributeType kODAttributeTypeNumTableList;
25112511+25122512+/*!
25132513+ @const kODAttributeTypeVersion
25142514+ @abstract Version label.
25152515+ @discussion Version label.
25162516+*/
25172517+CF_EXPORT
25182518+const ODAttributeType kODAttributeTypeVersion;
25192519+25202520+/*!
25212521+ @const kODAttributeTypePIDValue
25222522+ @abstract PID value.
25232523+ @discussion PID value.
25242524+*/
25252525+CF_EXPORT
25262526+const ODAttributeType kODAttributeTypePIDValue;
25272527+25282528+/*!
25292529+ @const kODAttributeTypeProcessName
25302530+ @abstract Process Name.
25312531+ @discussion Process Name.
25322532+*/
25332533+CF_EXPORT
25342534+const ODAttributeType kODAttributeTypeProcessName;
25352535+25362536+/*!
25372537+ @const kODAttributeTypeTotalRefCount
25382538+ @abstract Total count of references for a process.
25392539+ @discussion Total count of references for a process.
25402540+*/
25412541+CF_EXPORT
25422542+const ODAttributeType kODAttributeTypeTotalRefCount;
25432543+25442544+/*!
25452545+ @const kODAttributeTypeDirRefCount
25462546+ @abstract Directory reference count for a process.
25472547+ @discussion Directory reference count for a process.
25482548+*/
25492549+CF_EXPORT
25502550+const ODAttributeType kODAttributeTypeDirRefCount;
25512551+25522552+/*!
25532553+ @const kODAttributeTypeNodeRefCount
25542554+ @abstract Node reference count for a process.
25552555+ @discussion Node reference count for a process.
25562556+*/
25572557+CF_EXPORT
25582558+const ODAttributeType kODAttributeTypeNodeRefCount;
25592559+25602560+/*!
25612561+ @const kODAttributeTypeRecRefCount
25622562+ @abstract Record reference count for a process.
25632563+ @discussion Record reference count for a process.
25642564+*/
25652565+CF_EXPORT
25662566+const ODAttributeType kODAttributeTypeRecRefCount;
25672567+25682568+/*!
25692569+ @const kODAttributeTypeAttrListRefCount
25702570+ @abstract Attribute List reference count for a process.
25712571+ @discussion Attribute List reference count for a process.
25722572+*/
25732573+CF_EXPORT
25742574+const ODAttributeType kODAttributeTypeAttrListRefCount;
25752575+25762576+/*!
25772577+ @const kODAttributeTypeAttrListValueRefCount
25782578+ @abstract Attr List Value reference count for a process.
25792579+ @discussion Attr List Value reference count for a process.
25802580+*/
25812581+CF_EXPORT
25822582+const ODAttributeType kODAttributeTypeAttrListValueRefCount;
25832583+25842584+/*!
25852585+ @const kODAttributeTypeDirRefs
25862586+ @abstract All the directory references for a process.
25872587+ @discussion All the directory references for a process.
25882588+*/
25892589+CF_EXPORT
25902590+const ODAttributeType kODAttributeTypeDirRefs;
25912591+25922592+/*!
25932593+ @const kODAttributeTypeNodeRefs
25942594+ @abstract All the node references for a process.
25952595+ @discussion All the node references for a process.
25962596+*/
25972597+CF_EXPORT
25982598+const ODAttributeType kODAttributeTypeNodeRefs;
25992599+26002600+/*!
26012601+ @const kODAttributeTypeRecRefs
26022602+ @abstract All the record references for a process.
26032603+ @discussion All the record references for a process.
26042604+*/
26052605+CF_EXPORT
26062606+const ODAttributeType kODAttributeTypeRecRefs;
26072607+26082608+/*!
26092609+ @const kODAttributeTypeAttrListRefs
26102610+ @abstract All the attribute list references for a process.
26112611+ @discussion All the attribute list references for a process.
26122612+*/
26132613+CF_EXPORT
26142614+const ODAttributeType kODAttributeTypeAttrListRefs;
26152615+26162616+/*!
26172617+ @const kODAttributeTypeAttrListValueRefs
26182618+ @abstract All the attribute list value references for a process.
26192619+ @discussion All the attribute list value references for a process.
26202620+*/
26212621+CF_EXPORT
26222622+const ODAttributeType kODAttributeTypeAttrListValueRefs;
26232623+26242624+#pragma mark Authentication Types
26252625+26262626+/*!
26272627+ @const kODAuthenticationType2WayRandom
26282628+ @abstract Two way random authentication method.
26292629+ @discussion Two way random authentication method. This method uses two passes to
26302630+ complete the authentication.
26312631+26322632+ First pass authentication array has items:
26332633+ user name in UTF8 encoding
26342634+26352635+ Second pass authentication array has items:
26362636+ 8 byte DES digest,
26372637+ 8 bytes of random
26382638+*/
26392639+CF_EXPORT
26402640+const ODAuthenticationType kODAuthenticationType2WayRandom;
26412641+26422642+/*!
26432643+ @const kODAuthenticationType2WayRandomChangePasswd
26442644+ @abstract Change the password for a user using the two-way random method.
26452645+ @discussion Change the password for a user using the two-way random method.
26462646+ Does not require prior authentication.
26472647+26482648+ Authentication array has following items in order:
26492649+ user name in UTF8 encoding,
26502650+ old password encrypted with new (should be 8 chars),
26512651+ new password encrypted with old (should be 8 chars)
26522652+*/
26532653+CF_EXPORT
26542654+const ODAuthenticationType kODAuthenticationType2WayRandomChangePasswd;
26552655+26562656+/*!
26572657+ @const kODAuthenticationTypeAPOP
26582658+ @abstract APOP authentication method.
26592659+ @discussion APOP authentication method.
26602660+26612661+ Authentication array has following items in order:
26622662+ user name in UTF8 encoding,
26632663+ server challenge in UTF8 encoding,
26642664+ client response in UTF8 encoding
26652665+*/
26662666+CF_EXPORT
26672667+const ODAuthenticationType kODAuthenticationTypeAPOP;
26682668+26692669+/*!
26702670+ @const kODAuthenticationTypeCRAM_MD5
26712671+ @abstract CRAM MD5 authentication method.
26722672+ @discussion CRAM MD5 authentication method.
26732673+26742674+ Authentication array has following items in order:
26752675+ user name in UTF8 encoding,
26762676+ server challenge in UTF8 encoding,
26772677+ client response data
26782678+*/
26792679+CF_EXPORT
26802680+const ODAuthenticationType kODAuthenticationTypeCRAM_MD5;
26812681+26822682+/*!
26832683+ @const kODAuthenticationTypeChangePasswd
26842684+ @abstract Change the password for a user.
26852685+ @discussion Change the password for a user. Does not require prior authentication.
26862686+26872687+ Authentication array has following items in order:
26882688+ user name in UTF8 encoding,
26892689+ old password in UTF8 encoding,
26902690+ new password in UTF8 encoding
26912691+*/
26922692+CF_EXPORT
26932693+const ODAuthenticationType kODAuthenticationTypeChangePasswd;
26942694+26952695+/*!
26962696+ @const kODAuthenticationTypeClearText
26972697+ @abstract Clear text authentication method.
26982698+ @discussion Clear text authentication method.
26992699+27002700+ Authentication array has following items in order:
27012701+ user name in UTF8 encoding,
27022702+ password in UTF8 encoding
27032703+*/
27042704+CF_EXPORT
27052705+const ODAuthenticationType kODAuthenticationTypeClearText;
27062706+27072707+/*!
27082708+ @const kODAuthenticationTypeCrypt
27092709+ @abstract Use a crypt password stored in the user record if available to
27102710+ do the authentication.
27112711+ @discussion Use a crypt password stored in the user record if available to
27122712+ do the authentication.
27132713+27142714+ Authentication array has following items in order:
27152715+ user name in UTF8 encoding,
27162716+ password in UTF8 encoding
27172717+27182718+ This method may not be supported by all plug-ins or for all users.
27192719+*/
27202720+CF_EXPORT
27212721+const ODAuthenticationType kODAuthenticationTypeCrypt;
27222722+27232723+/*!
27242724+ @const kODAuthenticationTypeDIGEST_MD5
27252725+ @abstract Digest MD5 authentication method.
27262726+ @discussion Digest MD5 authentication method.
27272727+27282728+ Authentication array has following items in order:
27292729+ user name in UTF8 encoding,
27302730+ server challenge in UTF8 encoding,
27312731+ client response data,
27322732+ HTTP method in UTF8 encoding
27332733+*/
27342734+CF_EXPORT
27352735+const ODAuthenticationType kODAuthenticationTypeDIGEST_MD5;
27362736+27372737+/*!
27382738+ @const kODAuthenticationTypeDeleteUser
27392739+ @abstract Used for Apple password server user deletion.
27402740+ @discussion Used for Apple password server user deletion.
27412741+ This authentication method is only implemented by the PasswordServer node.
27422742+27432743+ Authentication array has following items in order:
27442744+ Password Server ID in UTF8 encoding,
27452745+ authenticator password in UTF8 encoding,
27462746+ user's Password Server ID in UTF8 encoding
27472747+*/
27482748+CF_EXPORT
27492749+const ODAuthenticationType kODAuthenticationTypeDeleteUser;
27502750+27512751+/*!
27522752+ @const kODAuthenticationTypeGetEffectivePolicy
27532753+ @abstract Used to extract, from a password server, the actual policies that will be applied
27542754+ to a user; a combination of global and user policies.
27552755+ @discussion Used to extract, from a password server, the actual policies that will be applied
27562756+ to a user; a combination of global and user policies.
27572757+27582758+ Authentication array has following items in order:
27592759+ user name or Password Server ID in UTF8 encoding
27602760+*/
27612761+CF_EXPORT
27622762+const ODAuthenticationType kODAuthenticationTypeGetEffectivePolicy;
27632763+27642764+/*!
27652765+ @const kODAuthenticationTypeGetGlobalPolicy
27662766+ @abstract Used for extraction of global authentication policy.
27672767+ @discussion Used for extraction of global authentication policy. Authentication
27682768+ is not required to get policies. The authenticator name and password
27692769+ fields are optional.
27702770+27712771+ Authentication array has following items in order:
27722772+ user name in UTF8 encoding
27732773+ password in UTF8 encoding
27742774+*/
27752775+CF_EXPORT
27762776+const ODAuthenticationType kODAuthenticationTypeGetGlobalPolicy;
27772777+27782778+/*!
27792779+ @const kODAuthenticationTypeGetKerberosPrincipal
27802780+ @abstract Retrieves Kerberos Principal name.
27812781+ @discussion Retrieves Kerberos Principal name.
27822782+27832783+ Authentication array has following items in order:
27842784+ user name in UTF8 encoding
27852785+*/
27862786+CF_EXPORT
27872787+const ODAuthenticationType kODAuthenticationTypeGetKerberosPrincipal;
27882788+27892789+/*!
27902790+ @const kODAuthenticationTypeGetPolicy
27912791+ @abstract The plug-in should determine which specific authentication method to use.
27922792+ @discussion The plug-in should determine which specific authentication method to use.
27932793+ Authentication is not required to get policies. The authenticator name and password
27942794+ fields may be left blank by using a length of 1 and a zero-byte for the data.
27952795+27962796+ Authentication array has following items in order:
27972797+ authenticator's name or Password Server ID in UTF8 encoding,
27982798+ authenticator's password in UTF8 encoding
27992799+ account's name or Password Server ID
28002800+28012801+ The Password Server does not require authentication for this authentication method.
28022802+ The first two fields are to cover us for future policy changes and to keep the buffer
28032803+ format as standardized as possible.
28042804+*/
28052805+CF_EXPORT
28062806+const ODAuthenticationType kODAuthenticationTypeGetPolicy;
28072807+28082808+/*!
28092809+ @const kODAuthenticationTypeGetUserData
28102810+ @abstract Used with Apple password server.
28112811+ @discussion Used with Apple password server. The password server maintains a space
28122812+ for a small amount of miscellaneous data.
28132813+ This authentication method is only implemented by the PasswordServer node.
28142814+28152815+ Authentication array has following items in order:
28162816+ authenticator's Password Server ID in UTF8 encoding,
28172817+ authenticator's password in UTF8 encoding
28182818+ Password Server ID in UTF8 encoding
28192819+*/
28202820+CF_EXPORT
28212821+const ODAuthenticationType kODAuthenticationTypeGetUserData;
28222822+28232823+/*!
28242824+ @const kODAuthenticationTypeGetUserName
28252825+ @abstract Used with Apple password server.
28262826+ @discussion Used with Apple password server. This name is the same as the primary
28272827+ short name for the user.
28282828+ This authentication method is only implemented by the PasswordServer node.
28292829+28302830+ Authentication array has following items in order:
28312831+ authenticator's Password Server ID in UTF8 encoding,
28322832+ authenticator's password in UTF8 encoding,
28332833+ user's Password Server ID in UTF8 encoding
28342834+*/
28352835+CF_EXPORT
28362836+const ODAuthenticationType kODAuthenticationTypeGetUserName;
28372837+28382838+/*!
28392839+ @const kODAuthenticationTypeKerberosTickets
28402840+ @abstract Provides write-access to LDAP with an existing Kerberos ticket.
28412841+ @discussion Provides write-access to LDAP with an existing Kerberos ticket
28422842+28432843+ Authentication array has following items in order:
28442844+ user name in UTF8 encoding,
28452845+ krb5_data containing a service ticket
28462846+*/
28472847+CF_EXPORT
28482848+const ODAuthenticationType kODAuthenticationTypeKerberosTickets;
28492849+28502850+/*!
28512851+ @const kODAuthenticationTypeMPPEMasterKeys
28522852+ @abstract Generated 40-bit or 128-bit master keys from MS-CHAPv2 credentials (RFC 3079).
28532853+ @discussion Generated 40-bit or 128-bit master keys from MS-CHAPv2 credentials (RFC 3079).
28542854+28552855+ Authentication array has following items in order:
28562856+ user name in UTF8 encoding,
28572857+ MS-CHAPv2 digest (P24),
28582858+ key size, 8 or 16 (packed as a byte, not a string)
28592859+*/
28602860+CF_EXPORT
28612861+const ODAuthenticationType kODAuthenticationTypeMPPEMasterKeys;
28622862+28632863+/*!
28642864+ @const kODAuthenticationTypeMSCHAP2
28652865+ @abstract MS-CHAP2 is a mutual authentication method.
28662866+ @discussion MS-CHAP2 is a mutual authentication method. The plug-in will generate the data to
28672867+ send back to the client and put it in the continue items array.
28682868+28692869+ Authentication array has following items in order:
28702870+ user name in UTF8 encoding,
28712871+ server challenge,
28722872+ peer challenge,
28732873+ client's digest,
28742874+ client's user name (the name used for MS-CHAPv2, usually the first short name)
28752875+28762876+ Continue items array contains:
28772877+ digest for the client's challenge
28782878+*/
28792879+CF_EXPORT
28802880+const ODAuthenticationType kODAuthenticationTypeMSCHAP2;
28812881+28822882+/*!
28832883+ @const kODAuthenticationTypeNTLMv2
28842884+ @abstract Verifies an NTLMv2 challenge and response.
28852885+ @discussion Verifies an NTLMv2 challenge and response. The session keys
28862886+ (if any) must be retrieved separately with a trusted authentication.
28872887+28882888+ Authentication array has following items in order:
28892889+ user name in UTF8 encoding,
28902890+ SMB server challenge,
28912891+ the client "blob" which includes 16 bytes of client digest prefixed
28922892+ to the the blob data,
28932893+ the user name used to calculate the digest in UTF8 encoding,
28942894+ the SMB domain in UTF8 encoding
28952895+*/
28962896+CF_EXPORT
28972897+const ODAuthenticationType kODAuthenticationTypeNTLMv2;
28982898+28992899+/*!
29002900+ @const kODAuthenticationTypeNTLMv2WithSessionKey
29012901+ @abstract An optimized method that checks the user's challenge and response
29022902+ and retrieves session keys in a single call.
29032903+ @discussion An optimized method that checks the user's challenge and response
29042904+ and retrieves session keys in a single call. If the NTLMv2 session key is
29052905+ supported, it is returned in the step buffer.
29062906+29072907+ Authentication array has following items in order:
29082908+ user name in UTF8 encoding,
29092909+ SMB server challenge,
29102910+ the client "blob" which includes 16 bytes of client digest prefixed
29112911+ to the the blob data,
29122912+ the user name used to calculate the digest in UTF8 encoding,
29132913+ the SMB domain in UTF8 encoding,
29142914+ user name in UTF8 encoding,
29152915+ authenticator password in UTF8 encoding
29162916+*/
29172917+CF_EXPORT
29182918+const ODAuthenticationType kODAuthenticationTypeNTLMv2WithSessionKey;
29192919+29202920+/*!
29212921+ @const kODAuthenticationTypeNewUser
29222922+ @abstract Create a new user record with the authentication authority.
29232923+ @discussion Create a new user record with the authentication authority
29242924+ This authentication method is only implemented by the PasswordServer node.
29252925+29262926+ Authentication array has following items in order:
29272927+ authenticator's Password Server ID in UTF8 encoding,
29282928+ authenticator's password in UTF8 encoding,
29292929+ user's short-name,
29302930+ user's password
29312931+*/
29322932+CF_EXPORT
29332933+const ODAuthenticationType kODAuthenticationTypeNewUser;
29342934+29352935+/*!
29362936+ @const kODAuthenticationTypeNewUserWithPolicy
29372937+ @abstract Create a new user record with the authentication authority and initial policy settings.
29382938+ @discussion Create a new user record with the authentication authority and initial policy settings
29392939+ This authentication method is only implemented by the PasswordServer node.
29402940+29412941+ Authentication array has following items in order:
29422942+ authenticator's Password Server ID in UTF8 encoding,
29432943+ authenticator's password in UTF8 encoding,
29442944+ user's short-name,
29452945+ user's password,
29462946+ policy string in UTF8 encoding
29472947+*/
29482948+CF_EXPORT
29492949+const ODAuthenticationType kODAuthenticationTypeNewUserWithPolicy;
29502950+29512951+/*!
29522952+ @const kODAuthenticationTypeNodeNativeClearTextOK
29532953+ @abstract The plug-in should determine which specific authentication method to use.
29542954+ @discussion The plug-in should determine which specific authentication method to use.
29552955+29562956+ Authentication array has following items in order:
29572957+ user name in UTF8 encoding,
29582958+ password in UTF8 encoding
29592959+29602960+ The plug-in may choose to use a cleartext authentication method if necessary.
29612961+*/
29622962+CF_EXPORT
29632963+const ODAuthenticationType kODAuthenticationTypeNodeNativeClearTextOK;
29642964+29652965+/*!
29662966+ @const kODAuthenticationTypeNodeNativeNoClearText
29672967+ @abstract The plug-in should determine which specific authentication method to use.
29682968+ @discussion The plug-in should determine which specific authentication method to use.
29692969+29702970+ Authentication array has following items in order:
29712971+ user name in UTF8 encoding,
29722972+ password in UTF8 encoding
29732973+29742974+ The plug-in must not use an authentication method that sends the password in cleartext.
29752975+*/
29762976+CF_EXPORT
29772977+const ODAuthenticationType kODAuthenticationTypeNodeNativeNoClearText;
29782978+29792979+/*!
29802980+ @const kODAuthenticationTypeReadSecureHash
29812981+ @abstract Returns the SHA1 or Seeded SHA1 hash for a local user.
29822982+ @discussion Returns the SHA1 or Seeded SHA1 hash for a local user
29832983+ Only accessible by root processes. Only implemented by the local node.
29842984+29852985+ Authentication array has following items in order:
29862986+ user's name in UTF8 encoding
29872987+29882988+ Continue items array contains:
29892989+ value, either the old 20-byte SHA1 or the new seeded 24-byte SHA1.
29902990+*/
29912991+CF_EXPORT
29922992+const ODAuthenticationType kODAuthenticationTypeReadSecureHash;
29932993+29942994+/*!
29952995+ @const kODAuthenticationTypeSMBNTv2UserSessionKey
29962996+ @abstract Generate the ntlm-v2 user session key.
29972997+ @discussion Generate the ntlm-v2 user session key. Requires prior authentication with a trusted
29982998+ authentication method.
29992999+30003000+ Authentication array has following items in order:
30013001+ user name in UTF8 encoding,
30023002+ 8 byte server challenge
30033003+ client response buffer
30043004+*/
30053005+CF_EXPORT
30063006+const ODAuthenticationType kODAuthenticationTypeSMBNTv2UserSessionKey;
30073007+30083008+/*!
30093009+ @const kODAuthenticationTypeSMBWorkstationCredentialSessionKey
30103010+ @abstract Generates an SMB workstation credential session key.
30113011+ @discussion Generates an SMB workstation credential session key.
30123012+30133013+ Authentication array has following items in order:
30143014+ user name in UTF8 encoding,
30153015+ 8 byte server challenge + 8 byte client challenge
30163016+*/
30173017+CF_EXPORT
30183018+const ODAuthenticationType kODAuthenticationTypeSMBWorkstationCredentialSessionKey;
30193019+30203020+/*!
30213021+ @const kODAuthenticationTypeSMB_LM_Key
30223022+ @abstract SMB Lan Manager authentication method.
30233023+ @discussion SMB Lan Manager authentication method.
30243024+30253025+ Authentication array has following items in order:
30263026+ user name in UTF8 encoding,
30273027+ 8 byte server challenge,
30283028+ 24 byte client response
30293029+*/
30303030+CF_EXPORT
30313031+const ODAuthenticationType kODAuthenticationTypeSMB_LM_Key;
30323032+30333033+/*!
30343034+ @const kODAuthenticationTypeSMB_NT_Key
30353035+ @abstract SMB NT authentication method.
30363036+ @discussion SMB NT authentication method.
30373037+30383038+ Authentication array has following items in order:
30393039+ user name in UTF8 encoding,
30403040+ 8 byte server challenge,
30413041+ 24 byte client response
30423042+*/
30433043+CF_EXPORT
30443044+const ODAuthenticationType kODAuthenticationTypeSMB_NT_Key;
30453045+30463046+/*!
30473047+ @const kODAuthenticationTypeSMB_NT_UserSessionKey
30483048+ @abstract Used by SMB to get session keys.
30493049+ @discussion Used by SMB to get session keys
30503050+ This authentication method is only implemented by the PasswordServer node.
30513051+30523052+ Authentication array has following items in order:
30533053+ Password Server ID in UTF8 encoding
30543054+30553055+ Continue items array contains:
30563056+ MD4( ntHash )
30573057+*/
30583058+CF_EXPORT
30593059+const ODAuthenticationType kODAuthenticationTypeSMB_NT_UserSessionKey;
30603060+30613061+/*!
30623062+ @const kODAuthenticationTypeSMB_NT_WithUserSessionKey
30633063+ @abstract Used by SMB to authenticate and get session keys.
30643064+ @discussion Used by SMB to authenticate and get session keys
30653065+30663066+ Authentication array has following items in order:
30673067+ user name in UTF8 encoding,
30683068+ 8 byte server challenge,
30693069+ 24 byte client response,
30703070+ authenticator name in UTF8 encoding,
30713071+ authenticator password in UTF8 encoding
30723072+30733073+ Continue items array contains:
30743074+ MD4( ntHash )
30753075+*/
30763076+CF_EXPORT
30773077+const ODAuthenticationType kODAuthenticationTypeSMB_NT_WithUserSessionKey;
30783078+30793079+/*!
30803080+ @const kODAuthenticationTypeSecureHash
30813081+ @abstract Authentication specifically using the secure hash.
30823082+ @discussion Authentication specifically using the secure hash.
30833083+30843084+ Authentication array has following items in order:
30853085+ user name in UTF8 encoding,
30863086+ salted SHA1 hash
30873087+*/
30883088+CF_EXPORT
30893089+const ODAuthenticationType kODAuthenticationTypeSecureHash __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_7, __IPHONE_NA, __IPHONE_NA);
30903090+30913091+/*!
30923092+ @const kODAuthenticationTypeSetCertificateHashAsCurrent
30933093+ @abstract Set certificate using the authenticated user's credentials.
30943094+ @discussion Set certificate using the authenticated user's credentials.
30953095+30963096+ Authentication array has the following items in order:
30973097+ user name in UTF8 encoding
30983098+ hashed certificate data (40 hex characters)
30993099+*/
31003100+CF_EXPORT
31013101+const ODAuthenticationType kODAuthenticationTypeSetCertificateHashAsCurrent __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA);
31023102+31033103+/*!
31043104+ @const kODAuthenticationTypeSetGlobalPolicy
31053105+ @abstract Used to set the global policy.
31063106+ @discussion Used to set the global policy.
31073107+31083108+ Authentication array has following items in order:
31093109+ user name or Password Server ID in UTF8 encoding,
31103110+ password in UTF8 encoding,
31113111+ policy string in UTF8 encoding
31123112+*/
31133113+CF_EXPORT
31143114+const ODAuthenticationType kODAuthenticationTypeSetGlobalPolicy;
31153115+31163116+/*!
31173117+ @const kODAuthenticationTypeSetLMHash
31183118+ @abstract Set the LAN Manager hash for an account.
31193119+ @discussion Set the LAN Manager hash for an account. This method requires prior authentication.
31203120+ Setting the LM hash for an account instead of the plain text password can cause the Windows
31213121+ password to get out-of-sync with the password for other services. Therefore, this
31223122+ authentication method should only be used when there is no other choice.
31233123+31243124+ Authentication array has following items in order:
31253125+ user name in UTF8 encoding,
31263126+ LAN Manager hash buffer
31273127+*/
31283128+CF_EXPORT
31293129+const ODAuthenticationType kODAuthenticationTypeSetLMHash;
31303130+31313131+/*!
31323132+ @const kODAuthenticationTypeSetNTHash
31333133+ @abstract Set the NT hash for a user.
31343134+ @discussion Set the NT hash for a user. This method requires prior authentication.
31353135+ Setting the NT hash for an account instead of the plain text password can cause the Windows
31363136+ password to get out-of-sync with the password for other services. Therefore, this
31373137+ authentication method should only be used when there is no other choice.
31383138+31393139+ Authentication array has following items in order:
31403140+ user name in UTF8 encoding,
31413141+ NT hash buffer
31423142+*/
31433143+CF_EXPORT
31443144+const ODAuthenticationType kODAuthenticationTypeSetNTHash;
31453145+31463146+/*!
31473147+ @const kODAuthenticationTypeSetPassword
31483148+ @abstract Set password method.
31493149+ @discussion Set password method.
31503150+31513151+ Authentication array has following items in order:
31523152+ user name in UTF8 encoding,
31533153+ new password in UTF8 encoding,
31543154+ authenticator's name in UTF8 encoding,
31553155+ authenticator's password in UTF8 encoding
31563156+*/
31573157+CF_EXPORT
31583158+const ODAuthenticationType kODAuthenticationTypeSetPassword;
31593159+31603160+/*!
31613161+ @const kODAuthenticationTypeSetPasswordAsCurrent
31623162+ @abstract Set password using the current credentials.
31633163+ @discussion Set password using the current credentials.
31643164+31653165+ Authentication array has following items in order:
31663166+ user name in UTF8 encoding,
31673167+ new password in UTF8 encoding
31683168+*/
31693169+CF_EXPORT
31703170+const ODAuthenticationType kODAuthenticationTypeSetPasswordAsCurrent;
31713171+31723172+/*!
31733173+ @const kODAuthenticationTypeSetPolicy
31743174+ @abstract The plug-in should determine which specific authentication method to use.
31753175+ @discussion The plug-in should determine which specific authentication method to use.
31763176+31773177+ Authentication array has following items in order:
31783178+ authenticator's name or Password Server ID in UTF8 encoding,
31793179+ authenticator's password in UTF8 encoding,
31803180+ name or Password Server ID of the target account in UTF8 encoding,
31813181+ policy data
31823182+*/
31833183+CF_EXPORT
31843184+const ODAuthenticationType kODAuthenticationTypeSetPolicy;
31853185+31863186+/*!
31873187+ @const kODAuthenticationTypeSetPolicyAsCurrent
31883188+ @abstract A set policy for the password server.
31893189+ @discussion A set policy for the password server.
31903190+31913191+ Authentication array has following items in order:
31923192+ user name or Password Server ID of the target account in UTF8 encoding,
31933193+ policy data
31943194+*/
31953195+CF_EXPORT
31963196+const ODAuthenticationType kODAuthenticationTypeSetPolicyAsCurrent;
31973197+31983198+/*!
31993199+ @const kODAuthenticationTypeSetUserData
32003200+ @abstract Used for Apple password server.
32013201+ @discussion Used for Apple password server.
32023202+ This authentication method is only implemented by the PasswordServer node.
32033203+32043204+ Authentication array has following items in order:
32053205+ authenticator's Password Server ID in UTF8 encoding,
32063206+ authenticator's password in UTF8 encoding,
32073207+ Password Server ID in UTF8 encoding,
32083208+ user data
32093209+*/
32103210+CF_EXPORT
32113211+const ODAuthenticationType kODAuthenticationTypeSetUserData;
32123212+32133213+/*!
32143214+ @const kODAuthenticationTypeSetUserName
32153215+ @abstract Used for Apple password server.
32163216+ @discussion Used for Apple password server.
32173217+ This authentication method is only implemented by the PasswordServer node.
32183218+32193219+ Authentication array has following items in order:
32203220+ authenticator's Password Server ID in UTF8 encoding,
32213221+ authenticator's password in UTF8 encoding,
32223222+ Password Server ID in UTF8 encoding,
32233223+ user's short name in UTF8 encoding
32243224+*/
32253225+CF_EXPORT
32263226+const ODAuthenticationType kODAuthenticationTypeSetUserName;
32273227+32283228+/*!
32293229+ @const kODAuthenticationTypeSetWorkstationPassword
32303230+ @abstract Supports PDC SMB interaction with DS.
32313231+ @discussion Supports PDC SMB interaction with DS.
32323232+32333233+ Authentication array has following items in order:
32343234+ workstation's Password Server ID in UTF8 encoding,
32353235+ NT hash
32363236+*/
32373237+CF_EXPORT
32383238+const ODAuthenticationType kODAuthenticationTypeSetWorkstationPassword;
32393239+32403240+/*!
32413241+ @const kODAuthenticationTypeWithAuthorizationRef
32423242+ @abstract Allows access to local directories as root with a valid AuthorizationRef.
32433243+ @discussion Allows access to local directories as root with a valid AuthorizationRef.
32443244+32453245+ Authentication array has following items in order:
32463246+ externalized AuthorizationRef
32473247+*/
32483248+CF_EXPORT
32493249+const ODAuthenticationType kODAuthenticationTypeWithAuthorizationRef;
32503250+32513251+/*!
32523252+ @const kODAuthenticationTypeWriteSecureHash
32533253+ @abstract Supports ONLY a root process to be able to directly write the secure hash of a user record.
32543254+ @discussion Supports ONLY a root process to be able to directly write the secure hash of a user record.
32553255+32563256+ Authentication array has following items in order:
32573257+ user name in UTF8 encoding,
32583258+ salted SHA1 hash
32593259+*/
32603260+CF_EXPORT
32613261+const ODAuthenticationType kODAuthenticationTypeWriteSecureHash;
32623262+32633263+#pragma mark Policy Types
32643264+32653265+/*!
32663266+ @const kODPolicyTypePasswordCannotBeAccountName
32673267+ @abstract Boolean signifying the password must not contain the name of the account.
32683268+ @discussion Boolean signifying the password must not contain the name of the account.
32693269+*/
32703270+CF_EXPORT
32713271+const ODPolicyType kODPolicyTypePasswordCannotBeAccountName __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
32723272+32733273+/*!
32743274+ @const kODPolicyTypePasswordChangeRequired
32753275+ @abstract Boolean stating the password should be changed on next logon.
32763276+ @discussion Should be set to a CFBooleanRef/NSNumber accordingly to signify the password should be changed at next logon.
32773277+*/
32783278+CF_EXPORT
32793279+const ODPolicyType kODPolicyTypePasswordChangeRequired __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
32803280+32813281+/*!
32823282+ @const kODPolicyTypePasswordHistory
32833283+ @abstract The number of previous passwords that will be remembered.
32843284+ @discussion Should be set with a CFNumber/NSNumber accordingly with a range of 1 to 15 passwords. Remove this policy or
32853285+ set to 0 if no history is tracked.
32863286+*/
32873287+CF_EXPORT
32883288+const ODPolicyType kODPolicyTypePasswordHistory __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
32893289+32903290+/*!
32913291+ @const kODPolicyTypePasswordMinimumNumberOfCharacters
32923292+ @abstract The minimum number of characters a password must contain.
32933293+ @discussion A CFNumber/NSNumber signifying the minimum number of characters a password must contain.
32943294+ */
32953295+CF_EXPORT
32963296+const ODPolicyType kODPolicyTypePasswordMinimumNumberOfCharacters __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
32973297+32983298+/*!
32993299+ @const kODPolicyTypePasswordMaximumNumberOfCharacters
33003300+ @abstract The maximum number of characters a password can contain.
33013301+ @discussion A CFNumber/NSNumber signifying the maximum number of characters a password can contain.
33023302+*/
33033303+CF_EXPORT
33043304+const ODPolicyType kODPolicyTypePasswordMaximumNumberOfCharacters __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
33053305+33063306+/*!
33073307+ @const kODPolicyTypePasswordMaximumAgeInMinutes
33083308+ @abstract Number of minutes before password must be changed.
33093309+ @discussion The value for the policy should be a CFNumberRef/NSNumber accordingly.
33103310+*/
33113311+CF_EXPORT
33123312+const ODPolicyType kODPolicyTypePasswordMaximumAgeInMinutes __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
33133313+33143314+/*!
33153315+ @const kODPolicyTypePasswordRequiresAlpha
33163316+ @abstract Sets the number of alpha characters that must present in the password.
33173317+ @discussion A CFNumber/NSNumber signifying the number of alpha characters [A-Z][a-z] that must be present in the password.
33183318+ Note, not all modules will support this capability. If you exceed the module's capabilities, it will reset to
33193319+ the maximum supported by that module.
33203320+*/
33213321+CF_EXPORT
33223322+const ODPolicyType kODPolicyTypePasswordRequiresAlpha __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
33233323+33243324+/*!
33253325+ @const kODPolicyTypePasswordRequiresMixedCase
33263326+ @abstract Boolean signifying if password requires mixed case characters both upper and lower characters.
33273327+ @discussion Boolean signifying if password requires mixed case characters both upper and lower characters.
33283328+*/
33293329+CF_EXPORT
33303330+const ODPolicyType kODPolicyTypePasswordRequiresMixedCase __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
33313331+33323332+/*!
33333333+ @const kODPolicyTypePasswordRequiresNumeric
33343334+ @abstract Sets the number of numeric characters that must present in the password.
33353335+ @discussion A CFNumber/NSNumber signifying the number of numeric characters [0-9] that must be present in the password.
33363336+ Note, not all modules will support this capability. If you exceed the module's capabilities, it will reset to
33373337+ the maximum supported by that module.
33383338+*/
33393339+CF_EXPORT
33403340+const ODPolicyType kODPolicyTypePasswordRequiresNumeric __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
33413341+33423342+/*!
33433343+ @const kODPolicyTypePasswordRequiresSymbol
33443344+ @abstract Sets the number of symbol characters that must present in the password.
33453345+ @discussion A CFNumber/NSNumber signifying the number of symbol characters that must be present in the password.
33463346+ Note, not all modules will support this capability. If you exceed the module's capabilities, it will reset to
33473347+ the maximum supported by that module.
33483348+*/
33493349+CF_EXPORT
33503350+const ODPolicyType kODPolicyTypePasswordRequiresSymbol __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
33513351+33523352+/*!
33533353+ @const kODPolicyTypePasswordSelfModification
33543354+ @abstract Boolean stating if the account is allowed to change their own password.
33553355+ @discussion Should be set to a CFBooleanRef/NSNumber accordingly to signify the if the account holder is allowed to change
33563356+ their own password.
33573357+*/
33583358+CF_EXPORT
33593359+const ODPolicyType kODPolicyTypePasswordSelfModification __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
33603360+33613361+/*!
33623362+ @const kODPolicyTypeAccountExpiresOnDate
33633363+ @abstract Date when an account expires and becomes deactivated.
33643364+ @discussion A CFDate/NSDate signifying when an account expires will be deactivated.
33653365+*/
33663366+CF_EXPORT
33673367+const ODPolicyType kODPolicyTypeAccountExpiresOnDate __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
33683368+33693369+/*!
33703370+ @const kODPolicyTypeAccountMaximumFailedLogins
33713371+ @abstract Sets the number of maximum failed logins allowed for the account.
33723372+ @discussion A CFNumber/NSNumber signifying the number of times a bad password can be entered before the account is locked out.
33733373+*/
33743374+CF_EXPORT
33753375+const ODPolicyType kODPolicyTypeAccountMaximumFailedLogins __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
33763376+33773377+/*!
33783378+ @const kODPolicyTypeAccountMaximumMinutesUntilDisabled
33793379+ @abstract Sets the number of maximum number of minutes before this account is disabled automatically from password set.
33803380+ @discussion A CFNumber/NSNumber signifying the number of minutes before the account should be auto-disabled. Note,
33813381+ calculation of this is based on timestamp of the password, therefore also preventing the password from
33823382+ being changed is required.
33833383+ */
33843384+CF_EXPORT
33853385+const ODPolicyType kODPolicyTypeAccountMaximumMinutesUntilDisabled __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
33863386+33873387+/*!
33883388+ @const kODPolicyTypePasswordMinutesUntilFailedLoginReset
33893389+ @abstract Number of minutes before an account locked out by bad passwords is automatically re-activated.
33903390+ @discussion The value for the policy should be a CFNumberRef/NSNumber accordingly.
33913391+*/
33923392+CF_EXPORT
33933393+const ODPolicyType kODPolicyTypeAccountMinutesUntilFailedLoginReset __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
33943394+33953395+/*!
33963396+ @const kODPolicyTypeMaximumMinutesOfNonUse
33973397+ @abstract Maximum number of minutes that an account has not been used before it is deactivated.
33983398+ @discussion A CFNumber/NSNumber signifying the number of minutes before an account has not been used before it is deactivated.
33993399+*/
34003400+CF_EXPORT
34013401+const ODPolicyType kODPolicyTypeAccountMaximumMinutesOfNonUse __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA);
34023402+34033403+/*!
34043404+ @enum Expiration constants
34053405+ @abstract Special values that may be returned by ODRecordSecondsUntil*Expires().
34063406+ @constant kODExpirationTimeExpired indicates the password or authentication
34073407+ has expired.
34083408+ @constant kODExpirationTimeNeverExpires indicates the password or
34093409+ authentication will never expire.
34103410+*/
34113411+enum {
34123412+ kODExpirationTimeExpired = 0LL,
34133413+ kODExpirationTimeNeverExpires = -1LL,
34143414+};
34153415+34163416+/*!
34173417+ @typedef kODPolicyKeyType
34183418+ @abstract Type for the keys in a policy dictionary.
34193419+ @discussion Type for the keys in a policy dictionary. These are the
34203420+ expected keys in a policy. Some keys are optional. For more
34213421+ information see the the specific key. Some keys are used in
34223422+ individual policies, others in a policy set.
34233423+*/
34243424+#ifdef __OBJC__
34253425+typedef NSString *ODPolicyKeyType;
34263426+#else
34273427+typedef CFStringRef ODPolicyKeyType;
34283428+#endif
34293429+34303430+/*!
34313431+ @const kODPolicyKeyIdentifier
34323432+ @abstract Key for the policy identifier in a policy dictionary.
34333433+ @discussion Key for the policy identifier in a policy dictionary. Required
34343434+ key in a policy dictionary. The value of this key is a string
34353435+ that uniquely identifies the policy. It can be anything from a
34363436+ GUID to a string that describes the policy (e.g. "max num chars").
34373437+ */
34383438+CF_EXPORT
34393439+const ODPolicyKeyType kODPolicyKeyIdentifier __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
34403440+34413441+/*!
34423442+ @const kODPolicyKeyParameters
34433443+ @abstract Key for the policy parameters, if any, in a policy dictionary.
34443444+ @discussion Key for the policy parameters, if any, in a policy dictionary.
34453445+ Optional key in a policy dictionary. The value of this key is a
34463446+ dictionary containing any parameters that are relevant to the
34473447+ policy. Parameters may be used for information purposes or to
34483448+ provide additional data to be used in the policy format string.
34493449+ */
34503450+CF_EXPORT
34513451+const ODPolicyKeyType kODPolicyKeyParameters __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
34523452+34533453+/*!
34543454+ @const kODPolicyKeyContent
34553455+ @abstract Key for the policy format string in a policy dictionary.
34563456+ @discussion Key for the policy format string in a policy dictionary.
34573457+ Required key in a policy dictionary. The value of this key is a
34583458+ string containing the policy itself, from which a predicate will
34593459+ be created. The predicate will be applied during policy
34603460+ evaluation.
34613461+ */
34623462+CF_EXPORT
34633463+const ODPolicyKeyType kODPolicyKeyContent __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
34643464+34653465+34663466+/*!
34673467+ @typedef ODPolicyCategoryType
34683468+ @abstract Type for the policy categories.
34693469+ @discussion Type for the policy categories. Policy categories are also keys
34703470+ in a policy set dictionary, where the value of each category is
34713471+ an array of policy dictionaries.
34723472+*/
34733473+#ifdef __OBJC__
34743474+typedef NSString *ODPolicyCategoryType;
34753475+#else
34763476+typedef CFStringRef ODPolicyCategoryType;
34773477+#endif
34783478+34793479+/*!
34803480+ @const kODPolicyCategoryAuthentication
34813481+ @abstract Category for policies controlling when authentications are allowed.
34823482+ @discussion Category for policies controlling when authentications are allowed.
34833483+ Policies in this category are evaluated when determining if an
34843484+ authentication should be allowed or when authentications will
34853485+ expire. This constant is also used as a key in a policy set
34863486+ dictionary with a value containing an array of policy
34873487+ dictionaries.
34883488+ */
34893489+CF_EXPORT
34903490+ODPolicyCategoryType kODPolicyCategoryAuthentication __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
34913491+34923492+/*!
34933493+ @const kODPolicyCategoryPasswordContent
34943494+ @abstract Category for policies controlling content of passwords.
34953495+ @discussion Category for policies controlling content of passwords.
34963496+ Policies in this category are evaluated when determining if a
34973497+ password contains the required content, which is typically done
34983498+ during password changes. This constant is also used as a key in
34993499+ a policy set dictionary with a value containing an array of
35003500+ policy dictionaries.
35013501+ */
35023502+CF_EXPORT
35033503+ODPolicyCategoryType kODPolicyCategoryPasswordContent __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
35043504+35053505+/*!
35063506+ @const kODPolicyCategoryPasswordChange
35073507+ @abstract Category for policies controlling when password require changing.
35083508+ @discussion Category for policies controlling when password require changing.
35093509+ */
35103510+CF_EXPORT
35113511+ODPolicyCategoryType kODPolicyCategoryPasswordChange __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
35123512+35133513+35143514+/*!
35153515+ @typedef kODPolicyAttributeType
35163516+ @abstract Type for attributes that may be used in policies.
35173517+ @discussion Type for attributes that may be used in policies. Policies in
35183518+ this category will be evaluated when determining if an
35193519+ authentication should be allowed or when determine when a
35203520+ password will expire. This constant is also used as a key in a
35213521+ policy set dictionary with a value containing an array of policy
35223522+ dictionaries.
35233523+*/
35243524+#ifdef __OBJC__
35253525+typedef NSString *ODPolicyAttributeType;
35263526+#else
35273527+typedef CFStringRef ODPolicyAttributeType;
35283528+#endif
35293529+35303530+/*!
35313531+ @const kODPolicyAttributeRecordName
35323532+ @abstract Policy attribute for the record name.
35333533+ @discussion Policy attribute for the record name. May be used in policies
35343534+ to compare against other record attributes. For example, this
35353535+ Password Content policy string prevents the password from being
35363536+ the same as the record name:
35373537+ [NSString stringWithFormat:@"%@ != %@", kODPolicyAttributeRecordName, kODPolicyAttributePassword];
35383538+ */
35393539+CF_EXPORT
35403540+ODPolicyAttributeType kODPolicyAttributeRecordName __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
35413541+35423542+/*!
35433543+ @const kODPolicyAttributeRecordType
35443544+ @abstract Policy attribute for the record type.
35453545+ @discussion Policy attribute for the record type. Could be used in policies
35463546+ to tailor behavior for a particular record type. For example,
35473547+ this Password Content policy string would require computer
35483548+ passwords to be a minimum of 24 characters long:
35493549+ [NSString stringWithFormat:@"%@ == %@ and %@ matches '.{24,}+'",
35503550+ kODPolicyAttributeRecordType, kODRecordTypeComputer,
35513551+ kODPolicyAttributePassword];
35523552+ */
35533553+CF_EXPORT
35543554+ODPolicyAttributeType kODPolicyAttributeRecordType __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
35553555+35563556+35573557+/*!
35583558+ @const kODPolicyAttributePassword
35593559+ @abstract Policy attribute for the password.
35603560+ @discussion Policy attribute for the password in plain text. May be used in
35613561+ policies to compare against other attributes or for evaluation
35623562+ against regular expressions. Primarily useful in the Password
35633563+ Content policies. For example, this policy string checks
35643564+ whether the password length is at least 8 characters:
35653565+ [NSString stringWithFormat:@"%@ matches '.{8,}+'", kODPolicyAttributePassword];
35663566+*/
35673567+CF_EXPORT
35683568+ODPolicyAttributeType kODPolicyAttributePassword __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
35693569+35703570+/*!
35713571+ @const kODPolicyAttributePasswordHashes
35723572+ @abstract Policy attribute for the password hashes
35733573+ @discussion Policy attribute for the password hashes. The value should be a
35743574+ CFArray containing one or more CFData values representing a
35753575+ password hash.
35763576+35773577+ Used in Password Content policy strings to compare the new
35783578+ password against the password history, for example:
35793579+ [NSString stringWithFormat:@"none %@ in %@", kODPolicyAttributePasswordHashes, kODPolicyAttributePasswordHistory];
35803580+*/
35813581+CF_EXPORT
35823582+ODPolicyAttributeType kODPolicyAttributePasswordHashes __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
35833583+35843584+/*!
35853585+ @const kODPolicyAttributePasswordHistory
35863586+ @abstract Policy attribute for the list of previous password hashes
35873587+ @discussion Policy attribute for the list of previous password hashes. The
35883588+ value of this attribute is a CFArray containing one or more
35893589+ CFData elements representing a hash of a previous password.
35903590+ Hash types may be mixed.
35913591+35923592+ Used in Password Content policy strings to compare the new
35933593+ password against the password history, for example:
35943594+ [NSString stringWithFormat:@"none %@ in %@", kODPolicyAttributePasswordHashes, kODPolicyAttributePasswordHistory];
35953595+*/
35963596+CF_EXPORT
35973597+ODPolicyAttributeType kODPolicyAttributePasswordHistory __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
35983598+35993599+/*!
36003600+ @const kODPolicyAttributePasswordHistoryDepth
36013601+ @abstract Policy attribute for the number of previous hashed passwords to keep.
36023602+ @discussion Policy attribute for the number of previous hashed passwords to
36033603+ keep. Should used as a key in the policy parameter dictionary,
36043604+ with a CFNumber value, specifying the number of password to keep.
36053605+ Should not be used in a policy string.
36063606+*/
36073607+CF_EXPORT
36083608+ODPolicyAttributeType kODPolicyAttributePasswordHistoryDepth __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
36093609+36103610+/*!
36113611+ @const kODPolicyAttributeCurrentDate
36123612+ @abstract Policy attribute for the current date and time as a CFDate.
36133613+ @discussion Policy attribute for the current date and time as a CFDate used
36143614+ in policy strings to compare the current date against another
36153615+ date. The following policy string would allow authentications
36163616+ until the expiration date:
36173617+ [NSString stringWithFormat:@"%@ < %@", kODPolicyAttributeCurrentDate, kODPolicyAttributeExpiresOnDate];
36183618+36193619+ Do not use kODPolicyAttributeCurrentDate in policies where date
36203620+ arithmetic is needed; for those policies use
36213621+ kODPolicyAttributeCurrentTime instead.
36223622+*/
36233623+CF_EXPORT
36243624+ODPolicyAttributeType kODPolicyAttributeCurrentDate __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
36253625+36263626+/*!
36273627+ @const kODPolicyAttributeCurrentTime
36283628+ @abstract Policy attribute for the current date and time in seconds.
36293629+ @discussion Policy attribute for the current date and time in seconds since
36303630+ the Unix epoch. Used in policy strings to compare the
36313631+ current time against other times. Suitable for use in policies
36323632+ where "date arithmetic" is needed (i.e. adding/subtracting
36333633+ values to/from the current time or another time in seconds).
36343634+ Ensure all times and date arithmetic in the policy are specified
36353635+ in seconds.
36363636+36373637+ Note that kODPolicyAttributeExpiresEveryNDays needs to be
36383638+ converted to seconds to match the units of the other times. The
36393639+ special keyword DAYS_TO_SECONDS can be used to accomplish this.
36403640+36413641+ In the policy below, password changes are required every 90 days
36423642+ (kODPolicyAttributeExpiresEveryNDays = 90).
36433643+36443644+ [NSString stringWithFormat:@"%@ < %@ + (%@ * DAYS_TO_SECONDS)",
36453645+ kODPolicyAttributeCurrentTime,
36463646+ kODPolicyAttributeLastPasswordChangeTime,
36473647+ kODPolicyAttributeExpiresEveryNDays];
36483648+*/
36493649+CF_EXPORT
36503650+ODPolicyAttributeType kODPolicyAttributeCurrentTime __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
36513651+36523652+/*!
36533653+ @const kODPolicyAttributeCurrentTimeOfDay
36543654+ @abstract Policy attribute for the current time of day as a CFNumber.
36553655+ @discussion Policy attribute for the current time of day as a CFNumber, in
36563656+ 24 hour time, i.e. the range is 0000 through 2359. Does not
36573657+ contain any date information.
36583658+36593659+ This attribute is used in policies to compare the current time
36603660+ of day against another time of day. For example, to allow
36613661+ authentications between the hours of 8:00 AM and 5:00 PM, the
36623662+ policy string would be (kODPolicyAttributeEnableAtTimeOfDay is
36633663+ set to 0800 and kODPolicyAttributeExpiresAtTimeOfDay is 1700):
36643664+ [NSString stringWithFormat:@"%@ > %@ and %@ < %@",
36653665+ kODPolicyAttributeCurrentTimeOfDay,
36663666+ kODPolicyAttributeEnableAtTimeOfDay,
36673667+ kODPolicyAttributeCurrentTimeOfDay,
36683668+ kODPolicyAttributeExpiresAtTimeOfDay];
36693669+*/
36703670+CF_EXPORT
36713671+ODPolicyAttributeType kODPolicyAttributeCurrentTimeOfDay __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
36723672+36733673+/*!
36743674+ @const kODPolicyAttributeCurrentDayOfWeek
36753675+ @abstract Policy attribute for the current day of the week, as a CFNumber.
36763676+ @discussion Policy attribute for the current day of the week, as a CFNumber.
36773677+ Specified in units appropriate for the local calendar. The
36783678+ range is 1 through 7, with 1 representing the first day of the
36793679+ week in the local calendar, and 7 representing the last day of
36803680+ the week.
36813681+36823682+ This attribute is used in policies to compare the current day of
36833683+ the week against another day of the week. For example, to
36843684+ enable authentications on Monday through Friday, the policy
36853685+ would be (kODPolicyAttributeEnableOnDayOfWeek is set to the
36863686+ number for Monday and kODPolicyAttributeExpiresOnDayOfWeek is
36873687+ set to the number for Friday):
36883688+ [NSString stringWithFormat:@"%@ > %@ and %@ < %@",
36893689+ kODPolicyAttributeCurrentDayOfWeek,
36903690+ kODPolicyAttributeEnableOnDayOfWeek,
36913691+ kODPolicyAttributeCurrentDayOfWeek,
36923692+ kODPolicyAttributeExpiresOnDayOfWeek];
36933693+*/
36943694+CF_EXPORT
36953695+ODPolicyAttributeType kODPolicyAttributeCurrentDayOfWeek __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
36963696+36973697+/*!
36983698+ @const kODPolicyAttributeFailedAuthentications
36993699+ @abstract Policy attribute for the number of failed authentications.
37003700+ @discussion Policy attribute for the number of failed authentications for
37013701+ the record. Used in policies to compare against the maximum
37023702+ failed authentications. The following policy would deny further
37033703+ authentications after 3 failed attempts (assumes
37043704+ kODPolicyAttributeMaximumFailedAuthentications is 3):
37053705+ [NSString stringWithFormat:@"%@ < %@",
37063706+ kODPolicyAttributeFailedAuthentications,
37073707+ kODPolicyAttributeMaximumFailedAuthentications];
37083708+*/
37093709+CF_EXPORT
37103710+ODPolicyAttributeType kODPolicyAttributeFailedAuthentications __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
37113711+37123712+/*!
37133713+ @const kODPolicyAttributeMaximumFailedAuthentications
37143714+ @abstract Policy attribute for the maximum failed authentication attempts.
37153715+ @discussion Policy attribute for the maximum failed authentication attempts.
37163716+ Used as a key in policy parameter dictionary to specify the
37173717+ maximum allowable failed authentication attempts with a CFNumber
37183718+ value. Also used in the policy string to compare against the
37193719+ number of failed authentication attempts. This policy would
37203720+ disallow authentications after 3 failed attempts:
37213721+ @{ kODPolicyKeyIdentifier : @"maximum failed authentications",
37223722+ kODPolicyKeyParameters : @{ kODPolicyAttributeMaximumFailedAuthentications : @3 },
37233723+ kODPolicyKeyContent : [NSString stringWithFormat:@"%@ < %@",
37243724+ kODPolicyAttributeFailedAuthentications,
37253725+ kODPolicyAttributeMaximumFailedAuthentications] };
37263726+*/
37273727+CF_EXPORT
37283728+ODPolicyAttributeType kODPolicyAttributeMaximumFailedAuthentications __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
37293729+37303730+/*!
37313731+ @const kODPolicyAttributeLastFailedAuthenticationTime
37323732+ @abstract Policy attribute for the time of the last failed auth attempt.
37333733+ @discussion Policy attribute for the time of the last failed auth attempt.
37343734+ CFNumber with a value representing the the number of seconds
37353735+ since the Unix epoch. Used in policies to compare against other
37363736+ times. As an example, this policy string would prevent another
37373737+ authentication within 10 seconds of a failed authentication:
37383738+ [NSString stringWithFormat:@"%@ > %@ + 10",
37393739+ kODPolicyAttributeCurrentTime,
37403740+ kODPolicyAttributeLastFailedAuthenticationTime];
37413741+*/
37423742+CF_EXPORT
37433743+ODPolicyAttributeType kODPolicyAttributeLastFailedAuthenticationTime __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
37443744+37453745+/*!
37463746+ @const kODPolicyAttributeLastAuthenticationTime
37473747+ @abstract Policy attribute for the time of the last successful auth attempt.
37483748+ @discussion Policy attribute for the time of the last successful auth attempt.
37493749+ CFNumber with a value representing the number of seconds since
37503750+ the Unix epoch. Used in policies to compare against another
37513751+ time.
37523752+37533753+ The sample policy string below would deny authentications if
37543754+ there have been no authentications in the last 90 days.
37553755+37563756+ Note that the number of days needs to be converted to seconds to
37573757+ match the units of kODPolicyAttributeCurrentTime. The special
37583758+ keyword DAYS_TO_SECONDS can be used for the conversion.
37593759+37603760+ [NSString stringWithFormat:@"%@ < %@ + 90 * DAYS_TO_SECONDS",
37613761+ kODPolicyAttributeCurrentTime,
37623762+ kODPolicyAttributeLastAuthenticationTime];
37633763+*/
37643764+CF_EXPORT
37653765+ODPolicyAttributeType kODPolicyAttributeLastAuthenticationTime __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
37663766+37673767+/*!
37683768+ @const kODPolicyAttributeLastPasswordChangeTime
37693769+ @abstract Policy attribute for time of the last password change.
37703770+ @discussion Policy attribute for time of the last password change. The time
37713771+ is specified as the number of seconds since the Unix epoch.
37723772+ Used in policies to compare against other times. Typically
37733773+ would be used in Password Change policies to expire a password
37743774+ at a certain time or interval.
37753775+37763776+ The policy string below requires a password change every 90 days
37773777+ (kODPolicyAttributeExpiresEveryNDays is set to 90).
37783778+37793779+ Note that kODPolicyAttributeExpiresEveryNDays needs to be
37803780+ converted to seconds to match the units of the other times. The
37813781+ special keyword DAYS_TO_SECONDS can be used for the conversion.
37823782+37833783+ [NSString stringWithFormat:@"%@ < %@ + %@ * DAYS_TO_SECONDS",
37843784+ kODPolicyAttributeCurrentTime,
37853785+ kODPolicyAttributeLastPasswordChangeTime,
37863786+ kODPolicyAttributeExpiresEveryNDays];
37873787+*/
37883788+CF_EXPORT
37893789+ODPolicyAttributeType kODPolicyAttributeLastPasswordChangeTime __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
37903790+37913791+/*!
37923792+ @const kODPolicyAttributeNewPasswordRequiredTime
37933793+ @abstract Policy attribute for the time when "new password required" was set.
37943794+ @discussion Policy attribute for the time when "new password required" was set.
37953795+ The time is specified as the number of seconds since the
37963796+ Unix epoch.
37973797+37983798+ This attribute may be used in the policy string. Whenever it's
37993799+ used in the policy string, it must also be specified in the
38003800+ policy's parameter dictionary.
38013801+38023802+ This attribute is used to capture the time when the system
38033803+ administrator wants to force all users to change their
38043804+ passwords. This would be a "one-time" change, i.e. once the
38053805+ user changed the password, the policy would apply. The policy
38063806+ would have to be updated with a new time for
38073807+ kODPolicyAttributeNewPasswordRequiredTime in order to force a
38083808+ new round of password changes.
38093809+38103810+ For example:
38113811+ @{ kODPolicyKeyIdentifier : @"change on next auth",
38123812+ kODPolicyKeyParameters : @{ kODPolicyAttributeNewPasswordRequiredTime : @(<time>) },
38133813+ kODPolicyKeyContent : [NSString stringWithFormat:@"%@ < %@",
38143814+ kODPolicyAttributeLastPasswordChangeTime,
38153815+ kODPolicyAttributeNewPasswordRequiredTime]};
38163816+*/
38173817+CF_EXPORT
38183818+ODPolicyAttributeType kODPolicyAttributeNewPasswordRequiredTime __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
38193819+38203820+/*!
38213821+ @const kODPolicyAttributeCreationTime
38223822+ @abstract Policy attribute for the record creation time.
38233823+ @discussion Policy attribute for the record creation time. The time is
38243824+ specified as the number of seconds since the "reference date".
38253825+ Could be used to disable "temporary" accounts after a specific
38263826+ period of time.
38273827+38283828+ The example below disables authentications after 10
38293829+ days after the account was created.
38303830+38313831+ Note that kODPolicyAttributeDaysUntilExpiration must be
38323832+ converted to seconds to match the units of the other times. The
38333833+ special keyword DAYS_TO_SECONDS can be used for the conversion.
38343834+38353835+ @{ kODPolicyKeyIdentifier : @"expires after 10 days",
38363836+ kODPolicyKeyParameters : @{kODPolicyAttributeDaysUntilExpiration : @10 },
38373837+ kODPolicyKeyContent : [NSString stringWithFormat:@"%@ < %@ + (%@ * DAYS_TO_SECONDS)",
38383838+ kODPolicyAttributeCurrentTime,
38393839+ kODPolicyAttributeCreationTime,
38403840+ kODPolicyAttributeDaysUntilExpiration]};
38413841+*/
38423842+CF_EXPORT
38433843+ODPolicyAttributeType kODPolicyAttributeCreationTime __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
38443844+38453845+/*!
38463846+ @const kODPolicyAttributeExpiresEveryNDays
38473847+ @abstract Policy attribute for expires every N days.
38483848+ @discussion Policy attribute for expires every N days. This attribute is
38493849+ used as a key in the policy parameter dictionary, with CFNumber
38503850+ value. Also used in the policy strings. Typically would be used
38513851+ in Password Change policies to expire a password at a certain
38523852+ time or interval.
38533853+38543854+ The example policy below would require a password change every
38553855+ 90 days.
38563856+38573857+ Note that kODPolicyAttributeExpiresEveryNDays needs to be
38583858+ converted to seconds to match the units of the other times used
38593859+ in the policy. The special keyword DAYS_TO_SECONDS can be used
38603860+ for the conversion.
38613861+38623862+ @{ kODPolicyKeyIdentifier : @"expires every 90 days",
38633863+ kODPolicyKeyParameters : @{ kODPolicyAttributeExpiresEveryNDays : @90 },
38643864+ kODPolicyKeyContent : [NSString stringWithFormat:@"%@ < %@ + %@ * DAYS_TO_SECONDS",
38653865+ kODPolicyAttributeCurrentTime,
38663866+ kODPolicyAttributeLastPasswordChangeTime,
38673867+ kODPolicyAttributeExpiresEveryNDays]};
38683868+*/
38693869+CF_EXPORT
38703870+ODPolicyAttributeType kODPolicyAttributeExpiresEveryNDays __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
38713871+38723872+/*!
38733873+ @const kODPolicyAttributeEnableOnDate
38743874+ @abstract Policy attribute for the "enable on" date.
38753875+ @discussion Policy attribute for the "enable on" date. Used as a key in the
38763876+ policy parameter dictionary, with a CFDate value. Also used in
38773877+ policy strings. The date is specified as a CFDate representing a
38783878+ fixed date, appropriate for the locale. Use in policies when
38793879+ comparing other date-based attributes.
38803880+38813881+ This attribute is typically used Authentication policies to
38823882+ control when authentications are allowed. This policy would
38833883+ enable authentications on Jan 1, 2014 (assumes the date
38843884+ formatter is properly configured for the locale):
38853885+ @{ kODPolicyKeyIdentifier : @"enable on Jan 1",
38863886+ kODPolicyKeyParameters : @{ kODPolicyAttributeEnableOnDate : [localFormatter dateWithString:@"01/01/2014"] },
38873887+ kODPolicyKeyContent : [NSString stringWithFormat:@"%@ >= %@",
38883888+ kODPolicyAttributeCurrentDate,
38893889+ kODPolicyAttributeEnableOnDate]};
38903890+*/
38913891+CF_EXPORT
38923892+ODPolicyAttributeType kODPolicyAttributeEnableOnDate __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
38933893+38943894+/*!
38953895+ @const kODPolicyAttributeExpiresOnDate
38963896+ @abstract Policy attribute for the "expires on" date.
38973897+ @discussion Policy attribute for the "expires on" date. Used as a key in the
38983898+ policy parameter dictionary, with a CFDate value. Also used in
38993899+ policy strings. The date is specified as a CFDate representing a
39003900+ fixed date, appropriate for the locale. Use in policies when
39013901+ comparing other date-based attributes.
39023902+39033903+ This attribute is typically used in Authentication policies to
39043904+ control when authentications are allowed. This policy would
39053905+ disallow authentications on Jan 1, 2014 (assumes the date
39063906+ formatter is properly configured for the locale):
39073907+ @{ kODPolicyKeyIdentifier : @"expires on Jan 1",
39083908+ kODPolicyKeyParameters : @{ kODPolicyAttributeExpiresOnDate : [localFormatter dateWithString:@"01/01/2014"] },
39093909+ kODPolicyKeyContent : [NSString stringWithFormat:@"%@ < %@",
39103910+ kODPolicyAttributeCurrentDate,
39113911+ kODPolicyAttributeExpiresOnDate]};
39123912+*/
39133913+CF_EXPORT
39143914+ODPolicyAttributeType kODPolicyAttributeExpiresOnDate __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
39153915+39163916+/*!
39173917+ @const kODPolicyAttributeEnableOnDayOfWeek
39183918+ @abstract Policy attribute for enable on a day of the week.
39193919+ @discussion Policy attribute for enable on a day of the week. Specified as a
39203920+ in units appropriate for the local calendar. The range is 1
39213921+ through 7, with 1 representing the first day of the week in the
39223922+ local calendar, and 7 representing the last day of the week.
39233923+39243924+ This attribute is used as a key in the policy parameter
39253925+ dictionary, with a CFNumber value, and in policy strings.
39263926+ Typically used i policy strings to compare against the another
39273927+ day of the week. For example, to allow authentications only on
39283928+ Monday through Friday, the policy would be (assumes Monday = 2
39293929+ and Friday = 6 in the local calendar):
39303930+ @{ kODPolicyKeyIdentifier : @"mon-fri only",
39313931+ kODPolicyKeyParameters : @{ kODPolicyAttributeEnableOnDayOfWeek : @2,
39323932+ kODPolicyAttributeExpiresOnDayOfWeek : @6 },
39333933+ kOPolicyKeyPolicy : [NSString stringWithFormat:@"%@ > %@ and %@ < %@",
39343934+ kODPolicyAttributeCurrentDayOfWeek,
39353935+ kODPolicyAttributeEnableOnDayOfWeek,
39363936+ kODPolicyAttributeCurrentDayOfWeek,
39373937+ kODPolicyAttributeExpiresOnDayOfWeek]};
39383938+*/
39393939+CF_EXPORT
39403940+ODPolicyAttributeType kODPolicyAttributeEnableOnDayOfWeek __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
39413941+39423942+/*!
39433943+ @const kODPolicyAttributeExpiresOnDayOfWeek
39443944+ @abstract Policy attribute for expires on a day of the week.
39453945+ @discussion Policy attribute for expires on a day of the week. Specified as a
39463946+ in units appropriate for the local calendar. The range is 1
39473947+ through 7, with 1 representing the first day of the week in the
39483948+ local calendar, and 7 representing the last day of the week.
39493949+39503950+ This attribute is used as a key in the policy parameter
39513951+ dictionary, with a CFNumber value, and in policy strings.
39523952+ Typically used i policy strings to compare against the another
39533953+ day of the week. See the example above for kODPolicyAttributeEnableOnDayOfWeek.
39543954+*/
39553955+CF_EXPORT
39563956+ODPolicyAttributeType kODPolicyAttributeExpiresOnDayOfWeek __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
39573957+39583958+/*!
39593959+ @const kODPolicyAttributeEnableAtTimeOfDay
39603960+ @abstract Policy attribute for enable at a specific time of day.
39613961+ @discussion Policy attribute for enable at a specific time of day.
39623962+ The time is specified in 24-hour time, with a range of 0000
39633963+ through 2359. This attribute can be used as a key in the policy
39643964+ parameter dictionary, with a CFNumber value, and in the policy
39653965+ strings.
39663966+39673967+ Typically used in authentication policies to control specific
39683968+ times of when when authentications are allowed. For example, to
39693969+ enable authentications between the hours of 8:00 AM and 5:00 PM,
39703970+ the policy would be:
39713971+ @{ kODPolicyKeyIdentifier : @"school hours",
39723972+ kODPolicyKeyParameters : @{ kODPolicyAttributeEnableAtTimeOfDay : @800,
39733973+ kODPolicyAttributeExpiresAtTimeOfDay : @1700 },
39743974+ kODPolicyKeyContent : [NSString stringWithFormat:@"%@ > %@ and %@ < %@",
39753975+ kODPolicyAttributeCurrentTimeOfDay,
39763976+ kODPolicyAttributeEnableAtTimeOfDay,
39773977+ kODPolicyAttributeCurrentTimeOfDay,
39783978+ kODPolicyAttributeExpiresAtTimeOfDay]};
39793979+*/
39803980+CF_EXPORT
39813981+ODPolicyAttributeType kODPolicyAttributeEnableAtTimeOfDay __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
39823982+39833983+/*!
39843984+ @const kODPolicyAttributeExpiresAtTimeOfDay
39853985+ @abstract Policy attribute for expires at a specific time of day.
39863986+ @discussion Policy attribute for expires at a specific time of day.
39873987+ The time is specified in 24-hour time, with a range of 0000
39883988+ through 2359. This attribute can be used as a key in the policy
39893989+ parameter dictionary, with a CFNumber value, and in the policy
39903990+ strings.
39913991+39923992+ Typically used in authentication policies to control specific
39933993+ times of when when authentications are allowed. See the example
39943994+ above for kODPolicyAttributeEnableAtTimeOfDay.
39953995+*/
39963996+CF_EXPORT
39973997+ODPolicyAttributeType kODPolicyAttributeExpiresAtTimeOfDay __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
39983998+39993999+40004000+/*!
40014001+ @const kODPolicyAttributeDaysUntilExpiration
40024002+ @abstract Policy attribute for the number of days until expiration.
40034003+ @discussion Policy attribute for the number of days until expiration.
40044004+ This attribute can be used as a key in the policy parameter
40054005+ dictionary with a CFNumber value representing some number of
40064006+ days. It can also be used in the policy strings.
40074007+40084008+ May be used in Authentication policies to expire authentications
40094009+ after some number of days or in Password Change policies to
40104010+ expire passwords.
40114011+40124012+ The example below disables authentications after 10
40134013+ days after the account was created.
40144014+40154015+ Note that kODPolicyAttributeDaysUntilExpiration must be
40164016+ converted to seconds to match the units of the other times. The
40174017+ special keyword DAYS_TO_SECONDS can be used for the conversion.
40184018+40194019+ @{ kODPolicyKeyIdentifier : @"expires after 10 days",
40204020+ kODPolicyKeyParameters : @{kODPolicyAttributeDaysUntilExpiration : @10 },
40214021+ kODPolicyKeyContent : [NSString stringWithFormat:@"%@ < %@ + (%@ * DAYS_TO_SECONDS)",
40224022+ kODPolicyAttributeCurrentTime,
40234023+ kODPolicyAttributeCreationTime,
40244024+ kODPolicyAttributeDaysUntilExpiration]};
40254025+*/
40264026+CF_EXPORT
40274027+ODPolicyAttributeType kODPolicyAttributeDaysUntilExpiration __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
40284028+40294029+40304030+#pragma mark Errors
40314031+40324032+/*!
40334033+ @enum ODFrameworkErrors
40344034+ @abstract Errors specific to the framework and to underlying calls
40354035+ @discussion Errors specific to the framework and to underlying calls
40364036+ @constant kODErrorSuccess is when operation was successful (if appropriate)
40374037+ @constant kODErrorSessionLocalOnlyDaemonInUse is when a Local Only session was initiated and is still active
40384038+ @constant kODErrorSessionNormalDaemonInUse is when the Normal daemon is still in use but request was issued for Local only
40394039+ @constant kODErrorSessionDaemonNotRunning is when the daemon is not running
40404040+ @constant kODErrorSessionDaemonRefused is when the daemon refused the session
40414041+ @constant kODErrorSessionProxyCommunicationError is when there was a communication error with the remote daemon
40424042+ @constant kODErrorSessionProxyVersionMismatch is when versions mismatch between the remote daemon and local framework
40434043+ @constant kODErrorSessionProxyIPUnreachable is when the provided kODSessionProxyAddress did not respond
40444044+ @constant kODErrorSessionProxyUnknownHost is when the provided kODSessionProxyAddress cannot be resolved
40454045+ @constant kODErrorNodeUnknownName is when the node name provided does not exist and cannot be opened
40464046+ @constant kODErrorNodeUnknownType is when the node type provided is not a known value
40474047+ @constant kODErrorNodeConnectionFailed is when a node connection failed (commonly server closed connection, etc.)
40484048+ @constant kODErrorNodeUnknownHost is when an invalid host is provided
40494049+ @constant kODErrorQuerySynchronize is an error code that is returned when a synchronize has been initiated
40504050+ @constant kODErrorQueryInvalidMatchType is when an invalid match type is provided in a query
40514051+ @constant kODErrorQueryUnsupportedMatchType is when plugin does not support the requirested match type
40524052+ @constant kODErrorQueryTimeout is when a query timed out during request
40534053+ @constant kODErrorRecordReadOnlyNode is when a record cannot be modified
40544054+ @constant kODErrorRecordPermissionError is when the changes requested were denied due to insufficient permissions
40554055+ @constant kODErrorRecordParameterError is when an invalid parameter was provided
40564056+ @constant kODErrorRecordInvalidType is when an invalid record type was provided
40574057+ @constant kODErrorRecordAlreadyExists is when a record create failed because the record already exists
40584058+ @constant kODErrorRecordTypeDisabled is when a particular record type is disabled by policy for a plugin
40594059+ @constant kODErrorRecordAttributeUnknownType is when an unknown attribute type is provided
40604060+ @constant kODErrorRecordAttributeNotFound is when an attribute requested is not found in the record
40614061+ @constant kODErrorRecordAttributeValueSchemaError is when an attribute value does not meet schema requirements
40624062+ @constant kODErrorRecordAttributeValueNotFound is when an attribute value is not found in a record
40634063+ @constant kODErrorCredentialsInvalid is when credentials provided are invalid with the current node
40644064+ @constant kODErrorCredentialsMethodNotSupported is when a particular extended method is not supported by the node
40654065+ @constant kODErrorCredentialsNotAuthorized is when an operation such as changing a password is not authorized with current privileges
40664066+ @constant kODErrorCredentialsParameterError is when a parameter provided is invalid
40674067+ @constant kODErrorCredentialsOperationFailed is when the requested operation failed (usually due to some unrecoverable error)
40684068+ @constant kODErrorCredentialsServerUnreachable is when the authententication server is not reachabable
40694069+ @constant kODErrorCredentialsServerNotFound is when the authentication server could not be found for the operation requested
40704070+ @constant kODErrorCredentialsServerError is when the authentication server encountered an error
40714071+ @constant kODErrorCredentialsServerTimeout is when the authentication server timed out
40724072+ @constant kODErrorCredentialsContactMaster is when the authentication server is not the master and the operation requires the master
40734073+ @constant kODErrorCredentialsServerCommunicationError is when the authentication server had a communications error
40744074+ @constant kODErrorCredentialsAccountNotFound is when the authentication server could not find the account provided
40754075+ @constant kODErrorCredentialsAccountDisabled is when the account is disabled
40764076+ @constant kODErrorCredentialsAccountExpired is when the account is expired
40774077+ @constant kODErrorCredentialsAccountInactive is when the account is inactive
40784078+ @constant kODErrorCredentialsPasswordExpired is when the password has expired and must be changed
40794079+ @constant kODErrorCredentialsPasswordChangeRequired is when a password change is required
40804080+ @constant kODErrorCredentialsPasswordQualityFailed is when a password provided for change did not meet quality minimum requirements
40814081+ @constant kODErrorCredentialsPasswordTooShort is when a password provided is too short
40824082+ @constant kODErrorCredentialsPasswordTooLong is when a password provided is too long
40834083+ @constant kODErrorCredentialsPasswordNeedsLetter is when a password needs a letter
40844084+ @constant kODErrorCredentialsPasswordNeedsDigit is when a password needs a digit
40854085+ @constant kODErrorCredentialsPasswordChangeTooSoon is when a an attempt to change a password too soon before last change
40864086+ @constant kODErrorCredentialsPasswordUnrecoverable is when password was not recoverable from the authentication database
40874087+ @constant kODErrorCredentialsInvalidLogonHours is when an account attempts to login outside of set logon hours
40884088+ @constant kODErrorCredentialsInvalidComputer is when an account attempts to login to a computer they are not authorized
40894089+ @constant kODErrorPolicyUnsupported all requested policies were not supported
40904090+ @constant kODErrorPolicyOutOfRange policy value was beyond the allowed range
40914091+ @constant kODErrorPluginOperationNotSupported is when a plugin does not support the requested operation
40924092+ @constant kODErrorPluginError is when a plugin has encountered some undefined error
40934093+ @constant kODErrorDaemonError is when some error occurred inside the daemon
40944094+ @constant kODErrorPluginOperationTimeout is when an operation exceeds an imposed timeout
40954095+*/
40964096+40974097+enum ODFrameworkErrors
40984098+{
40994099+ kODErrorSuccess = 0,
41004100+41014101+ /* ODSession error codes */
41024102+ kODErrorSessionLocalOnlyDaemonInUse = 1000,
41034103+ kODErrorSessionNormalDaemonInUse = 1001,
41044104+ kODErrorSessionDaemonNotRunning = 1002,
41054105+ kODErrorSessionDaemonRefused = 1003,
41064106+41074107+ kODErrorSessionProxyCommunicationError = 1100,
41084108+ kODErrorSessionProxyVersionMismatch = 1101,
41094109+ kODErrorSessionProxyIPUnreachable = 1102,
41104110+ kODErrorSessionProxyUnknownHost = 1103,
41114111+41124112+ /* ODNode error codes */
41134113+ kODErrorNodeUnknownName = 2000,
41144114+ kODErrorNodeUnknownType = 2001,
41154115+ kODErrorNodeDisabled = 2002,
41164116+41174117+ kODErrorNodeConnectionFailed = 2100,
41184118+41194119+ /* ODNode miscellaneous error codes */
41204120+ kODErrorNodeUnknownHost = 2200,
41214121+41224122+ /* ODQuery error codes */
41234123+ kODErrorQuerySynchronize = 3000,
41244124+41254125+ kODErrorQueryInvalidMatchType = 3100,
41264126+ kODErrorQueryUnsupportedMatchType = 3101,
41274127+ kODErrorQueryTimeout = 3102,
41284128+41294129+ /* ODRecord error codes */
41304130+ kODErrorRecordReadOnlyNode = 4000,
41314131+ kODErrorRecordPermissionError = 4001,
41324132+41334133+ kODErrorRecordParameterError = 4100,
41344134+ kODErrorRecordInvalidType = 4101,
41354135+ kODErrorRecordAlreadyExists = 4102,
41364136+ kODErrorRecordTypeDisabled = 4103,
41374137+ kODErrorRecordNoLongerExists = 4104,
41384138+41394139+ kODErrorRecordAttributeUnknownType = 4200,
41404140+ kODErrorRecordAttributeNotFound = 4201,
41414141+ kODErrorRecordAttributeValueSchemaError = 4202,
41424142+ kODErrorRecordAttributeValueNotFound = 4203,
41434143+41444144+ /* Credential specific error codes */
41454145+ kODErrorCredentialsInvalid = 5000,
41464146+41474147+ kODErrorCredentialsMethodNotSupported = 5100,
41484148+ kODErrorCredentialsNotAuthorized = 5101,
41494149+ kODErrorCredentialsParameterError = 5102,
41504150+ kODErrorCredentialsOperationFailed = 5103,
41514151+41524152+ kODErrorCredentialsServerUnreachable = 5200,
41534153+ kODErrorCredentialsServerNotFound = 5201,
41544154+ kODErrorCredentialsServerError = 5202,
41554155+ kODErrorCredentialsServerTimeout = 5203,
41564156+ kODErrorCredentialsContactMaster = 5204,
41574157+ kODErrorCredentialsServerCommunicationError = 5205,
41584158+41594159+ kODErrorCredentialsAccountNotFound = 5300,
41604160+ kODErrorCredentialsAccountDisabled = 5301,
41614161+ kODErrorCredentialsAccountExpired = 5302,
41624162+ kODErrorCredentialsAccountInactive = 5303,
41634163+41644164+ kODErrorCredentialsPasswordExpired = 5400,
41654165+ kODErrorCredentialsPasswordChangeRequired = 5401,
41664166+ kODErrorCredentialsPasswordQualityFailed = 5402,
41674167+ kODErrorCredentialsPasswordTooShort = 5403,
41684168+ kODErrorCredentialsPasswordTooLong = 5404,
41694169+ kODErrorCredentialsPasswordNeedsLetter = 5405,
41704170+ kODErrorCredentialsPasswordNeedsDigit = 5406,
41714171+ kODErrorCredentialsPasswordChangeTooSoon = 5407,
41724172+ kODErrorCredentialsPasswordUnrecoverable = 5408,
41734173+41744174+ kODErrorCredentialsInvalidLogonHours = 5500,
41754175+ kODErrorCredentialsInvalidComputer = 5501,
41764176+41774177+ /* Policy errors */
41784178+ kODErrorPolicyUnsupported = 6000,
41794179+ kODErrorPolicyOutOfRange = 6001,
41804180+41814181+ /* Underlying plugin errors */
41824182+ kODErrorPluginOperationNotSupported = 10000,
41834183+ kODErrorPluginError = 10001,
41844184+ kODErrorDaemonError = 10002,
41854185+ kODErrorPluginOperationTimeout = 10003,
41864186+};
41874187+41884188+#endif
+24
src/OpenDirectory/Headers/NSOpenDirectory.h
···11+/*
22+ * Copyright (c) 2009 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#import <OpenDirectory/OpenDirectory.h>
+100
src/OpenDirectory/Headers/ODAttributeMap.h
···11+/*
22+ * Copyright (c) 2012 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#import <Foundation/Foundation.h>
2525+2626+NS_CLASS_AVAILABLE(10_9, NA)
2727+@interface ODAttributeMap : NSObject {
2828+ @protected
2929+ NSString *customQueryFunction;
3030+ NSString *customTranslationFunction;
3131+ NSArray *customAttributes;
3232+ NSString *value;
3333+}
3434+3535+/*
3636+ * Custom functions are in the format of:
3737+ * "<module>:<function>"
3838+ *
3939+ * Example: "ldap:query_attribute"
4040+ */
4141+4242+/* Custom function to be used when querying the attribute */
4343+@property(copy) NSString *customQueryFunction NS_AVAILABLE_MAC(10_9);
4444+4545+/* Custom function to be used when translating the result for the client */
4646+@property(copy) NSString *customTranslationFunction NS_AVAILABLE_MAC(10_9);
4747+4848+/* Attributes required for the custom functions */
4949+@property(copy) NSArray *customAttributes NS_AVAILABLE_MAC(10_9);
5050+5151+/* The value used for the mapping. Static, variable substitution and native are all represented */
5252+@property(copy) NSString *value NS_AVAILABLE_MAC(10_9);
5353+5454+/*!
5555+ * @method attributeMapWithValue:
5656+ *
5757+ * @abstract
5858+ * Returns an initialized and autoreleased ODAttributeMap object with the given value mapped.
5959+ *
6060+ * @discussion
6161+ * Returns an initialized and autoreleased ODAttributeMap object with the given value mapped.
6262+ */
6363++ (instancetype)attributeMapWithValue:(NSString *)value;
6464+6565+/*!
6666+ * @method attributeMapWithStaticValue:
6767+ *
6868+ * @abstract
6969+ * Returns an initialized and autoreleased ODAttributeMap object with the given static value.
7070+ *
7171+ * @discussion
7272+ * Returns an initialized and autoreleased ODAttributeMap object with the given static value.
7373+ */
7474++ (instancetype)attributeMapWithStaticValue:(NSString *)staticValue;
7575+7676+/*!
7777+ * @method setStaticValue:
7878+ *
7979+ * @abstract
8080+ * Sets a static value that will always be returned for this mapping.
8181+ *
8282+ * @discussion
8383+ * Sets a static value that will always be returned for this mapping, i.e., "20".
8484+ */
8585+- (void)setStaticValue:(NSString *)staticValue NS_AVAILABLE_MAC(10_9);
8686+8787+/*!
8888+ * @method setVariableSubstitution:
8989+ *
9090+ * @abstract
9191+ * Sets a variable substitution-based value.
9292+ *
9393+ * @discussion
9494+ * Value should be using the syntax '$native$' for all substited values. For example,
9595+ * to form a home directory using the "cn" of an LDAP record, substitution could be done
9696+ * with "/home/$cn$".
9797+ */
9898+- (void)setVariableSubstitution:(NSString *)variableSubstitution NS_AVAILABLE_MAC(10_9);
9999+100100+@end
+235
src/OpenDirectory/Headers/ODConfiguration.h
···11+/*
22+ * Copyright (c) 2009-2012 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#import <Foundation/Foundation.h>
2525+#import <OpenDirectory/OpenDirectory.h>
2626+2727+enum {
2828+ ODPacketSigningDisabled = 0,
2929+ ODPacketSigningAllow = 1,
3030+ ODPacketSigningRequired = 2,
3131+};
3232+3333+enum {
3434+ ODPacketEncryptionDisabled = 0,
3535+ ODPacketEncryptionAllow = 1,
3636+ ODPacketEncryptionRequired = 2,
3737+ ODPacketEncryptionSSL = 3,
3838+};
3939+4040+@class SFAuthorization;
4141+@class ODMappings;
4242+4343+/* Signifies that the configuration is "joined" to the directory (a.k.a., Authenticated binding) with it's own dedicated account (often a computer account) */
4444+FOUNDATION_EXPORT NSString *const ODTrustTypeJoined NS_AVAILABLE_MAC(10_9);
4545+4646+/* Signfies that some form of credentials is being used to talk to this directory node */
4747+FOUNDATION_EXPORT NSString *const ODTrustTypeUsingCredentials NS_AVAILABLE_MAC(10_9);
4848+4949+/* Signifies there is no account associated with this configuration */
5050+FOUNDATION_EXPORT NSString *const ODTrustTypeAnonymous NS_AVAILABLE_MAC(10_9);
5151+5252+NS_CLASS_AVAILABLE(10_9, NA)
5353+@interface ODConfiguration : NSObject {
5454+ @protected
5555+ ODSession *session;
5656+ NSString *nodeName;
5757+ NSString *comment;
5858+ NSArray *defaultModuleEntries;
5959+ NSArray *authenticationModuleEntries;
6060+ NSArray *discoveryModuleEntries;
6161+ NSArray *generalModuleEntries;
6262+ ODMappings *defaultMappings;
6363+ NSString *templateName;
6464+ NSArray *virtualSubnodes;
6565+ BOOL hideRegistration;
6666+ NSString *preferredDestinationHostName;
6767+ uint16_t preferredDestinationHostPort;
6868+ NSString *trustAccount;
6969+ NSString *trustType;
7070+ NSString *trustKerberosPrincipal;
7171+ NSString *trustMetaAccount;
7272+ BOOL trustUsesMutualAuthentication;
7373+ BOOL trustUsesKerberosKeytab;
7474+ BOOL trustUsesSystemKeychain;
7575+ NSInteger packetSigning;
7676+ NSInteger packetEncryption;
7777+ BOOL manInTheMiddleProtection;
7878+ NSInteger queryTimeoutInSeconds;
7979+ NSInteger connectionSetupTimeoutInSeconds;
8080+ NSInteger connectionIdleTimeoutInSeconds;
8181+}
8282+8383+/* the nodename associated with this configuration */
8484+@property(copy) NSString *nodeName NS_AVAILABLE_MAC(10_9);
8585+8686+/* comment for this configuration */
8787+@property(copy) NSString *comment NS_AVAILABLE_MAC(10_9);
8888+8989+/* default mappings for this configuration (used for all modules unless specific ones are set for the module) */
9090+@property(strong) ODMappings *defaultMappings NS_AVAILABLE_MAC(10_9);
9191+9292+/*
9393+ * Name of the template used for this configuration, specifically loaded from /System/Library/OpenDirectory/Templates or /Library/OpenDirectory/Templates. These templates
9494+ * specify the module layout, settings, etc. appropriate for that template. Any settings in this configuration will override settings from the template
9595+ */
9696+@property(copy) NSString *templateName NS_AVAILABLE_MAC(10_9);
9797+9898+/*
9999+ * A list of subnodenames to be registered on behalf of this configuration. For example, "subnode1" would register "/Nodename/subnode1" automatically so it is visible
100100+ * without loading the actual configuration/modules.
101101+ */
102102+@property(copy) NSArray *virtualSubnodes NS_AVAILABLE_MAC(10_9);
103103+104104+/* Hides the registration of this node so it is not visible to clients in the UI. */
105105+@property(assign) BOOL hideRegistration NS_AVAILABLE_MAC(10_9);
106106+107107+/* The optional hostname to be used with this configuration */
108108+@property(copy) NSString *preferredDestinationHostName NS_AVAILABLE_MAC(10_9);
109109+110110+/* An optional port to be used in conjunction with the preferred hostname for this configuration */
111111+@property(assign) uint16_t preferredDestinationHostPort NS_AVAILABLE_MAC(10_9);
112112+113113+/* The current trust account used with this configuration */
114114+@property(readonly, copy) NSString *trustAccount NS_AVAILABLE_MAC(10_9);
115115+116116+/* The current trust meta account used with this configuration */
117117+@property(readonly, copy) NSString *trustMetaAccount NS_AVAILABLE_MAC(10_9);
118118+119119+/* The current trust kerberos account used with this configuration */
120120+@property(readonly, copy) NSString *trustKerberosPrincipal NS_AVAILABLE_MAC(10_9);
121121+122122+/* Type of trust established for this configuration */
123123+@property(readonly, copy) NSString *trustType NS_AVAILABLE_MAC(10_9);
124124+125125+/* Trust uses mutual authentication for security */
126126+@property(readonly) BOOL trustUsesMutualAuthentication NS_AVAILABLE_MAC(10_9);
127127+128128+/* Trust uses keytab for password storage */
129129+@property(readonly) BOOL trustUsesKerberosKeytab NS_AVAILABLE_MAC(10_9);
130130+131131+/* Trust uses the system keychain to store password */
132132+@property(readonly) BOOL trustUsesSystemKeychain NS_AVAILABLE_MAC(10_9);
133133+134134+/* Determines if packet signing is used for this configuration, should be one of the ODPacketSigning values */
135135+@property(assign) NSInteger packetSigning NS_AVAILABLE_MAC(10_9);
136136+137137+/* Determins if packet encryption is used for this configuration, should be one of the ODPacketEncryption values */
138138+@property(assign) NSInteger packetEncryption NS_AVAILABLE_MAC(10_9);
139139+140140+/* States if some man-in-the-middle protection is required */
141141+@property(assign) BOOL manInTheMiddleProtection NS_AVAILABLE_MAC(10_9);
142142+143143+/* Timeout in seconds for all queries issued for this configuration */
144144+@property(assign) NSInteger queryTimeoutInSeconds NS_AVAILABLE_MAC(10_9);
145145+146146+/* Timeout in seconds for connection setup for this configuration */
147147+@property(assign) NSInteger connectionSetupTimeoutInSeconds NS_AVAILABLE_MAC(10_9);
148148+149149+/* Default timeout in seconds for all connections associated with this configuration */
150150+@property(assign) NSInteger connectionIdleTimeoutInSeconds NS_AVAILABLE_MAC(10_9);
151151+152152+/* A list of default ODModuleEntry objects. Default modules are used in all categories, after all "specific" modules */
153153+@property(copy) NSArray *defaultModuleEntries NS_AVAILABLE_MAC(10_9);
154154+155155+/* A list of authentication ODModuleEntry objects */
156156+@property(copy) NSArray *authenticationModuleEntries NS_AVAILABLE_MAC(10_9);
157157+158158+/* A list of discovery ODModuleEntry objects */
159159+@property(copy) NSArray *discoveryModuleEntries NS_AVAILABLE_MAC(10_9);
160160+161161+/* A list of general ODModuleEntry objects used for all other APIs (Queries, modifications, etc.) */
162162+@property(copy) NSArray *generalModuleEntries NS_AVAILABLE_MAC(10_9);
163163+164164+/*!
165165+ * @method configuration
166166+ *
167167+ * @abstract
168168+ * Returns an initialized and autoreleased ODConfiguration object.
169169+ *
170170+ * @discussion
171171+ * Returns an initialized and autoreleased ODConfiguration object.
172172+ */
173173++ (instancetype)configuration;
174174+175175+/*!
176176+ * @method suggestedTrustAccount:
177177+ *
178178+ * @abstract
179179+ * Returns a suggested name to use for the trust account.
180180+ *
181181+ * @discussion
182182+ * Returns a suggested name to use for a trust account. This name will be derived from the hostname
183183+ * (if provided), otherwise it will be derived from the local hostname removing special characters
184184+ * that may not be allowed by many systems.
185185+ */
186186++ (NSString *) suggestedTrustAccount:(NSString *)hostname NS_AVAILABLE_MAC(10_9);
187187+188188+/*!
189189+ * @method suggestedTrustPassword:
190190+ *
191191+ * @abstract
192192+ * Returns a suggested password to be used for trust account with the requested length.
193193+ *
194194+ * @discussion
195195+ * Returns a suggested password to be used for trust account with the requested length.
196196+ */
197197++ (NSString *) suggestedTrustPassword:(size_t)length NS_AVAILABLE_MAC(10_9);
198198+199199+/*!
200200+ * @method saveUsingAuthorization:error:
201201+ *
202202+ * @abstract
203203+ * Saves the configuration using the provided authorization.
204204+ *
205205+ * @discussion
206206+ * Saves the configuration using the provided authorization.
207207+ */
208208+- (BOOL) saveUsingAuthorization:(SFAuthorization *)authorization error:(NSError **)error NS_AVAILABLE_MAC(10_9);
209209+210210+/*!
211211+ * @method addTrustType:trustAccount:trustPassword:username:password:joinExisting:error:
212212+ *
213213+ * @abstract
214214+ * Adds a trust account with the provided name and password using the credentials provided by the user.
215215+ *
216216+ * @discussion
217217+ * Adds a trust account with the provided name and password using the credentials provided by the user. User can
218218+ * request that the trust be forcibly created (replacing existing trust if found in directory). A trust should be
219219+ * established only after enough configuration is available and the configuration been saved. If the trust is
220220+ * required, then the configuration can be deleted if necessary upon failure.
221221+ */
222222+- (BOOL) addTrustType:(NSString *)trustType trustAccount:(NSString *)account trustPassword:(NSString *)accountPassword username:(NSString *)username password:(NSString *)password joinExisting:(BOOL)join error:(NSError **)error NS_AVAILABLE_MAC(10_9);
223223+224224+/*!
225225+ * @method removeTrustUsingUsername:password:deleteTrustAccount:error:
226226+ *
227227+ * @abstract
228228+ * Removes trust using the provided username and password.
229229+ *
230230+ * @discussion
231231+ * Removes trust using the provided username and password. The trust account will be removed from the directory only if requested.
232232+ */
233233+- (BOOL) removeTrustUsingUsername:(NSString *)username password:(NSString *)password deleteTrustAccount:(BOOL)deleteAccount error:(NSError **)error NS_AVAILABLE_MAC(10_9);
234234+235235+@end
+93
src/OpenDirectory/Headers/ODMappings.h
···11+/*
22+ * Copyright (c) 2012 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#import <Foundation/Foundation.h>
2525+2626+@class ODRecordMap;
2727+2828+NS_CLASS_AVAILABLE(10_9, NA)
2929+@interface ODMappings : NSObject {
3030+ @protected
3131+ NSString *comment;
3232+ NSString *templateName;
3333+ NSString *identifier;
3434+ NSString *function;
3535+ NSArray *functionAttributes;
3636+ NSMutableDictionary *recordTypes;
3737+}
3838+3939+/* Short comment about the mappings */
4040+@property(copy) NSString *comment NS_AVAILABLE_MAC(10_9);
4141+4242+/*
4343+ * Name of the mappings template to be used for this configuration from /System/Library/OpenDirectory/Mappings or /Library/OpenDirectory/Mappings
4444+ * if a template is used, then no other values should be set, template is an exclusive setting
4545+ */
4646+@property(copy) NSString *templateName NS_AVAILABLE_MAC(10_9);
4747+4848+/* RFC1034 identifier for this mapping, com.company.mapping */
4949+@property(copy) NSString *identifier NS_AVAILABLE_MAC(10_9);
5050+5151+/* Returns a list of NSString values for all attributes currently configured */
5252+@property(readonly, copy) NSArray *recordTypes NS_AVAILABLE_MAC(10_9);
5353+5454+/* function to translate record types */
5555+@property(copy) NSString *function NS_AVAILABLE_MAC(10_9);
5656+5757+/* native attributes required for translation function to work */
5858+@property(copy) NSArray *functionAttributes NS_AVAILABLE_MAC(10_9);
5959+6060+/*!
6161+ * @method mappings
6262+ *
6363+ * @abstract
6464+ * Returns an initialized and autoreleased ODMappings object.
6565+ *
6666+ * @discussion
6767+ * Returns an initialized and autoreleased ODMappings object.
6868+ */
6969++ (instancetype)mappings;
7070+7171+/*!
7272+ * @method recordType:
7373+ *
7474+ * @abstract
7575+ * Returns an ODRecordMap associated with the provided recordtype.
7676+ *
7777+ * @discussion
7878+ * Returns an ODRecordMap associated with the provided recordtype.
7979+ */
8080+- (ODRecordMap *) recordMapForStandardRecordType:(NSString *)stdType NS_AVAILABLE_MAC(10_9);
8181+8282+/*!
8383+ * @method setRecordMap:forRecordType:
8484+ *
8585+ * @abstract
8686+ * Sets a particular ODRecordMap for a given standard record type.
8787+ *
8888+ * @discussion
8989+ * Sets a particular ODRecordMap for a given standard record type.
9090+ */
9191+- (void) setRecordMap:(ODRecordMap *)map forStandardRecordType:(NSString *)stdType NS_AVAILABLE_MAC(10_9);
9292+9393+@end
+87
src/OpenDirectory/Headers/ODModuleEntry.h
···11+/*
22+ * Copyright (c) 2012 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#import <Foundation/Foundation.h>
2525+2626+@class ODMappings;
2727+2828+NS_CLASS_AVAILABLE(10_9, NA)
2929+@interface ODModuleEntry : NSObject {
3030+ @protected
3131+ ODMappings *mappings;
3232+ NSArray *supportedOptions;
3333+ NSString *name;
3434+ NSString *xpcServiceName;
3535+ NSMutableDictionary *options;
3636+ NSString *uuidString;
3737+};
3838+3939+/* mappings that are specific to this module configuration */
4040+@property(strong) ODMappings *mappings NS_AVAILABLE_MAC(10_9);
4141+4242+/* A list supported options for a module. The list will contain dictionaries with keys ODModuleOptionName, ODModuleOptionType, etc. */
4343+@property(readonly, copy) NSArray *supportedOptions NS_AVAILABLE_MAC(10_9);
4444+4545+/* Name of the module, used in logging, etc. */
4646+@property(copy) NSString *name NS_AVAILABLE_MAC(10_9);
4747+4848+/* XPCService to be used for this module */
4949+@property(copy) NSString *xpcServiceName NS_AVAILABLE_MAC(10_9);
5050+5151+/* A UUID in string form that uniquely identifies this configuration, will be assigned automatically if missing */
5252+@property(copy) NSString *uuidString NS_AVAILABLE_MAC(10_9);
5353+5454+/*!
5555+ * @method moduleEntryWithName:xpcServiceName:
5656+ *
5757+ * @abstract
5858+ * Creates a new module entry with a given name and service.
5959+ *
6060+ * @discussion
6161+ * Creates a new module entry with a given name and service.
6262+ */
6363++ (instancetype)moduleEntryWithName:(NSString *)name xpcServiceName:(NSString *)xpcServiceName NS_AVAILABLE_MAC(10_9);
6464+6565+/*!
6666+ * @method setOption:value:
6767+ *
6868+ * @abstract
6969+ * Assigns a particular option for this module.
7070+ *
7171+ * @discussion
7272+ * Options are dictated by the module and can be queried via [module supportedOptions].
7373+ */
7474+- (void) setOption:(NSString *)optionName value:(id)value NS_AVAILABLE_MAC(10_9);
7575+7676+/*!
7777+ * @method option:
7878+ *
7979+ * @abstract
8080+ * Fetches the current setting for the requested option.
8181+ *
8282+ * @discussion
8383+ * Fetches the current setting for the requested option.
8484+ */
8585+- (id) option:(NSString *)optionName NS_AVAILABLE_MAC(10_9);
8686+8787+@end
+324
src/OpenDirectory/Headers/ODNode.h
···11+/*
22+ * Copyright (c) 2005-2009 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#import <OpenDirectory/OpenDirectory.h>
2525+2626+@class ODConfiguration;
2727+@class ODRecord;
2828+2929+/*!
3030+ @class ODNode
3131+ @abstract This class is used to work with OpenDirectory nodes.
3232+ @discussion OpenDirectory uses nodes to represent different sources of directory information, via the local disk, LDAP, etc.
3333+*/
3434+@interface ODNode : NSObject {
3535+ @private
3636+ void *_internal;
3737+}
3838+3939+/*!
4040+ @method nodeWithSession:type:error:
4141+ @abstract Create an autoreleased ODNode of the given type, optionally in a specific session.
4242+ @discussion Autoreleased instance of an ODNode with a provided ODSession and ODNodeType. outError is
4343+ optional parameter, nil can be passed if error details are not needed.
4444+*/
4545++ (instancetype)nodeWithSession:(ODSession *)inSession type:(ODNodeType)inType error:(NSError **)outError NS_AVAILABLE(10_6, NA);
4646+4747+/*!
4848+ @method nodeWithSession:name:error:
4949+ @abstract Create an autoreleased ODNode with the given name, optionally in a specific session.
5050+ @discussion autoreleased instance of an ODNode with a provided ODSession and node name. outError is
5151+ optional parameter, nil can be passed if error details are not needed.
5252+*/
5353++ (instancetype)nodeWithSession:(ODSession *)inSession name:(NSString *)inName error:(NSError **)outError NS_AVAILABLE(10_6, NA);
5454+5555+/*!
5656+ @method initWithSession:type:error:
5757+ @abstract Initialize an ODNode instance of the given type, optionally in a specific session.
5858+ @discussion initialize instance of an ODNode with a provided ODSession and ODNodeType. outError is
5959+ optional parameter, nil can be passed if error details are not needed.
6060+*/
6161+- (instancetype)initWithSession:(ODSession *)inSession type:(ODNodeType)inType error:(NSError **)outError NS_AVAILABLE(10_6, NA);
6262+6363+/*!
6464+ @method initWithSession:name:error:
6565+ @abstract Initialize an ODNode instance with the given name, optionally in a specific session.
6666+ @discussion initialize instance of an ODNode with a provided ODSession and node name. outError is optional
6767+ parameter, nil can be passed if error details are not needed.
6868+*/
6969+- (instancetype)initWithSession:(ODSession *)inSession name:(NSString *)inName error:(NSError **)outError NS_AVAILABLE(10_6, NA);
7070+7171+/*!
7272+ @method subnodeNamesAndReturnError:
7373+ @abstract Returns NSArray of node names for this node, which may contain sub-nodes or search policy nodes
7474+ @discussion Returns NSArray of node names for this node, which may contain sub-nodes or search policy nodes.
7575+ Commonly used with Search policy nodes. outError is optional parameter, nil can be passed if error
7676+ details are not needed.
7777+*/
7878+- (NSArray *)subnodeNamesAndReturnError:(NSError **)outError NS_AVAILABLE(10_6, NA);
7979+8080+/*!
8181+ @method unreachableSubnodeNamesAndReturnError:
8282+ @abstract Will return NSArray of names of subnodes that are not currently reachable.
8383+ @discussion Will return NSArray of names of subnodes that are not currently reachable. Commonly used with Search policy
8484+ nodes to determine if any nodes are currently unreachable, but may also return other subnodes if the
8585+ OpenDirectory plugin supports. outError is optional parameter, nil can be passed if error details are not needed.
8686+*/
8787+- (NSArray *)unreachableSubnodeNamesAndReturnError:(NSError **)outError NS_AVAILABLE(10_6, NA);
8888+8989+/*!
9090+ @property nodeName
9191+ @abstract The node name.
9292+ @discussion The node name, corresponding to its path in OpenDirectory.
9393+*/
9494+@property (nonatomic, readonly, copy) NSString *nodeName NS_AVAILABLE(10_6, NA);
9595+9696+/*!
9797+ @method nodeDetails:error:
9898+ @abstract Returns a dictionary of information about the instance of ODNode
9999+ @discussion Returns a dictionary of information about the instance of ODNode. Details such as Trust information
100100+ (kODAttributeTypeTrustInformation) or other Node details can be retrieved. outError is optional parameter,
101101+ nil can be passed if error details are not needed.
102102+103103+*/
104104+- (NSDictionary *)nodeDetailsForKeys:(NSArray *)inKeys error:(NSError **)outError NS_AVAILABLE(10_6, NA);
105105+106106+/*!
107107+ @method supportedRecordTypesAndReturnError:
108108+ @abstract Returns a NSArray of the record types supported by this node.
109109+ @discussion Returns a NSArray of the record types supported by this node. If node does not support the check
110110+ then all possible types will be returned. outError is optional parameter, nil can be passed if error details
111111+ are not needed.
112112+*/
113113+- (NSArray *)supportedRecordTypesAndReturnError:(NSError **)outError NS_AVAILABLE(10_6, NA);
114114+115115+/*!
116116+ @method supportedAttributesForRecordType:error:
117117+ @abstract Will return a list of attribute types supported for that attribute if possible
118118+ @discussion Will return a list of attribute types supported for that attribute if possible. If no specific
119119+ types are available, then all possible values will be returned instead. outError is optional parameter,
120120+ nil can be passed if error details are not needed.
121121+*/
122122+- (NSArray *)supportedAttributesForRecordType:(ODRecordType)inRecordType error:(NSError **)outError NS_AVAILABLE(10_6, NA);
123123+124124+/*!
125125+ @method setCredentialsWithRecordType:recordName:password:error:
126126+ @abstract Sets the credentials for interaction with the ODNode
127127+ @discussion Sets the credentials for interaction with the ODNode. Record references, etc. will use these credentials
128128+ to query or change data. Setting the credentials on a node referenced by other OD object types will
129129+ change the credentials for all for all references. outError is optional parameter, nil can be passed if error
130130+ details are not needed.
131131+*/
132132+- (BOOL)setCredentialsWithRecordType:(ODRecordType)inRecordType recordName:(NSString *)inRecordName password:(NSString *)inPassword
133133+ error:(NSError **)outError NS_AVAILABLE(10_6, NA);
134134+135135+/*!
136136+ @method setCredentialsWithRecordType:authType:authItems:outAuthItems:context:error:
137137+ @abstract Allows use of other OpenDirectory types of authentications to set the credentials for an ODNode
138138+ @discussion Allows the caller to use other types of authentications that are available in OpenDirectory, that may
139139+ require response-request loops, etc. Not all OD plugins will support this call, look for
140140+ kODErrorCredentialsMethodNotSupported in outError. outError is optional parameter, nil can be passed if
141141+ error details is not needed.
142142+*/
143143+- (BOOL)setCredentialsWithRecordType:(ODRecordType)inRecordType authenticationType:(ODAuthenticationType)inType
144144+ authenticationItems:(NSArray *)inItems continueItems:(NSArray **)outItems
145145+ context:(id *)outContext error:(NSError **)outError NS_AVAILABLE(10_6, NA);
146146+147147+/*!
148148+ @method setCredentialsUsingKerberosCache:error:
149149+ @abstract Unsupported method.
150150+ @discussion Unsupported method.
151151+*/
152152+- (BOOL)setCredentialsUsingKerberosCache:(NSString *)inCacheName error:(NSError **)outError NS_DEPRECATED_MAC(10_6, 10_7) NS_AVAILABLE(10_6, NA);
153153+154154+/*!
155155+ @method createRecordWithRecordType:name:attributes:error:
156156+ @abstract Creates a record in this node, using the given name and attributes.
157157+ @discussion Takes all the provided attributes and type to create an entire record. The function will assign a
158158+ UUID to the record automatically. This UUID can be overwritten by the client by passing with the
159159+ other attributes. inAttributes is optional, nil can be passed if no other attributes are to be set.
160160+*/
161161+- (ODRecord *)createRecordWithRecordType:(ODRecordType)inRecordType name:(NSString *)inRecordName
162162+ attributes:(NSDictionary *)inAttributes error:(NSError **)outError NS_AVAILABLE(10_6, NA);
163163+164164+/*!
165165+ @method recordWithRecordType:name:attributes:error:
166166+ @abstract Returns an ODRecord object that references the requested type and name
167167+ @discussion Returns an ODRecord object that references the requested type and name. The record will have cached the
168168+ attributes requested. Further attributes can be requested via ODRecord APIs. For performance it is best
169169+ to ask for as many attributes that are needed as possible up front.
170170+*/
171171+- (ODRecord *)recordWithRecordType:(ODRecordType)inRecordType name:(NSString *)inRecordName attributes:(id)inAttributes
172172+ error:(NSError **)outError NS_AVAILABLE(10_6, NA);
173173+174174+/*!
175175+ @method customCall:sendData:error:
176176+ @abstract Sends a custom code to the node; input and output data formats are specific to the call.
177177+ @discussion Sends a custom code to the node; input and output data formats are specific to the call. outError is
178178+ optional parameter, nil can be passed if error details are not needed.
179179+*/
180180+- (NSData *)customCall:(NSInteger)inCustomCode sendData:(NSData *)inSendData error:(NSError **)outError NS_AVAILABLE(10_6, NA);
181181+182182+/*!
183183+ @method customFunction:payload:error:
184184+ @abstract Sends a custom function call to the node; data is a type specific to the call.
185185+ @discussion Sends a custom function call to the node; data is a type specific to the call. 'error' is an
186186+ optional parameter therefore nil can be passed if error details are not needed. Return type is
187187+ defined by the custom function requested.
188188+*/
189189+- (id)customFunction:(NSString *)function payload:(id)payload error:(NSError **)error NS_AVAILABLE(10_9, NA);
190190+191191+/*!
192192+ * @method configuration
193193+ *
194194+ * @abstract
195195+ * Returns an ODConfiguration object for the node.
196196+ *
197197+ * @discussion
198198+ * Returns an ODConfiguration object for the node.
199199+ */
200200+@property (readonly, strong) ODConfiguration *configuration;
201201+202202+/*!
203203+ @method policiesAndReturnError:
204204+ @abstract This will copy any policies configured for the node.
205205+ @discussion This will copy any policies configured for the node.
206206+*/
207207+- (NSDictionary *)policiesAndReturnError:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use accountPoliciesAndReturnError:");
208208+209209+/*!
210210+ @function supportedPoliciesAndReturnError:
211211+ @abstract This will return a dictionary of supported policies.
212212+ @discussion This will return a dictionary of supported policies, if appropriate, the value will be the maximum value allowed
213213+ for the policy in question. For example, if password history is available, it will state how much history is
214214+ supported.
215215+*/
216216+- (NSDictionary *)supportedPoliciesAndReturnError:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA);
217217+218218+/*!
219219+ @function setPolicies:error:
220220+ @abstract This will set the policy for the node.
221221+ @discussion This will set the policy for the node. Policies are evaluated in combination with record-level policies.
222222+*/
223223+- (BOOL)setPolicies:(NSDictionary *)policies error:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use setAccountPolicies:error:");
224224+225225+/*!
226226+ @function setPolicy:value:error:
227227+ @abstract This will set a specific policy setting for the node.
228228+ @discussion This will set a specific policy setting for the node.
229229+*/
230230+- (BOOL)setPolicy:(ODPolicyType)policy value:(id)value error:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use addAccountPolicy:toCategory:error:");
231231+232232+/*!
233233+ @function removePolicy:value:error:
234234+ @abstract This will remove a specific policy setting from the node.
235235+ @discussion This will remove a specific policy setting from the node.
236236+*/
237237+- (BOOL)removePolicy:(ODPolicyType)policy error:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use removeAccountPolicy:fromCategory:error:");
238238+239239+/*!
240240+ @method addAccountPolicy:toCategory:error:
241241+ @abstract This will add an account policy to the node for the specified category.
242242+ @discussion This will add an account policy to the node for the specified category.
243243+ The specified policy will be applied to all users in the
244244+ specified node when policies are evaluated.
245245+ @param policy a dictionary containing the specific policy to be added.
246246+ The dictionary may contain the following keys:
247247+ kODPolicyKeyIdentifier a required key identifying the policy.
248248+ kODPolicyKeyParameters an optional key containing a dictionary of
249249+ parameters that can be used for informational purposes or in
250250+ the policy format string.
251251+ kODPolicyKeyContent a required key specifying the policy,
252252+ from which a predicate will be created for evaluating
253253+ the policy.
254254+ @param category a valid ODPolicyCategoryType to which the specified policy will be added.
255255+ @param error an optional NSError reference for error details.
256256+ @result a BOOL which signifies if the policy addition succeeded, otherwise error is set.
257257+*/
258258+- (BOOL)addAccountPolicy:(NSDictionary *)policy toCategory:(ODPolicyCategoryType)category error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
259259+260260+/*!
261261+ @method removeAccountPolicy:fromCategory:error:
262262+ @abstract This will remove an account policy from the node for the specified category.
263263+ @discussion This will remove an account policy from the node for the specified category.
264264+ @param policy a dictionary containing the specific policy to be
265265+ removed, with the same format as described in addAccountPolicy.
266266+ @param category a valid ODPolicyCategoryType from which the specified policy will be removed.
267267+ @param error an optional NSError reference for error details.
268268+ @result a BOOL which signifies if the policy removal succeeded, otherwise error is set.
269269+*/
270270+- (BOOL)removeAccountPolicy:(NSDictionary *)policy fromCategory:(ODPolicyCategoryType)category error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
271271+272272+/*!
273273+ @method setAccountPolicies:error:
274274+ @abstract This will set the policies for the node.
275275+ @discussion This will set the policies for the node, replacing any existing
276276+ policies. All of the policies in the set will be applied to all
277277+ users in the specified node when policies are evaluated.
278278+ @param policies a dictionary containing all of the policies to be set
279279+ for the node. The dictionary may contain the following keys:
280280+ kODPolicyCategoryAuthentication an optional key with a value
281281+ of an array of policy dictionaries that specify when
282282+ authentications should be allowed.
283283+ kODPolicyCategoryPasswordContent an optional key with a
284284+ value of an array of policy dictionaries the specify the
285285+ required content of passwords.
286286+ kODPolicyCategoryPasswordChange an optional key with a value
287287+ of an array of policy dictionaries that specify when
288288+ passwords are required to be changed.
289289+ @param error an optional NSError reference for error details.
290290+ @result a BOOL which signifies if the policy set succeeded, otherwise error is set.
291291+*/
292292+- (BOOL)setAccountPolicies:(NSDictionary *)policies error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
293293+294294+/*!
295295+ @method accountPoliciesAndReturnError:
296296+ @abstract Returns a dictionary containing any policies configured for the node.
297297+ @discussion Returns a dictionary containing any policies configured for the node.
298298+ @param error an optional NSError reference for error details.
299299+ @result an NSDictionary containing all currently set policies. The
300300+ format of the dictionary is the same as described in
301301+ setAccountPolicies.
302302+*/
303303+- (NSDictionary *)accountPoliciesAndReturnError:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
304304+305305+/*!
306306+ @method passwordContentCheck:forRecordName:error:
307307+ @abstract Validates a password against the node's password content policies.
308308+ @discussion Validates a password against the node's password content policies.
309309+ The node's password content policies will be evaluated to
310310+ determine if the password is acceptable. May be used prior to
311311+ creating the record.
312312+313313+ This check is only definitive at the time it was requested. The
314314+ policy or the environment could change before the password change
315315+ is actually requested. Errors from the password change request
316316+ should be consulted.
317317+318318+ @param password the password to be evaluated against the content policies.
319319+ @param recordName the name of the record.
320320+ @param error an optional NSError reference for error details.
321321+ @result a bool which signifies if the password passes all content policies, otherwise error is set.
322322+ */
323323+- (BOOL)passwordContentCheck:(NSString *)password forRecordName:(NSString *)recordName error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
324324+@end
+128
src/OpenDirectory/Headers/ODQuery.h
···11+/*
22+ * Copyright (c) 2009 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#import <OpenDirectory/OpenDirectory.h>
2525+2626+@class ODQuery;
2727+@class ODNode;
2828+2929+/*!
3030+ @protocol ODQueryDelegate
3131+ @abstract The delegate method for receiving query results from the NSRunLoop-based queries
3232+ @discussion The delegate method called as results are returned from an NSRunLoop-based query. These results are only partial
3333+ and delegate is called repeatedly as results are available. The incoming result must be retained or copied. The
3434+ array will be released by the NSRunLoop upon return. Incoming results do not include previous results,
3535+ only the most resent results are returned. inResults can be nil if an error occurs or the query is complete. If
3636+ inResults and inError are nil then the query has completed.
3737+*/
3838+@protocol ODQueryDelegate <NSObject>
3939+@required
4040+- (void)query:(ODQuery *)inQuery foundResults:(NSArray *)inResults error:(NSError *)inError NS_AVAILABLE(10_6, NA);
4141+@end
4242+4343+/*!
4444+ @class ODQuery
4545+ @abstract Class used for querying OpenDirectory.
4646+ @discussion OpenDirectory queries may be used to search for different types of records, e.g. users, groups.
4747+*/
4848+@interface ODQuery : NSObject <NSCopying>
4949+{
5050+ @private
5151+ void *_internal;
5252+}
5353+5454+/*!
5555+ @method queryWithNode:forRecordTypes:attribute:matchType:queryValues:returnAttributes:maximumResults:error:
5656+ @abstract Creates an autoreleased query with the node using the parameters provided
5757+ @discussion Creates an autoreleased query with the node using the supplied query parameters. Some parameters
5858+ can either be NSString or NSData or an NSArray of either NSString or NSData. Passing nil for
5959+ returnAttributes is equivalent to passing kODAttributeTypeStandardOnly. outError is optional parameter,
6060+ nil can be passed if error details are not needed.
6161+*/
6262++ (ODQuery *)queryWithNode:(ODNode *)inNode forRecordTypes:(id)inRecordTypeOrList attribute:(ODAttributeType)inAttribute
6363+ matchType:(ODMatchType)inMatchType queryValues:(id)inQueryValueOrList
6464+ returnAttributes:(id)inReturnAttributeOrList maximumResults:(NSInteger)inMaximumResults
6565+ error:(NSError **)outError NS_AVAILABLE(10_6, NA);
6666+6767+/*!
6868+ @method initWithNode:forRecordTypes:attribute:matchType:queryValues:returnAttributes:maximumResults:error:
6969+ @abstract Creates a query with the node using the parameters provided
7070+ @discussion Creates a query with the node using the supplied query parameters. Some parameters
7171+ can either be NSString or NSData or an NSArray of either NSString or NSData. Passing nil for
7272+ returnAttributes is equivalent to passing kODAttributeTypeStandardOnly. outError is optional parameter,
7373+ nil can be passed if error details are not needed.
7474+*/
7575+- (instancetype)initWithNode:(ODNode *)inNode forRecordTypes:(id)inRecordTypeOrList attribute:(ODAttributeType)inAttribute
7676+ matchType:(ODMatchType)inMatchType queryValues:(id)inQueryValueOrList
7777+ returnAttributes:(id)inReturnAttributeOrList maximumResults:(NSInteger)inMaximumResults error:(NSError **)outError NS_AVAILABLE(10_6, NA);
7878+7979+/*!
8080+ @method resultsAllowingPartial:error:
8181+ @abstract Returns results from a provided ODQuery synchronously
8282+ @discussion Returns results from a provided ODQuery synchronously. Passing NO to inAllowPartialResults
8383+ will block the call until all results are returned or an error occurs. YES can be passed at any time
8484+ even if previous calls were made with NO. outError is optional parameter, nil can be passed if error
8585+ details are not needed.
8686+*/
8787+- (NSArray *)resultsAllowingPartial:(BOOL)inAllowPartialResults error:(NSError **)outError NS_AVAILABLE(10_6, NA);
8888+8989+/*!
9090+ @property delegate
9191+ @abstract The currently set delegate
9292+ @discussion The query delegate which will receive asynchronous query results.
9393+*/
9494+@property (nonatomic, readwrite, assign) id <ODQueryDelegate> delegate NS_AVAILABLE(10_6, NA);
9595+9696+/*!
9797+ @method scheduleInRunLoop:forMode:
9898+ @abstract Adds the query object to the specified NSRunLoop to receive asynchronous results
9999+ @discussion Adds the query object to the specified NSRunLoop to receive asynchronous results. A delegate must be set
100100+ in advance otherwise results may be lost due to the lack of a receiver.
101101+*/
102102+- (void)scheduleInRunLoop:(NSRunLoop *)inRunLoop forMode:(NSString *)inMode NS_AVAILABLE(10_6, NA);
103103+104104+/*!
105105+ @method removeFromRunLoop:forMode:
106106+ @abstract Removes the query object from the specified NSRunLoop
107107+ @discussion Removes the query object from the specified NSRunLoop.
108108+*/
109109+- (void)removeFromRunLoop:(NSRunLoop *)inRunLoop forMode:(NSString *)inMode NS_AVAILABLE(10_6, NA);
110110+111111+/*!
112112+ @method synchronize
113113+ @abstract Will dispose of any results and restart the query.
114114+ @discussion Will dispose of any results and restart the query for subsequent resultsAllowingPartial: calls. If the query
115115+ is currently scheduled on a RunLoop, then the delegate will be called with inResults == nil and
116116+ [inError code] == kODErrorQuerySynchronize and [inError domain] == ODFrameworkErrorDomain, signifying that
117117+ all existing results should be thrown away in preparation for new results.
118118+*/
119119+- (void)synchronize NS_AVAILABLE(10_6, NA);
120120+121121+/*!
122122+ @property operationQueue
123123+ @abstract The NSOperationQueue on which asynchronous results are delivered to the delegate.
124124+ @discussion The NSOperationQueue on which asynchronous results are delivered to the delegate.
125125+ */
126126+@property (readwrite, retain) NSOperationQueue * operationQueue NS_AVAILABLE(10_6, NA);
127127+128128+@end
+443
src/OpenDirectory/Headers/ODRecord.h
···11+/*
22+ * Copyright (c) 2009 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#import <OpenDirectory/OpenDirectory.h>
2525+2626+/*!
2727+ @class ODRecord
2828+ @abstract This class is used to read, update and modify records within the directory
2929+ @discussion This class is used to read, update and modify records within the directory. outError is optional parameter,
3030+ nil can be passed if error details are not needed.
3131+*/
3232+@interface ODRecord : NSObject
3333+3434+/*!
3535+ @method setNodeCredentials:password:error:
3636+ @abstract Similar to calling -[ODNode setCredentials:] except credentials are only set for this particular
3737+ record's node
3838+ @discussion Sets the credentials if necessary on the ODNode referenced by this ODRecord. Very similar to
3939+ calling -[ODNode setCredentials:] except other records referencing the underlying node will not get
4040+ authenticated, therefore inadvertant changes cannot occur. If all records referencing a particular
4141+ node need to be updated, then use -[ODNode setCredentials:] on the original node instead. If the
4242+ node is already authenticated with the same name and password, it will be a NOOP call. The original
4343+ ODNode held by an ODRecord will be released when the credentials are changed for the connection
4444+ associated with the record. outError is optional parameter, nil can be passed if error details are not needed.
4545+*/
4646+- (BOOL)setNodeCredentials:(NSString *)inUsername password:(NSString *)inPassword error:(NSError **)outError NS_AVAILABLE(10_6, NA);
4747+4848+/*!
4949+ @method setNodeCredentialsWithRecordType:authenticationType:authenticationItems:continueItems:context:error:
5050+ @abstract Similar to calling -[ODNode setCredentialsWithRecordType:] except credentials are only set for this particular record's
5151+ node
5252+ @discussion Allows the caller to use other types of authentications that are available in OpenDirectory, that may
5353+ require response-request loops, etc. Not all OD plugins will support this call, look for
5454+ kODErrorCredentialsMethodNotSupported in outError. Same behavior as ODRecordSetNodeCredentials. outError
5555+ is optional parameter, nil can be passed if error details are not needed.
5656+*/
5757+- (BOOL)setNodeCredentialsWithRecordType:(ODRecordType)inRecordType authenticationType:(ODAuthenticationType)inType
5858+ authenticationItems:(NSArray *)inItems continueItems:(NSArray **)outItems
5959+ context:(id *)outContext error:(NSError **)outError NS_AVAILABLE(10_6, NA);
6060+6161+/*!
6262+ @method setNodeCredentialsUsingKerberosCache:error:
6363+ @abstract Unsupported method.
6464+ @discussion Unsupported method.
6565+*/
6666+- (BOOL)setNodeCredentialsUsingKerberosCache:(NSString *)inCacheName error:(NSError **)outError NS_DEPRECATED_MAC(10_6, 10_7);
6767+6868+/*!
6969+ @method passwordPolicyAndReturnError:
7070+ @abstract Returns a dictionary containing the password policy for the record if available.
7171+ @discussion Returns a dictionary containing the password policy for the record if available. If no policy for record
7272+ nil will be returned. outError is optional parameter, nil can be passed if error details are not needed.
7373+*/
7474+- (NSDictionary *)passwordPolicyAndReturnError:(NSError **)outError __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_6, __MAC_10_9, __IPHONE_NA, __IPHONE_NA, "use effectivePoliciesAndReturnError");
7575+7676+/*!
7777+ @method verifyPassword:error:
7878+ @abstract Verifies the password provided is valid for the record
7979+ @discussion Verifies the password provided is valid for the record. outError is optional parameter, nil can be passed if
8080+ error details are not needed.
8181+*/
8282+- (BOOL)verifyPassword:(NSString *)inPassword error:(NSError **)outError NS_AVAILABLE(10_6, NA);
8383+8484+/*!
8585+ @method verifyExtendedWithAuthenticationType:authenticationItems:continueItems:context:error:
8686+ @abstract Allows use of other OpenDirectory types of authentications
8787+ @discussion Allows the caller to use other types of authentications that are available in OpenDirectory, that may
8888+ require response-request loops, etc. A bool with the result of the operation.
8989+ If it fails, outError can be checked for more specific error. Some ODNodes may not support the call
9090+ so an error code of kODErrorCredentialsMethodNotSupported may be returned. outError is optional
9191+ parameter, nil can be passed if error details are not needed.
9292+*/
9393+- (BOOL)verifyExtendedWithAuthenticationType:(ODAuthenticationType)inType authenticationItems:(NSArray *)inItems
9494+ continueItems:(NSArray **)outItems context:(id *)outContext error:(NSError **)outError NS_AVAILABLE(10_6, NA);
9595+9696+/*!
9797+ @method changePassword:toPassword:error:
9898+ @abstract Changes the password for a record
9999+ @discussion Changes the password for a record. The oldPassword can be nil if password is being set assuming the appropriate
100100+ privileges are in place. outError is optional parameter, nil can be passed if error details are not needed.
101101+*/
102102+- (BOOL)changePassword:(NSString *)oldPassword toPassword:(NSString *)newPassword error:(NSError **)outError NS_AVAILABLE(10_6, NA);
103103+104104+/*!
105105+ @method synchronizeAndReturnError:
106106+ @abstract Synchronizes the record from the Directory in order to get current data and/or commit pending changes
107107+ @discussion Synchronizes the record from the Directory in order to get current data. Any previously fetched attributes
108108+ will be re-fetch from the Directory. This will not re-fetch the entire record, unless the entire record
109109+ has been accessed. Additionally, any changes made to the record will be committed to the directory,
110110+ if the node does not do immediate commits. outError is optional parameter, nil can be passed if error details
111111+ are not needed.
112112+*/
113113+- (BOOL)synchronizeAndReturnError:(NSError **)outError NS_AVAILABLE(10_6, NA);
114114+115115+/*!
116116+ @property recordType
117117+ @abstract Type of the record.
118118+ @discussion The record type.
119119+*/
120120+@property (nonatomic, readonly, copy) NSString *recordType NS_AVAILABLE(10_6, NA);
121121+122122+/*!
123123+ @property recordName
124124+ @abstract Name of the record.
125125+ @discussion This is the official record name.
126126+*/
127127+@property (nonatomic, readonly, copy) NSString *recordName NS_AVAILABLE(10_6, NA);
128128+129129+/*!
130130+ @method recordDetailsForAttributes:error:
131131+ @abstract Returns the attributes and values in the form of a key-value pair set.
132132+ @discussion Returns the attributes and values in the form of a key-value pair set for this record. The key is a
133133+ NSString of the attribute name (e.g., kODAttributeTypeRecordName, etc.) and the value is an NSArray
134134+ of either NSData or NSString depending on the type of data. Binary data will be returned as NSData.
135135+ If nil is passed, then all currently retrieved attributes will be returned. outError is optional parameter,
136136+ nil can be passed if error details are not needed.
137137+*/
138138+- (NSDictionary *)recordDetailsForAttributes:(NSArray *)inAttributes error:(NSError **)outError NS_AVAILABLE(10_6, NA);
139139+140140+/*!
141141+ @method valuesForAttribute:error:
142142+ @abstract Returns an NSArray of NSString or NSData values of the attribute
143143+ @discussion Returns an NSArray of NSString or NSData depending on the type of data. Binary data will be
144144+ returned as NSData. outError is optional parameter, nil can be passed if error details are not needed.
145145+*/
146146+- (NSArray *)valuesForAttribute:(ODAttributeType)inAttribute error:(NSError **)outError NS_AVAILABLE(10_6, NA);
147147+148148+/*!
149149+ @method setValue:forAttribute:error:
150150+ @abstract Will take a mixture of NSData or NSString or an NSArray of either type when setting the values of an attribute
151151+ @discussion Will take a mixture of NSData or NSString or an NSArray of either type when setting the values of an attribute.
152152+ outError is optional parameter, nil can be passed if error details are not needed.
153153+*/
154154+- (BOOL)setValue:(id)inValueOrValues forAttribute:(ODAttributeType)inAttribute error:(NSError **)outError NS_AVAILABLE(10_6, NA);
155155+156156+/*!
157157+ @method removeValuesForAttribute:error:
158158+ @abstract Removes all the values for an attribute.
159159+ @discussion Removes all the values for an attribute. outError is optional parameter, nil can be passed if
160160+ error details are not needed.
161161+*/
162162+- (BOOL)removeValuesForAttribute:(ODAttributeType)inAttribute error:(NSError **)outError NS_AVAILABLE(10_6, NA);
163163+164164+/*!
165165+ @method addValue:toAttribute:error:
166166+ @abstract Will add a value to an attribute
167167+ @discussion Will add a value to an attribute. Should be either NSData or NSString type. outError is optional
168168+ parameter, nil can be passed if error details are not needed.
169169+*/
170170+- (BOOL)addValue:(id)inValue toAttribute:(ODAttributeType)inAttribute error:(NSError **)outError NS_AVAILABLE(10_6, NA);
171171+172172+/*!
173173+ @method removeValue:fromAttribute:error:
174174+ @abstract Will remove a value from an attribute
175175+ @discussion Will remove a value from an attribute. Should be either NSData or NSString type. outError is optional
176176+ parameter, nil can be passed if error details are not needed.
177177+*/
178178+- (BOOL)removeValue:(id)inValue fromAttribute:(ODAttributeType)inAttribute error:(NSError **)outError NS_AVAILABLE(10_6, NA);
179179+180180+/*!
181181+ @method deleteRecordAndReturnError:
182182+ @abstract Deletes the record from the node and invalidates the record.
183183+ @discussion Deletes the record from the node and invalidates the record. The ODRecord should be
184184+ released after deletion. outError is optional parameter, nil can be passed if error details are not needed.
185185+*/
186186+- (BOOL)deleteRecordAndReturnError:(NSError **)outError NS_AVAILABLE(10_6, NA);
187187+188188+/*!
189189+ @method policiesAndReturnError:
190190+ @abstract This will copy any policies configured for the record.
191191+ @discussion This will copy any policies configured for the record.
192192+*/
193193+- (NSDictionary *)policiesAndReturnError:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use accountPoliciesAndReturnError:");
194194+195195+/*!
196196+ @method effectivePoliciesAndReturnError:
197197+ @abstract This will copy any policies configured for the record.
198198+ @discussion This will copy any policies configured for the record.
199199+*/
200200+- (NSDictionary *)effectivePoliciesAndReturnError:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use authenticationAllowedAndReturnError: and similar methods");
201201+202202+/*!
203203+ @function supportedPoliciesAndReturnError:
204204+ @abstract This will return a dictionary of supported policies.
205205+ @discussion This will return a dictionary of supported policies, if appropriate, the value will be the maximum value allowed
206206+ for the policy in question. For example, if password history is available, it will state how much history is
207207+ supported.
208208+*/
209209+- (NSDictionary *)supportedPoliciesAndReturnError:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA);
210210+211211+/*!
212212+ @function setPolicies:error:
213213+ @abstract This will set the policy for the record.
214214+ @discussion This will set the policy for the record. Policies are evaluated in combination with node-level policies.
215215+*/
216216+- (BOOL)setPolicies:(NSDictionary *)policies error:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use setAccountPolicies:error:");
217217+218218+/*!
219219+ @function setPolicy:value:error:
220220+ @abstract This will set a specific policy setting for the record.
221221+ @discussion This will set a specific policy setting for the record.
222222+*/
223223+- (BOOL)setPolicy:(ODPolicyType)policy value:(id)value error:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use addAccountPolicy:toCategory:error:");
224224+225225+/*!
226226+ @function removePolicy:error:
227227+ @abstract This will remove a specific policy setting from the record.
228228+ @discussion This will remove a specific policy setting from the record.
229229+*/
230230+- (BOOL)removePolicy:(ODPolicyType)policy error:(NSError **)error __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_10, __IPHONE_NA, __IPHONE_NA, "use removeAccountPolicy:fromCategory:error:");
231231+232232+/*!
233233+ @method addAccountPolicy:toCategory:error:
234234+ @abstract This will add a specific policy to the specific category for the record.
235235+ @discussion This will add a specific policy to the specific category for the record.
236236+ The specified policy will be applied, in combination with any
237237+ node policies, to the specified record when policies are evaluated.
238238+ @param policy a dictionary containing the specific policy to be added.
239239+ The dictionary may contain the following keys:
240240+ kODPolicyKeyIdentifier a required key identifying the policy.
241241+ kODPolicyKeyParameters an optional key containing a dictionary of
242242+ parameters that can be used for informational purposes or in
243243+ the policy format string.
244244+ kODPolicyKeyContent a required key specifying the policy,
245245+ from which a predicate will be created for evaluating
246246+ the policy.
247247+ @param category a valid ODPolicyCategoryType to which the policy will be added.
248248+ @param error an optional NSError reference for error details.
249249+ @result a BOOL which signifies if the policy addition succeeded, otherwise error is set.
250250+*/
251251+- (BOOL)addAccountPolicy:(NSDictionary *)policy toCategory:(ODPolicyCategoryType)category error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
252252+253253+/*!
254254+ @method removeAccountPolicy:fromCategory:error:
255255+ @abstract This will remove a specific policy from the specific category for the record.
256256+ @discussion This will remove a specific policy from the specific category for the record.
257257+ @param policy a dictionary containing the specific policy to be
258258+ removed, with the same format as described in addAccountPolicy.
259259+ @param category a valid ODPolicyCategoryType from which the policy will be removed.
260260+ @param error an optional NSError reference for error details.
261261+ @result a BOOL which signifies if the policy removal succeeded, otherwise error is set.
262262+*/
263263+- (BOOL)removeAccountPolicy:(NSDictionary *)policy fromCategory:(ODPolicyCategoryType)category error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
264264+265265+/*!
266266+ @method setAccountPolicies:error:
267267+ @abstract This will set the policies for the record.
268268+ @discussion This will set the policies for the record, replacing any
269269+ existing policies. All of the policies in the set will be
270270+ applied to the record when policies are evaluated.
271271+ @param policies a dictionary containing all of the policies to be set
272272+ for the node. The dictionary may contain the following keys:
273273+ kODPolicyCategoryAuthentication an optional key with a value
274274+ of an array of policy dictionaries that specify when
275275+ authentications should be allowed.
276276+ kODPolicyCategoryPasswordContent an optional key with a
277277+ value of an array of policy dictionaries the specify the
278278+ required content of passwords.
279279+ kODPolicyCategoryPasswordChange an optional key with a value
280280+ of an array of policy dictionaries that specify when
281281+ passwords are required to be changed.
282282+ @param error an optional NSError reference for error details.
283283+ @result a BOOL which signifies if the policy set succeeded, otherwise error is set.
284284+*/
285285+- (BOOL)setAccountPolicies:(NSDictionary *)policies error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
286286+287287+/*!
288288+ @method accountPoliciesAndReturnError:
289289+ @abstract Returns a dictionary containing any policies configured for the record.
290290+ @discussion Returns a dictionary containing any policies configured for the record.
291291+ Does not include any policies set for the node.
292292+ @discussion Returns a dictionary containing any policies configured for the record.
293293+ @param error an optional NSError reference for error details.
294294+ @result a NSDictionary containing all currently set policies. The
295295+ format of the dictionary is the same as described in
296296+ setAccountPolicies.
297297+*/
298298+- (NSDictionary *)accountPoliciesAndReturnError:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
299299+300300+/*!
301301+ @function authenticationAllowedAndReturnError:
302302+ @abstract Determines if policies allow the account to authenticate.
303303+ @discussion Determines if policies allow the account to authenticate.
304304+ Authentication and password change policies are evaluated.
305305+ Record-level and node-level policies are evaluated in
306306+ combination, with record-level taking precedence over node-level
307307+ policies. The failure of any single policy will deny the
308308+ authentication.
309309+310310+ This check is only definitive at the time it was requested. The
311311+ policy or the environment could change before the authentication
312312+ is actually requested. Errors from the authentication request
313313+ should be consulted.
314314+315315+ It is not necessary to call this function when calling
316316+ verifyPassword or verifyPasswordExtended since those methods
317317+ perform the same policy evaluation.
318318+319319+ @param error an optional NSError reference for error details.
320320+ @result a bool which signifies if the authentication is allowed, otherwise error is set.
321321+ */
322322+- (BOOL)authenticationAllowedAndReturnError:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
323323+324324+/*!
325325+ @method passwordChangeAllowed:error:
326326+ @abstract Determines if policies allow the password change.
327327+ @discussion Determines if policies allow the password change. Password
328328+ content policies are evaluated. Record-level and node-level
329329+ policies are evaluated in combination, with record-level taking
330330+ precedence over node-level policies. The failure of any single
331331+ policy will deny the password change.
332332+333333+ This check is only definitive at the time it was requested. The
334334+ policy or the environment could change before the password change
335335+ is actually requested. Errors from the password change request
336336+ should be consulted.
337337+338338+ @param newPassword contains the password to be evaluated.
339339+ @param error an optional NSError reference for error details.
340340+ @result a BOOL which signifies if the password change is allowed, otherwise error is set.
341341+ */
342342+- (BOOL)passwordChangeAllowed:(NSString *)newPassword error:(NSError **)error __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
343343+344344+/*!
345345+ @method willPasswordExpire:
346346+ @abstract Determines if the password will expire within the specified time.
347347+ @discussion Determines if the password will expire (i.e. need to be changed)
348348+ between now and the specified number of seconds in the future.
349349+ Password change policies are evaluated. Record-level and
350350+ node-level policies are evaluated in combination, with
351351+ record-level taking precedence over node-level policies.
352352+ @param willExpireIn the number of seconds from the current time to be
353353+ used as the upper-bound for the password expiration period.
354354+ @result a BOOL which signifies if the password will expire within the
355355+ specified time.
356356+ */
357357+- (BOOL)willPasswordExpire:(uint64_t)willExpireIn __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
358358+359359+/*!
360360+ @method willAuthenticationsExpire:
361361+ @abstract Determines if authentications will expire within the specified time.
362362+ @discussion Determines if authentications will expire (i.e. session and/or
363363+ account expires) between now and the specified number of seconds
364364+ in the future. Authentication policies are evaluated.
365365+ Record-level and node-level policies are evaluated in
366366+ combination, with record-level taking precedence over node-level
367367+ policies.
368368+ @param willExpireIn the number of seconds from the current time to be
369369+ used as the upper-bound for the authentication expiration period.
370370+ @result a BOOL which signifies if authentications will expire within the
371371+ specified time.
372372+ */
373373+- (BOOL)willAuthenticationsExpire:(uint64_t)willExpireIn __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
374374+375375+/*!
376376+ @method secondsUntilPasswordExpires
377377+ @abstract Determines how many seconds until the password expires.
378378+ @discussion Determines how many seconds until the password expires (i.e.
379379+ needs changing). Password change policies are evaluated.
380380+ Record-level and node-level policies are evaluated in
381381+ combination, with record-level taking precedence over node-level
382382+ policies.
383383+ @result the number of seconds until the password expires. If multiple
384384+ policies will cause the password to expire, the soonest
385385+ expiration time is returned. If already expired,
386386+ kODExpirationTimeExpired is returned. If there are no password
387387+ change policies, kODExpirationTimeNeverExpires is returned.
388388+ */
389389+@property (readonly) int64_t secondsUntilPasswordExpires __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
390390+391391+/*!
392392+ @method secondsUntilAuthenticationsExpire
393393+ @abstract Determines how many seconds until authentications expire.
394394+ @discussion Determines how many seconds until authentications expire (i.e.
395395+ session and/or account expires). Authentication policies are
396396+ evaluated. Record-level and node-level policies are evaluated
397397+ in combination, with record-level taking precedence over
398398+ node-level policies.
399399+ @result the number of seconds until authentications expire. If multiple
400400+ policies will cause authentications to expire, the soonest
401401+ expiration time is returned. If already expired,
402402+ kODExpirationTimeExpired is returned. If there are no
403403+ authentication policies controlling expiration,
404404+ kODExpirationTimeNeverExpires is returned.
405405+ */
406406+@property (readonly) int64_t secondsUntilAuthenticationsExpire __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_NA);
407407+408408+@end
409409+410410+/*!
411411+ @category ODRecord (ODRecordGroupExtensions)
412412+ @discussion Record extensions for checking and modifying group membership.
413413+*/
414414+@interface ODRecord (ODRecordGroupExtensions)
415415+416416+/*!
417417+ @method addMemberRecord:error:
418418+ @abstract Will add the record as a member of the group record
419419+ @discussion Will add the record as a member of the group record. An error will be returned if the record is not
420420+ a group record. Additionally, if the member record is not an appropriate type allowed as part of a group
421421+ an error will be returned. outError is optional parameter, nil can be passed if error details are not needed.
422422+*/
423423+- (BOOL)addMemberRecord:(ODRecord *)inRecord error:(NSError **)outError NS_AVAILABLE(10_6, NA);
424424+425425+/*!
426426+ @method removeMemberRecord:error:
427427+ @abstract Will remove the record as a member from the group record
428428+ @discussion Will remove the record as a member from the group record. An error will be returned if the record is not
429429+ a group record. Additionally, if the member record is not an appropriate type allowed as part of a group
430430+ an error will be returned. outError is optional parameter, nil can be passed if error details are not needed.
431431+*/
432432+- (BOOL)removeMemberRecord:(ODRecord *)inRecord error:(NSError **)outError NS_AVAILABLE(10_6, NA);
433433+434434+/*!
435435+ @method isMemberRecord:error:
436436+ @abstract Will use membership APIs to determine if inRecord is a member of the group
437437+ @discussion Will use membership APIs to determine if inRecord is a member of the group. If the receiving
438438+ object is not a group then NO will still be returned. outError is optional parameter, nil can be passed if
439439+ error details are not needed.
440440+*/
441441+- (BOOL)isMemberRecord:(ODRecord *)inRecord error:(NSError **)outError NS_AVAILABLE(10_6, NA);
442442+443443+@end
+92
src/OpenDirectory/Headers/ODRecordMap.h
···11+/*
22+ * Copyright (c) 2012 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#import <Foundation/Foundation.h>
2525+2626+@class ODAttributeMap;
2727+2828+NS_CLASS_AVAILABLE_MAC(10_9)
2929+@interface ODRecordMap : NSObject {
3030+ @protected
3131+ NSString *native;
3232+ NSDictionary *odPredicate;
3333+ NSMutableDictionary *attributes;
3434+}
3535+3636+/* native value for this attribute, if not present, translation function or preformed OD predicate must be present */
3737+@property(copy) NSString *native NS_AVAILABLE_MAC(10_9);
3838+3939+/*
4040+ * preformed OD-style predicate that defines a query for a specific record type
4141+ *
4242+ * predicate dictionary:
4343+ * attribute : <native attribute>
4444+ * values : [ <value> ] # note multiple values will be treated as AND
4545+ * matchtype : <value from kODMatchEqualTo(0x2001) | kODMatchBeginsWith(0x2002) | kODMatchContains(0x2003) | kODMatchEndsWith(0x2004)>
4646+ *
4747+ * nested predicates
4848+ * operator : { OR | AND | NOT }
4949+ * predicates : [ <predicate>, ... ]
5050+ */
5151+@property(copy) NSDictionary *odPredicate NS_AVAILABLE_MAC(10_9);
5252+5353+/* dictionary of OpenDirectory standard attributes as a key and a value of ODAttributeMap */
5454+@property(readonly, copy) NSDictionary *attributes NS_AVAILABLE_MAC(10_9);
5555+5656+/* returns an array of NSStrings that list the attributes for this recordmap */
5757+@property(readonly, copy) NSArray *standardAttributeTypes NS_AVAILABLE_MAC(10_9);
5858+5959+/*!
6060+ * @method recordMap
6161+ *
6262+ * @abstract
6363+ * Returns an initialized and autoreleased ODRecordMap object.
6464+ *
6565+ * @discussion
6666+ * Returns an initialized and autoreleased ODRecordMap object.
6767+ */
6868++ (instancetype)recordMap;
6969+7070+/*!
7171+ * @method attributeMapForStandardAttribute:
7272+ *
7373+ * @abstract
7474+ * Returns an ODAttributeMap object for the given OD standard attribute.
7575+ *
7676+ * @discussion
7777+ * Returns an ODAttributeMap object for the given OD standard attribute.
7878+ */
7979+- (ODAttributeMap *)attributeMapForStandardAttribute:(NSString *)standardAttribute NS_AVAILABLE_MAC(10_9);
8080+8181+/*!
8282+ * @method setAttributeMap:forStandardAttribute:
8383+ *
8484+ * @abstract
8585+ * Sets an ODAttributeMap object for a given OD standard attribute.
8686+ *
8787+ * @discussion
8888+ * Sets an ODAttributeMap object for a given OD standard attribute.
8989+ */
9090+- (void)setAttributeMap:(ODAttributeMap *)attributeMap forStandardAttribute:(NSString *)standardAttribute NS_AVAILABLE_MAC(10_9);
9191+9292+@end
+196
src/OpenDirectory/Headers/ODSession.h
···11+/*
22+ * Copyright (c) 2009 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+@class SFAuthorization;
2525+2626+/*!
2727+ @const ODSessionProxyAddress
2828+ @abstract the address to connect to via proxy, used when making the options dictionary
2929+ @discussion the address to connect to via proxy, used when making the options dictionary
3030+*/
3131+FOUNDATION_EXPORT NSString *const ODSessionProxyAddress NS_AVAILABLE(10_6, NA);
3232+3333+/*!
3434+ @const ODSessionProxyPort
3535+ @abstract the port to connect to via proxy, used when making the options dictionary
3636+ @discussion the port to connect to via proxy, used when making the options dictionary. This parameter
3737+ is optional and should not be passed normally.
3838+*/
3939+FOUNDATION_EXPORT NSString *const ODSessionProxyPort NS_AVAILABLE(10_6, NA);
4040+4141+/*!
4242+ @const ODSessionProxyUsername
4343+ @abstract the username to connect with via proxy, used when making the options dictionary
4444+ @discussion the username to connect with via proxy, used when making the options dictionary
4545+*/
4646+FOUNDATION_EXPORT NSString *const ODSessionProxyUsername NS_AVAILABLE(10_6, NA);
4747+4848+/*!
4949+ @const ODSessionProxyPassword
5050+ @abstract the password to connect with via proxy, used when making the options dictionary
5151+ @discussion the password to connect with via proxy, used when making the options dictionary
5252+*/
5353+FOUNDATION_EXPORT NSString *const ODSessionProxyPassword NS_AVAILABLE(10_6, NA);
5454+5555+@class ODConfiguration;
5656+5757+/*!
5858+ @class ODSession
5959+ @abstract Class for working with OpenDirectory sessions.
6060+ @discussion Class for working with OpenDirectory sessions.
6161+*/
6262+@interface ODSession : NSObject {
6363+ @private
6464+ void *_internal;
6565+}
6666+6767+/*!
6868+ @method defaultSession
6969+ @abstract Returns a shared instance of a local ODSession
7070+ @discussion Returns a shared instance of a local ODSession. This can be used for most situations unless
7171+ more control is needed over the session.
7272+*/
7373++ (ODSession *)defaultSession NS_AVAILABLE(10_6, NA);
7474+7575+/*!
7676+ @method sessionWithOptions:error:
7777+ @abstract Creates an autoreleased instance of ODSession directed over Proxy to another host
7878+ @discussion Creates an autoreleased instance of ODSession directed over Proxy to another host. nil
7979+ can be passed for no options. outError is optional parameter, nil can be passed if error
8080+ details are not needed. Options include:
8181+8282+ If proxy is required then a dictionary with keys should be:
8383+ Key Value
8484+ ODSessionProxyAddress NSString(hostname or IP)
8585+ ODSessionProxyPort NSNumber(IP port, should not be set as it will default)
8686+ ODSessionProxyUsername NSString(username)
8787+ ODSessionProxyPassword NSString(password)
8888+*/
8989++ (instancetype)sessionWithOptions:(NSDictionary *)inOptions error:(NSError **)outError NS_AVAILABLE(10_6, NA);
9090+9191+/*!
9292+ @method initWithOptions:error:
9393+ @abstract Creates an instance of ODSession directed over Proxy to another host
9494+ @discussion Creates an instance of ODSession directed over Proxy to another host. nil can be
9595+ passed for no options. outError is optional parameter, nil can be passed if error
9696+ details are not needed. Options include:
9797+9898+ If proxy is required then a dictionary with keys should be:
9999+ Key Value
100100+ ODSessionProxyAddress NSString(hostname or IP)
101101+ ODSessionProxyPort NSNumber(IP port, should not be set as it will default)
102102+ ODSessionProxyUsername NSString(username)
103103+ ODSessionProxyPassword NSString(password)
104104+*/
105105+- (instancetype)initWithOptions:(NSDictionary *)inOptions error:(NSError **)outError NS_AVAILABLE(10_6, NA);
106106+107107+/*!
108108+ @method nodeNamesAndReturnError:
109109+ @abstract Returns the node names that are registered on this ODSession
110110+ @discussion Returns the node names that are registered on this ODSession. outError can be nil if
111111+ error details are not needed.
112112+*/
113113+- (NSArray *)nodeNamesAndReturnError:(NSError **)outError NS_AVAILABLE(10_6, NA);
114114+115115+/*!
116116+ * @method configurationTemplateNames
117117+ *
118118+ * @abstract
119119+ * Returns a list of names as NSStrings for all available configuration templates.
120120+ *
121121+ * @discussion
122122+ * Returns a list of names as NSStrings for all available configuration templates. Configuration templates
123123+ * have pre-configured modules and/or mappings. Useful for re-using existing configurations
124124+ * that may change with operating system without changing the actual configuration.
125125+ */
126126+@property (readonly, copy) NSArray *configurationTemplateNames NS_AVAILABLE_MAC(10_9);
127127+128128+/*!
129129+ * @method mappingTemplateNames
130130+ *
131131+ * @abstract
132132+ * Returns a list names as NSStrings for all available mapping templates.
133133+ *
134134+ * @discussion
135135+ * Returns a list names as NSStrings for all available mapping templates. Mapping templates have pre-configured
136136+ * record/attribute mappings. Useful if a configuration uses a common layout of mappings for a type of server.
137137+ */
138138+@property (readonly, copy) NSArray *mappingTemplateNames NS_AVAILABLE_MAC(10_9);
139139+140140+/*!
141141+ * @method configurationAuthorizationAllowingUserInteraction:
142142+ *
143143+ * @abstract
144144+ * Returns an authorization appropriate for managing configurations.
145145+ *
146146+ * @discussion
147147+ * Returns an authorization appropriate for managing configurations. If a proxy session is in use this method will return
148148+ * nil and no error.
149149+ */
150150+- (SFAuthorization *)configurationAuthorizationAllowingUserInteraction:(BOOL)allowInteraction error:(NSError **)error NS_AVAILABLE_MAC(10_9);
151151+152152+/*!
153153+ * @method configurationForNodename:
154154+ *
155155+ * @abstract
156156+ * Reads the configuration for a given nodename.
157157+ *
158158+ * @discussion
159159+ * Reads the configuration for a given nodename.
160160+ */
161161+- (ODConfiguration *)configurationForNodename:(NSString *)nodename NS_AVAILABLE_MAC(10_9);
162162+163163+/*!
164164+ * @method addConfiguration:authorization:error:
165165+ *
166166+ * @abstract
167167+ * Adds a new configuration to the existing ODSession.
168168+ *
169169+ * @discussion
170170+ * Adds a new configuration to the existing ODSession. An SFAuthorization can be provided if necessary.
171171+ */
172172+- (BOOL) addConfiguration:(ODConfiguration *)configuration authorization:(SFAuthorization *)authorization error:(NSError **)error NS_AVAILABLE_MAC(10_9);
173173+174174+/*!
175175+ * @method deleteConfiguration:authorization:error:
176176+ *
177177+ * @abstract
178178+ * Deletes an existing configuration from the ODSession.
179179+ *
180180+ * @discussion
181181+ * Deletes an existing configuration from the ODSession. An authorization can be provided if necessary.
182182+ */
183183+- (BOOL) deleteConfiguration:(ODConfiguration *)configuration authorization:(SFAuthorization *)authorization error:(NSError **)error NS_AVAILABLE_MAC(10_9);
184184+185185+/*!
186186+ * @method deleteConfigurationWithNodename:authorization:error:
187187+ *
188188+ * @abstract
189189+ * Deletes an existing configuration from the ODSession.
190190+ *
191191+ * @discussion
192192+ * Deletes an existing configuration from the ODSession. An authorization can be provided if necessary.
193193+ */
194194+- (BOOL) deleteConfigurationWithNodename:(NSString *)nodename authorization:(SFAuthorization *)authorization error:(NSError **)error NS_AVAILABLE_MAC(10_9);
195195+196196+@end
+44
src/OpenDirectory/Headers/OpenDirectory.h
···11+/*
22+ * Copyright (c) 2009 Apple Inc. All rights reserved.
33+ *
44+ * @APPLE_LICENSE_HEADER_START@
55+ *
66+ * This file contains Original Code and/or Modifications of Original Code
77+ * as defined in and that are subject to the Apple Public Source License
88+ * Version 2.0 (the 'License'). You may not use this file except in
99+ * compliance with the License. Please obtain a copy of the License at
1010+ * http://www.opensource.apple.com/apsl/ and read it before using this
1111+ * file.
1212+ *
1313+ * The Original Code and all software distributed under the License are
1414+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1515+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1616+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1717+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
1818+ * Please see the License for the specific language governing rights and
1919+ * limitations under the License.
2020+ *
2121+ * @APPLE_LICENSE_HEADER_END@
2222+ */
2323+2424+#if __OBJC__
2525+#import <Foundation/Foundation.h>
2626+#endif /* __OBJC__ */
2727+2828+#include <CFOpenDirectory/CFOpenDirectory.h>
2929+3030+#if __OBJC__
3131+3232+FOUNDATION_EXPORT NSString *const ODFrameworkErrorDomain NS_AVAILABLE(10_6, NA);
3333+3434+#import <OpenDirectory/ODSession.h>
3535+#import <OpenDirectory/ODRecord.h>
3636+#import <OpenDirectory/ODNode.h>
3737+#import <OpenDirectory/ODQuery.h>
3838+#import <OpenDirectory/ODConfiguration.h>
3939+#import <OpenDirectory/ODMappings.h>
4040+#import <OpenDirectory/ODRecordMap.h>
4141+#import <OpenDirectory/ODAttributeMap.h>
4242+#import <OpenDirectory/ODModuleEntry.h>
4343+4444+#endif /* __OBJC__ */