mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-profile: add API to list required policy
The idea here is that we stop having instruments do their own policy checking and instead do the policy checking as a set from the recording as part of prepare/etc.
This commit is contained in:
@ -34,6 +34,10 @@ struct _SysprofInstrument
|
||||
struct _SysprofInstrumentClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
char **(*list_required_policy) (SysprofInstrument *self);
|
||||
};
|
||||
|
||||
char **_sysprof_instrument_list_required_policy (SysprofInstrument *self);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@ -24,12 +24,27 @@
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (SysprofInstrument, sysprof_instrument, G_TYPE_OBJECT)
|
||||
|
||||
static char **
|
||||
sysprof_instrument_real_list_required_policy (SysprofInstrument *self)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
sysprof_instrument_class_init (SysprofInstrumentClass *klass)
|
||||
{
|
||||
klass->list_required_policy = sysprof_instrument_real_list_required_policy;
|
||||
}
|
||||
|
||||
static void
|
||||
sysprof_instrument_init (SysprofInstrument *self)
|
||||
{
|
||||
}
|
||||
|
||||
char **
|
||||
_sysprof_instrument_list_required_policy (SysprofInstrument *self)
|
||||
{
|
||||
g_return_val_if_fail (SYSPROF_IS_INSTRUMENT (self), NULL);
|
||||
|
||||
return SYSPROF_INSTRUMENT_GET_CLASS (self)->list_required_policy (self);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user