Function

AEStreamOpenKeyDesc

Marks the beginning of a key descriptor in an AEStreamRef.

Declaration

OSStatus AEStreamOpenKeyDesc(AEStreamRef ref, AEKeyword key, DescType newType);

Parameters

ref

An AEStreamRef containing the stream data.

key

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

newType

A type code for the new AEDesc being added to the stream. See DescType.

Return Value

A result code. See Result Codes.

Discussion

Use this routine to mark the beginning of a keyword/descriptor definition in an Apple event record. After calling this routine, you should call AEStreamWriteData one or more times to write the record data to the stream. When you are done writing data, you must call AEStreamCloseDesc to complete the record definition.

This routine must be called only as part of an Apple event record definition. You cannot use this routine to write keyword/descriptor definitions to other descriptor types, such as an AEDesc or AEDescList, even if those types are nested inside an Apple event record. In situations where you need to create nested records, this routine opens a new keyword/descriptor definition in the Apple event record associated with the most recent call to AEStreamOpenRecord.

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.

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.

AEStreamWriteKey

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

AEStreamWriteKeyDesc

Writes a complete keyword/descriptor pair to an AEStreamRef.