libsysprof-analyze: add prepare vfunc for symbolizers

This will allow them to pre-process the document and extract whatever
information they need out of it to do symbolizing.
This commit is contained in:
Christian Hergert
2023-05-03 15:31:56 -07:00
parent 426aaad781
commit f550394b62
4 changed files with 156 additions and 0 deletions

View File

@ -20,10 +20,13 @@
#pragma once
#include "sysprof-document.h"
#include "sysprof-symbolizer.h"
G_BEGIN_DECLS
#define SYSPROF_SYMBOLIZER_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS(obj, SYSPROF_TYPE_SYMBOLIZER, SysprofSymbolizerClass)
struct _SysprofSymbolizer
{
GObject parent;
@ -32,6 +35,25 @@ struct _SysprofSymbolizer
struct _SysprofSymbolizerClass
{
GObjectClass parent_class;
void (*prepare_async) (SysprofSymbolizer *self,
SysprofDocument *document,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*prepare_finish) (SysprofSymbolizer *self,
GAsyncResult *result,
GError **error);
};
void _sysprof_symbolizer_prepare_async (SysprofSymbolizer *self,
SysprofDocument *document,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean _sysprof_symbolizer_prepare_finish (SysprofSymbolizer *self,
GAsyncResult *result,
GError **error);
G_END_DECLS