+ /*
+ * If the stream class is associated with a trace, then
+ * both those objects are frozen. Also, this event class
+ * is about to be frozen.
+ *
+ * Therefore the event class must be validated here.
+ * The trace and stream class should be valid at this
+ * point.
+ */
+ assert(trace->valid);
+ assert(stream_class->valid);
+ packet_header_type =
+ bt_ctf_trace_get_packet_header_type(trace);
+ packet_context_type =
+ bt_ctf_stream_class_get_packet_context_type(
+ stream_class);
+ event_header_type =
+ bt_ctf_stream_class_get_event_header_type(stream_class);
+ stream_event_ctx_type =
+ bt_ctf_stream_class_get_event_context_type(
+ stream_class);
+ event_context_type =
+ bt_ctf_event_class_get_context_type(event_class);
+ event_payload_type =
+ bt_ctf_event_class_get_payload_type(event_class);
+ ret = bt_ctf_validate_class_types(
+ trace->environment, packet_header_type,
+ packet_context_type, event_header_type,
+ stream_event_ctx_type, event_context_type,
+ event_payload_type, trace->valid,
+ stream_class->valid, event_class->valid,
+ &validation_output, validation_flags);
+ BT_PUT(packet_header_type);
+ BT_PUT(packet_context_type);
+ BT_PUT(event_header_type);
+ BT_PUT(stream_event_ctx_type);
+ BT_PUT(event_context_type);
+ BT_PUT(event_payload_type);
+