+static
+int get_event_class_count(void *element)
+{
+ return bt_ctf_stream_class_get_event_class_count(
+ (struct bt_ctf_stream_class *) element);
+}
+
+static
+void *get_event_class(void *element, int i)
+{
+ return bt_ctf_stream_class_get_event_class(
+ (struct bt_ctf_stream_class *) element, i);
+}
+
+static
+int visit_event_class(void *object, bt_ctf_visitor visitor,void *data)
+{
+ struct bt_ctf_object obj =
+ { .object = object,
+ .type = BT_CTF_OBJECT_TYPE_EVENT_CLASS };
+
+ return visitor(&obj, data);
+}
+
+int bt_ctf_stream_class_visit(struct bt_ctf_stream_class *stream_class,
+ bt_ctf_visitor visitor, void *data)
+{
+ int ret;
+ struct bt_ctf_object obj =
+ { .object = stream_class,
+ .type = BT_CTF_OBJECT_TYPE_STREAM_CLASS };
+
+ if (!stream_class || !visitor) {
+ ret = -1;
+ goto end;
+ }
+
+ ret = visitor_helper(&obj, get_event_class_count,
+ get_event_class,
+ visit_event_class, visitor, data);
+end:
+ return ret;
+}
+