Difference between revisions of "Truxton group set status"
Jump to navigation
Jump to search
(Created page with "This sets a description for the group. This corresponds to the <code>[GroupStatusID]</code> column of the <code>[Group]</code> table. =Syntax= <source lang="C"> void truxton_...") |
|||
| Line 1: | Line 1: | ||
| − | This sets | + | This sets the [[Group Status|status]] of the group. |
This corresponds to the <code>[GroupStatusID]</code> column of the <code>[Group]</code> table. | This corresponds to the <code>[GroupStatusID]</code> column of the <code>[Group]</code> table. | ||
| Line 12: | Line 12: | ||
==<code>value</code>== | ==<code>value</code>== | ||
| − | The status of the group. | + | The [[Group Status|status]] of the group. |
This value should match a value stored in the <code>[ID]</code> column of the <code>[GroupStatus]</code> table. | This value should match a value stored in the <code>[ID]</code> column of the <code>[GroupStatus]</code> table. | ||
Latest revision as of 10:42, 13 April 2024
This sets the status of the group.
This corresponds to the [GroupStatusID] column of the [Group] table.
Syntax
void truxton_group_set_status( uint64_t group_handle, uint64_t value );
Parameters
group_handle
The handle created by truxton_group_create() or truxton_investigation_create_group().
value
The status of the group.
This value should match a value stored in the [ID] column of the [GroupStatus] table.
Sample
void create_my_things(uint64_t investigation_handle)
{
if (investigation_handle == 0)
{
return;
}
uint64_t truxton_handle = truxton_investigation_get_truxton( investigation_handle );
uint64_t group_handle = truxton_group_create( truxton_handle );
truxton_group_set_id( group_handle, "47726F75-7020-5361-6D70-6C65636F6465" );
truxton_group_set_name( group_handle, "My Things" );
truxton_group_set_description( group_handle, "These are my things" );
truxton_group_set_is_default( group_handle, 1 );
truxton_group_set_type( group_handle, GROUP_TYPE_USER );
truxton_group_set_status( group_handle, GROUP_STATUS_NORMAL );
if ( truxton_group_save( group_handle ) != 0 )
{
char guid[MINIMUM_GUID_STRING_BUFFER_SIZE + 5];
truxton_group_get_id( group_handle, guid, sizeof(guid) );
truxton_investigation_set_active_group_id( investigation_handle, guid );
}
truxton_group_destroy( group_handle );
}