AEStreamCreateEvent(_:_:_:_:_:_:_:)
Creates a new Apple event and opens a stream for writing data to it.
Declaration
func AEStreamCreateEvent(_ clazz: AEEventClass, _ id: AEEventID, _ targetType: DescType, _ targetData: UnsafeRawPointer!, _ targetLength: Size, _ returnID: Int16, _ transactionID: Int32) -> AEStreamRef!Parameters
- clazz:
The event class of the Apple event. See Aeeventclass.
- id:
The event ID of the Apple event. See Aeeventid.
- targetType:
The address type for the addressing information in the next two parameters. Usually contains one of the following values:
typeApplSignature.typeKernelProcessID, ortypeProcessSerialNumber. See Desctype. - targetData:
A pointer to the address information. The data in this pointer must match the data associated with the specified
targetType. - targetLength:
The number of bytes pointed to by the
targetDataparameter. - returnID:
The return ID for the created Apple event. If you pass a value of
kAutoGenerateReturnID, the Apple Event Manager assigns the created Apple event a return ID that is unique to the current session. If you pass any other value, the Apple Event Manager assigns that value for the ID. The return ID constant is described in 1542799 Id_constants_for_the_aecreateapp. See Aereturnid. - transactionID:
The transaction ID for this Apple event. A transaction is a sequence of Apple events that are sent back and forth between the client and server applications, beginning with the client’s initial request for a service. All Apple events that are part of a transaction must have the same transaction ID. You can specify the
kAnyTransactionIDconstant if the Apple event is not one of a series of interdependent Apple events. This transaction ID constant is described in 1542799 Id_constants_for_the_aecreateapp. See Aetransactionid.
Return Value
An AEStreamRef associated with the new event.
Discussion
This routine effectively combines a call to AECreateAppleEvent(_:_:_:_:_:_:) followed by a call to AEStreamOpenEvent(_:) to create a new Apple event in the stream. You can use the returned AEStreamRef to add parameters to the new Apple event.
See Also
Creating Apple Event Structures Using Streams
AEStreamClose(_:_:)AEStreamCloseDesc(_:)AEStreamCloseList(_:)AEStreamCloseRecord(_:)AEStreamOpen()AEStreamOpenDesc(_:_:)AEStreamOpenEvent(_:)AEStreamOpenKeyDesc(_:_:_:)AEStreamOpenList(_:)AEStreamOpenRecord(_:_:)AEStreamOptionalParam(_:_:)AEStreamSetRecordType(_:_:)AEStreamWriteAEDesc(_:_:)AEStreamWriteData(_:_:_:)AEStreamWriteDesc(_:_:_:_:)AEStreamWriteKey(_:_:)AEStreamWriteKeyDesc(_:_:_:_:_:)