+ int64_t count = -1;
+
+ if (!plugin_set) {
+ BT_LOGW_STR("Invalid parameter: plugin set is NULL.");
+ goto end;
+ }
+
+ count = (int64_t) plugin_set->plugins->len;
+
+end:
+ return count;
+}
+
+extern
+struct bt_plugin *bt_plugin_set_get_plugin(struct bt_plugin_set *plugin_set,
+ uint64_t index)
+{
+ struct bt_plugin *plugin = NULL;
+
+ if (!plugin_set) {
+ BT_LOGW_STR("Invalid parameter: plugin set is NULL.");
+ goto end;
+ }
+
+ if (index >= plugin_set->plugins->len) {
+ BT_LOGW("Invalid parameter: index is out of bounds: "
+ "addr=%p, index=%" PRIu64 ", count=%u",
+ plugin_set, index, plugin_set->plugins->len);
+ goto end;
+ }
+
+ plugin = bt_get(g_ptr_array_index(plugin_set->plugins, index));
+
+end:
+ return plugin;
+}
+
+struct bt_plugin_set *bt_plugin_create_all_from_static(void)
+{
+ /* bt_plugin_so_create_all_from_static() logs errors */