|
Mac Dev Center
Mac OS X Reference Library Networking, Internet, & Web: Services & Discovery Directory Service Framework Reference
|
DirServicesUtils.h |
| Includes: | <stdarg.h> <AvailabilityMacros.h> <DirectoryService/DirServicesTypes.h> <CoreFoundation/CoreFoundation.h> |
Use the links in the table of contents to the left to access the documentation.
Appends a list of items to an existing buffer.
Inserts a user name with authentication authority data into an existing buffer.
Inserts a user name with authentication authority data into an existing buffer.
Fills a buffer with a list of items.
Allocate a buffer that contains the xml plist form of a CFDictionary.
dsAllocAttributeValueEntry |
tAttributeValueEntryPtr dsAllocAttributeValueEntry ( tDirReference inDirRef, UInt32 inAttrValueID, void *inAttrValueData, UInt32 inAttrValueDataLen ) ;
dsAllocStringsFromList |
char** dsAllocStringsFromList( tDirReference inDirRef, const tDataList *inDataList ) ;
Provides a char** of the strings contained within a tDataList.
dsAppendAuthBuffer |
Appends a list of items to an existing buffer.
tDirStatus dsAppendAuthBuffer ( tDataBufferPtr inOutAuthBuffer, UInt32 inCount, UInt32 inLen, const void *inData, ... ) ;
inOutAuthBufferpass in a preallocated buffer.
inCountthe number of length/data pairs on the stack
inLenthe length of one buffer item
inDataa pointer to inLen bytes of data
Use this function as a convenient way to compose the buffer for calls to dsDoDirNodeAuth().
dsAppendAuthBufferWithAuthorityAttribute |
Inserts a user name with authentication authority data into an existing buffer.
tDirStatus dsAppendAuthBufferWithAuthorityAttribute ( tDirNodeReference inNodeRef, tDataBufferPtr inRecordListBuffPtr, tAttributeEntryPtr inAttributePtr, tAttributeValueListRef inValueRef, const char *inUserName, tDataBufferPtr inOutAuthBuffer ) ;
inNodeRefa node reference for the record to parse
inRecordListBuffPtrthe data returned from dsGetDataList
inAttributePtran attribute with authentication authority data
inValueRefthe reference for the kDSNAttrAuthenticationAuthority attribute.
inUserNamethe name of the user to authenticate
inOutAuthBufferpass in a preallocated buffer, returns with the user data appended.
tDirStatus code
Use this function for authentication methods that contain user or authenticator names and the authentication authority attribute has already been retrieved.
dsAppendAuthBufferWithAuthorityStrings |
Inserts a user name with authentication authority data into an existing buffer.
tDirStatus dsAppendAuthBufferWithAuthorityStrings ( const char *inUserName, const char *inAuthAuthority[], tDataBufferPtr inOutAuthBuffer ) ;
inUserNamethe name of the user to authenticate
inAuthAuthoritya NULL terminated array of C strings
inOutAuthBufferpass in a preallocated buffer, returns with the user data appended.
tDirStatus code
Use this function for authentication methods that contain user or authenticator names and the authentication authority attribute has already been retrieved.
dsAppendStringToListAlloc |
tDirStatus dsAppendStringToListAlloc ( tDirReference inDirReferences, tDataListPtr inDataList, const char * inCString ) ;
dsBuildFromPath |
tDataListPtr dsBuildFromPath ( tDirReference inDirReference, const char *inPathCString, const char *inPathSeparatorCString ) ;
dsBuildListFromNodesAlloc |
tDirStatus dsBuildListFromNodesAlloc ( tDirReference inDirReferences, tDataListPtr inDataList, tDataNodePtr in1stDataNodePtr, ... ) ;
dsBuildListFromPathAlloc |
tDirStatus dsBuildListFromPathAlloc ( tDirReference inDirReference, tDataListPtr inDataList, const char *inPathCString, const char *inPathSeparatorCString ) ;
dsBuildListFromStrings |
tDataListPtr dsBuildListFromStrings ( tDirReference inDirReference, const char *in1stCString, ... ) ;
dsBuildListFromStringsAlloc |
tDirStatus dsBuildListFromStringsAlloc ( tDirReference inDirReferences, tDataListPtr inDataList, const char *in1stCString, ... ) ;
dsBuildListFromStringsAllocV |
tDirStatus dsBuildListFromStringsAllocV ( tDirReference inDirRef, tDataList *inDataList, const char *in1stCString, va_list args ) ;
dsCopyDirStatusName |
char* dsCopyDirStatusName ( SInt32 inDirStatus ) ;
Pass in the tDirStatus enum and receive the string of the enum name. Memory for the char* is the responsibility of the client and can be cleaned up using free().
dsDataBufferAllocate |
tDataBufferPtr dsDataBufferAllocate ( tDirReference inDirReference, UInt32 inBufferSize ) ;
dsDataBufferDeAllocate |
tDirStatus dsDataBufferDeAllocate ( tDirReference inDirReference, tDataBufferPtr inDataBufferPtr ) ;
dsDataListAllocate |
tDataListPtr dsDataListAllocate ( tDirReference inDirReference ) ;
dsDataListCopyList |
tDataListPtr dsDataListCopyList ( tDirReference inDirReference, const tDataList *inDataListSource ) ;
dsDataListDeallocate |
tDirStatus dsDataListDeallocate ( tDirReference inDirReference, tDataListPtr inDataList ) ;
Note that if the tDataListPtr is a heap based tDataList rather than stack based, that you must also call free() to release the memory for the head of the list after calling dsDataListDeallocate().
dsDataListDeAllocate |
tDirStatus dsDataListDeAllocate ( tDirReference inDirReference, tDataListPtr inDataList, dsBool inDeAllocateNodesFlag ) ;
Included only for backward compatibility. Equivalent to dsDataListDeallocate.
dsDataListDeleteThisNode |
tDirStatus dsDataListDeleteThisNode ( tDirReference inDirReference, tDataListPtr inDataList, UInt32 inNodeIndex ) ;
dsDataListGetNodeAlloc |
tDirStatus dsDataListGetNodeAlloc ( tDirReference inDirReference, const tDataList *inDataListPtr, UInt32 inNodeIndex, tDataNodePtr *outDataNode ) ;
dsDataListGetNodeCount |
UInt32 dsDataListGetNodeCount ( const tDataList *inDataList ) ;
dsDataListInsertAfter |
tDirStatus dsDataListInsertAfter ( tDirReference inDirReferences, tDataListPtr inDataList, tDataNodePtr inInsertDataNode, const UInt32 inNodeIndex ) ;
inNodeIndexOne-based index of the existing node to insert the new node after. If inNodeIndex is 0, then it is inserted at the head of the list.
The datanode is copied into the datalist. The caller owns the original datanode, therefore must deallocate after adding to the list.
dsDataListMergeListAfter |
tDirStatus dsDataListMergeListAfter ( tDataListPtr inTargetList, tDataListPtr inSourceList, const UInt32 inNodeIndex ) ;
dsDataNodeAllocateBlock |
tDataNodePtr dsDataNodeAllocateBlock ( tDirReference inDirReference, UInt32 inDataNodeSize, UInt32 inDataNodeLength, tBuffer inDataNodeBuffer ) ;
dsDataNodeAllocateString |
tDataNodePtr dsDataNodeAllocateString ( tDirReference inDirReference, const char *inCString ) ;
dsDataNodeDeAllocate |
tDirStatus dsDataNodeDeAllocate ( tDirReference inDirReference, tDataNodePtr inDataNodePtr ) ;
dsDataNodeGetLength |
UInt32 dsDataNodeGetLength ( tDataNodePtr inDataNodePtr ) ;
dsDataNodeGetSize |
UInt32 dsDataNodeGetSize ( tDataNodePtr inDataNodePtr ) ;
dsDataNodeSetLength |
tDirStatus dsDataNodeSetLength ( tDataNodePtr inDataNodePtr, UInt32 inDataNodeLength ) ;
dsDeallocAttributeEntry |
tDirStatus dsDeallocAttributeEntry ( tDirReference inDirRef, tAttributeEntryPtr inAttrEntry ) ;
dsDeallocAttributeValueEntry |
tDirStatus dsDeallocAttributeValueEntry ( tDirReference inDirRef, tAttributeValueEntryPtr inAttrValueEntry ) ;
dsDeallocRecordEntry |
tDirStatus dsDeallocRecordEntry ( tDirReference inDirRef, tRecordEntryPtr inRecEntry ) ;
dsFillAuthBuffer |
Fills a buffer with a list of items.
tDirStatus dsFillAuthBuffer ( tDataBufferPtr inOutAuthBuffer, UInt32 inCount, UInt32 inLen, const void *inData, ... ) ;
inOutAuthBufferpass in a preallocated buffer to be filled.
inCountthe number of length/data pairs on the stack
inLenthe length of one buffer item
inDataa pointer to inLen bytes of data
Use this function as a convenient way to compose the buffer for calls to dsDoDirNodeAuth().
dsGetDataLength |
UInt32 dsGetDataLength ( const tDataList *inDataList );
dsGetPathFromList |
char* dsGetPathFromList ( tDirReference inDirReference, const tDataList *inDataList, const char *inDelimiter ) ;
dsGetRecordNameFromEntry |
tDirStatus dsGetRecordNameFromEntry ( tRecordEntryPtr inRecEntryPtr, char **outRecName ) ;
outRecNameUsed to return the record name to the client. Client is responsible for freeing the resulting string.
dsGetRecordTypeFromEntry |
tDirStatus dsGetRecordTypeFromEntry ( tRecordEntryPtr inRecEntryPtr, char **outRecType ) ;
outRecTypeUsed to return the record name to the client. Client is responsible for freeing the resulting string.
dsParseAuthAuthority |
tDirStatus dsParseAuthAuthority ( const char *inAuthAuthority, char **outVersion, char **outAuthTag, char **outAuthData ) ;
Pass in a complete authentication authority attribute format is version;tag;data retrieve version, tag, and data as separate strings Memory for the char** parameters is the responsibility of the client and can be cleaned up using free().
dsServiceInformationAllocate |
Allocate a buffer that contains the xml plist form of a CFDictionary.
tDirStatus dsServiceInformationAllocate ( CFDictionaryRef inServiceInfo, UInt32 inBufferSize, tDataBufferPtr *outPackedServiceInfo ) ;
inServiceInfoA dictionary that contains context information from a service
inBufferSizeThe desired size of the buffer. It is expanded if necessary to fit the context information. The buffer must be large enough to hold the data returned by the authentication method used.
outPackedServiceInfoA constructed buffer containing the data from inServiceInfo.
tDirStatus code
Services can use this function to obtain a buffer suitable for providing additional information to dsDoDirNodeAuth(). This buffer is also used to return data from an authentication method, so it needs to be large enough to handle the context information and the data returned by the authentication method.
Last Updated: 2009-08-12