Function

AEStreamWriteAEDesc(_:_:)

Copies an existing descriptor into an AEStreamRef.

Declaration

func AEStreamWriteAEDesc(_ ref: AEStreamRef!, _ desc: UnsafePointer<AEDesc>!) -> OSStatus

Parameters

ref

An AEStreamRef containing the stream data.

desc

A pointer to the descriptor you want to copy into the stream. See AEDesc.

Return Value

A result code. See Result Codes.

Discussion

You can use this routine to incorporate an existing descriptor into the stream. For example, you could use this routine if you had a complex descriptor you wanted to add to multiple streams, but which would be costly to create each time.

Do not use AEStreamOpenDesc(_:_:) and AEStreamCloseDesc(_:) with this routine to open and close the descriptor.

See Also

Creating Apple Event Structures Using Streams

func AEStreamCloseDesc(AEStreamRef!) -> OSStatus

Marks the end of a descriptor in an AEStreamRef.

func AEStreamCloseList(AEStreamRef!) -> OSStatus

Marks the end of a list of descriptors in an AEStreamRef.

func AEStreamCloseRecord(AEStreamRef!) -> OSStatus

Marks the end of a record in an AEStreamRef.

func AEStreamOpen() -> AEStreamRef!

Opens a new AEStreamRef for use in building a descriptor.

func AEStreamOpenDesc(AEStreamRef!, DescType) -> OSStatus

Marks the beginning of a descriptor in an AEStreamRef.

func AEStreamOpenKeyDesc(AEStreamRef!, AEKeyword, DescType) -> OSStatus

Marks the beginning of a key descriptor in an AEStreamRef.

func AEStreamOpenList(AEStreamRef!) -> OSStatus

Marks the beginning of a descriptor list in an AEStreamRef.

func AEStreamOpenRecord(AEStreamRef!, DescType) -> OSStatus

Marks the beginning of an Apple event record in an AEStreamRef.

func AEStreamOptionalParam(AEStreamRef!, AEKeyword) -> OSStatus

Designates a parameter in an Apple event as optional.

func AEStreamSetRecordType(AEStreamRef!, DescType) -> OSStatus

Sets the type of the most recently created record in an AEStreamRef.

func AEStreamWriteData(AEStreamRef!, UnsafeRawPointer!, Size) -> OSStatus

Appends data to the current descriptor in an AEStreamRef.

func AEStreamWriteDesc(AEStreamRef!, DescType, UnsafeRawPointer!, Size) -> OSStatus

Appends the data for a complete descriptor to an AEStreamRef.

func AEStreamWriteKey(AEStreamRef!, AEKeyword) -> OSStatus

Marks the beginning of a keyword/descriptor pair for a descriptor in an AEStreamRef.