Difference between revisions of "Truxton communication set file id"
Jump to navigation
Jump to search
(Created page with "This will set the identifier of the file the message came from. It corresponds to the <code>[FileID]</code> column of the <code>[Message]</code> table. =Syntax= <source lang=...") |
(→Sample) |
||
| Line 25: | Line 25: | ||
if ( strcmp( id, "00000000-0000-0000-0000-000000000000" ) != 0 ) | if ( strcmp( id, "00000000-0000-0000-0000-000000000000" ) != 0 ) | ||
{ | { | ||
| − | truxton_file_get_id | + | truxton_file_get_id( parent_file, id, sizeof(id) ); |
truxton_communication_set_file_id( communication, id ); | truxton_communication_set_file_id( communication, id ); | ||
} | } | ||
} | } | ||
</source> | </source> | ||
Latest revision as of 16:59, 16 May 2023
This will set the identifier of the file the message came from.
It corresponds to the [FileID] column of the [Message] table.
Syntax
void truxton_communication_set_file_id( uint64_t communication_handle, char const * id);
Parameters
communication_handle
The handle returned by calling truxton_communication_create.
id
The buffer to write the identifier to.
Sample
void optionally_set_message_file( uint64_t communication, uint64_t parent_file )
{
char id[40];
truxton_communication_get_file_id( communication, id, sizeof(id) );
if ( strcmp( id, "00000000-0000-0000-0000-000000000000" ) != 0 )
{
truxton_file_get_id( parent_file, id, sizeof(id) );
truxton_communication_set_file_id( communication, id );
}
}