HawkTracer  0.9.0
registry.h File Reference

Go to the source code of this file.

Functions

HT_API HT_ErrorCode ht_registry_register_feature (uint32_t feature_id, HT_FeatureDisableCallback disable_callback)
 Registers new a new feature in the system. More...
 
HT_API HT_EventKlassId ht_registry_register_event_klass (HT_EventKlass *event_klass)
 Registers new event klass in the system, or gets identifier if klass is already registered. More...
 
HT_API size_t ht_registry_push_registry_klasses_to_listener (HT_TimelineListenerCallback callback, void *listener, HT_Boolean serialize)
 Pushes information about registered event klasses (HT_EventKlassInfoEvent and HT_EventKlassFieldInfoEvent events) directly to a listener. More...
 
HT_API HT_EventKlass ** ht_registry_get_event_klasses (size_t *out_klass_count)
 Returns a list of all the klasses registered in HawkTracer library. More...
 

Variables

HT_DECLS_BEGIN typedef void(* HT_FeatureDisableCallback )(HT_Timeline *)
 A type of a callback which gets called when a timeline disables the feature. More...
 

Function Documentation

◆ ht_registry_get_event_klasses()

HT_API HT_EventKlass** ht_registry_get_event_klasses ( size_t *  out_klass_count)

Returns a list of all the klasses registered in HawkTracer library.

Parameters
out_klass_counta pointer to variable to store number of klasses.
Returns
an array of all the event klasses registered in the library.

◆ ht_registry_push_registry_klasses_to_listener()

HT_API size_t ht_registry_push_registry_klasses_to_listener ( HT_TimelineListenerCallback  callback,
void *  listener,
HT_Boolean  serialize 
)

Pushes information about registered event klasses (HT_EventKlassInfoEvent and HT_EventKlassFieldInfoEvent events) directly to a listener.

Parameters
callbackthe listener callback.
listenera pointer to the listener.
serializeindicates whether events should be serialized before pushing to listener or not.
Returns
number of bytes which have been pushed to a listener.

◆ ht_registry_register_event_klass()

HT_API HT_EventKlassId ht_registry_register_event_klass ( HT_EventKlass event_klass)

Registers new event klass in the system, or gets identifier if klass is already registered.

Parameters
event_klassa pointer to a klass definition.
Returns
an identifier to a klass, or HT_INVALID_KLASS_ID if registration failed.

◆ ht_registry_register_feature()

HT_API HT_ErrorCode ht_registry_register_feature ( uint32_t  feature_id,
HT_FeatureDisableCallback  disable_callback 
)

Registers new a new feature in the system.

Parameters
feature_ida feature identifier.
disable_callbacka function which gets called when timeline disables the feature.
Returns
HT_ERR_OK, if registration completed successfully; otherwise, appropriate error code.

Variable Documentation

◆ HT_FeatureDisableCallback

HT_DECLS_BEGIN typedef void(* HT_FeatureDisableCallback) (HT_Timeline *)

A type of a callback which gets called when a timeline disables the feature.