Mac Developer Library

Developer

ODRecord Class Reference

Options
Deployment Target:

On This Page
Language:

ODRecord

An ODRecord object serves as a Cocoa wrapper for an Open Directory record.

  • Adds a member record to this group record.

    Declaration

    Swift

    func addMemberRecord(_ inRecord: ODRecord!) throws

    Objective-C

    - (BOOL)addMemberRecord:(ODRecord *)inRecord error:(NSError **)outError

    Parameters

    inRecord

    The member record to add.

    outError

    An error reference for error details. Can be nil.

    Return Value

    YEStrue if the member record is successfully added; otherwise, NOfalse.

    Discussion

    This method produces an error if this record is not a group record, or if inRecord is not an appropriate type.

    Availability

    Available in OS X v10.6 and later.

  • Determines whether a given record is a member of this group record.

    Declaration

    Swift

    func isMemberRecord(_ inRecord: ODRecord!) throws

    Objective-C

    - (BOOL)isMemberRecord:(ODRecord *)inRecord error:(NSError **)outError

    Parameters

    inRecord

    The record to test for membership.

    outError

    An error reference for error details. Can be nil.

    Return Value

    YEStrue if inRecord is a member of this group record; otherwise, NOfalse.

    Discussion

    If this record is not a group record, this method returns NOfalse.

    Availability

    Available in OS X v10.6 and later.

  • Removes a record as a member of this group record.

    Declaration

    Swift

    func removeMemberRecord(_ inRecord: ODRecord!) throws

    Objective-C

    - (BOOL)removeMemberRecord:(ODRecord *)inRecord error:(NSError **)outError

    Parameters

    inRecord

    The member record.

    outError

    An error reference for error details. Can be nil.

    Return Value

    YEStrue if inRecord is successfully removed from this group record; otherwise, NOfalse.

    Discussion

    This method produces an error if this record is not a group record, or if inRecord is not an appropriate type.

    Availability

    Available in OS X v10.6 and later.

  • Deletes the record from its node and invalidates it.

    Declaration

    Swift

    func deleteRecord() throws

    Objective-C

    - (BOOL)deleteRecordAndReturnError:(NSError **)outError

    Parameters

    outError

    An error reference for error details. Can be nil.

    Return Value

    YEStrue if the record is successfully deleted; otherwise, NOfalse.

    Discussion

    The record should be released after this method is called.

    Availability

    Available in OS X v10.6 and later.