Function

ODNodeCreateRecord(_:_:_:_:_:)

Creates a record in a specified node with specified properties.

Declaration

func ODNodeCreateRecord(_ node: ODNodeRef!, _ recordType: String!, _ recordName: CFString!, _ attributeDict: CFDictionary!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Unmanaged<ODRecordRef>!

Parameters

inNode

The node.

inRecordType

The record’s type.

inRecordName

The record’s name.

inAttributes

A dictionary of key-value pairs representing attributes for the record. Can be NULL.

outError

An error reference for error details. Can be NULL.

Return Value

The created record.

Discussion

The keys in inAttributes can be of type CFStringRef or one of the ODRecordType constants. The values in inAttributes must be of type CFArrayRef, containing elements of type CFStringRef or CFDataRef.

If any of the attributes in inAttributes fails to be set, the record is deleted and outError is set.

See Also

Working with Nodes

func ODNodeCopyUnreachableSubnodeNames(ODNodeRef!, UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Unmanaged<CFArray>!

Returns an array of the subnodes of a given node that are currently unreachable.

func ODNodeGetTypeID() -> CFTypeID

Returns the type ID for an Open Directory node.