Function

AEStreamWriteKey

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

Declaration

OSStatus AEStreamWriteKey(AEStreamRef ref, AEKeyword key);

Parameters

ref

An AEStreamRef containing the stream data.

key

The AEKeyword associated with the new descriptor being added to the stream. See AEKeyword.

Return Value

A result code. See Result Codes.

Discussion

You must follow this call with a sequence of “AEStream” calls to specify exactly one descriptor that goes with the keyword. The descriptor you create can be of type AEDesc, AEDescList, or AERecord.

If you are creating nested descriptors, this routine begins a new keyword/descriptor pair for the descriptor most recently opened by a call to AEStreamWriteKey or AEStreamOpenEvent. You cannot use this routine to write parameters to any other types of descriptors, even if they are nested inside of an AERecord.

See Also

Creating Apple Event Structures Using Streams

AEStreamClose

Closes and deallocates an AEStreamRef.

AEStreamCloseDesc

Marks the end of a descriptor in an AEStreamRef.

AEStreamCloseList

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

AEStreamCloseRecord

Marks the end of a record in an AEStreamRef.

AEStreamCreateEvent

Creates a new Apple event and opens a stream for writing data to it.

AEStreamOpen

Opens a new AEStreamRef for use in building a descriptor.

AEStreamOpenDesc

Marks the beginning of a descriptor in an AEStreamRef.

AEStreamOpenEvent

Opens a stream for an existing Apple event.

AEStreamOpenKeyDesc

Marks the beginning of a key descriptor in an AEStreamRef.

AEStreamOpenList

Marks the beginning of a descriptor list in an AEStreamRef.

AEStreamOpenRecord

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

AEStreamOptionalParam

Designates a parameter in an Apple event as optional.

AEStreamSetRecordType

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

AEStreamWriteAEDesc

Copies an existing descriptor into an AEStreamRef.

AEStreamWriteData

Appends data to the current descriptor in an AEStreamRef.

AEStreamWriteDesc

Appends the data for a complete descriptor to an AEStreamRef.

AEStreamWriteKeyDesc

Writes a complete keyword/descriptor pair to an AEStreamRef.