Truxton group get id
Jump to navigation
Jump to search
This creates a group in Truxton.
Syntax
void truxton_group_get_id(uint64_t group_handle, char * destination_string, size_t max_size);
Parameters
group_handle
The handle created by by truxton_group_create().
destination_string
The string to be written to.
max_size
The maximum number of characters that can be written to destination_string.
Sample
1 void create_my_things(uint64_t investigation_handle)
2 {
3 if (investigation_handle == 0)
4 {
5 return;
6 }
7
8 uint64_t truxton_handle = truxton_investigation_get_truxton( investigation_handle );
9 uint64_t group_handle = truxton_group_create( truxton_handle );
10
11 truxton_group_set_name( group_handle, "My Things" );
12 truxton_group_set_description( group_handle, "These are my things" );
13 truxton_group_set_is_default( group_handle, 1 );
14 truxton_group_set_type( group_handle, GROUP_TYPE_USER );
15
16 if ( truxton_group_save( group_handle ) != 0 )
17 {
18 char guid[MINIMUM_GUID_STRING_BUFFER_SIZE + 5];
19
20 truxton_group_get_id( group_handle, guid, sizeof(guid) );
21 truxton_investigation_set_active_group_id( investigation_handle, guid );
22 }
23
24 truxton_group_destroy( group_handle );
25 }