Truxton investigation event create
Jump to navigation
Jump to search
This creates an investigation event in Truxton.
This object corresponds to the [InvestigationEvent] table.
Syntax
uint64_t truxton_investigation_event_create( uint64_t truxton_handle );
Parameters
truxton_handle
The Truxton instance this event will belong.
This handle comes from calling truxton_create().
Return value
A handle to an investigation event object.
Sample
void create_event( void )
{
uint64_t truxton = truxton_create();
uint64_t event = truxton_investigation_event_create( truxton );
truxton_investigation_event_set_id(event , "C229B12A-BDBC-4526-BC91-574FDCE0D650");
truxton_investigation_event_set_investigation_id(event , "01da7796-a010-3685-0000-018902cb3b22");
truxton_investigation_event_set_color(event , 0xFF9E1B18);
truxton_investigation_event_set_text(event , "Case Opened");
truxton_investigation_event_set_status(event , INVESTIGATION_STATUS_OPEN);
truxton_investigation_event_set_type(event , INVESTIGATION_EVENT_TYPE_STATUS_CHANGE);
truxton_investigation_event_set_when(event , truxton_time_now());
if ( truxton_investigation_event_save( event ) == 0 )
{
printf( "Cannot save investigation event to the database.\n" );
}
truxton_investigation_event_destroy(event);
truxton_destroy( truxton );
}