diff --git a/src/libsysprof-analyze/sysprof-document.c b/src/libsysprof-analyze/sysprof-document.c index 4deeaba4..718be6b8 100644 --- a/src/libsysprof-analyze/sysprof-document.c +++ b/src/libsysprof-analyze/sysprof-document.c @@ -25,6 +25,8 @@ #include #include "sysprof-document-private.h" + +#include "sysprof-document-bitset-index-private.h" #include "sysprof-document-file-chunk.h" #include "sysprof-document-frame-private.h" #include "sysprof-document-symbols-private.h" @@ -495,3 +497,20 @@ _sysprof_document_traceables (SysprofDocument *self) return self->traceables; } + +/** + * sysprof_document_list_traceables: + * @self: a #SysprofDocument + * + * Gets a #GListModel containing #SysprofDocumentTraceable found within + * the #SysprofDocument. + * + * Returns: (transfer full): a #GListModel + */ +GListModel * +sysprof_document_list_traceables (SysprofDocument *self) +{ + g_return_val_if_fail (SYSPROF_IS_DOCUMENT (self), NULL); + + return _sysprof_document_bitset_index_new (G_LIST_MODEL (self), self->traceables); +} diff --git a/src/libsysprof-analyze/sysprof-document.h b/src/libsysprof-analyze/sysprof-document.h index fb62bdbb..c9afd003 100644 --- a/src/libsysprof-analyze/sysprof-document.h +++ b/src/libsysprof-analyze/sysprof-document.h @@ -60,5 +60,7 @@ SYSPROF_AVAILABLE_IN_ALL GBytes *sysprof_document_lookup_file_finish (SysprofDocument *self, GAsyncResult *result, GError **error); +SYSPROF_AVAILABLE_IN_ALL +GListModel *sysprof_document_list_traceables (SysprofDocument *self); G_END_DECLS