Difference between revisions of "Truxton message set depot id"
Jump to navigation
Jump to search
(Created page with "Sets the identifier of the media in the message. =Syntax= <syntaxhighlight lang="C"> void truxton_message_set_depot_id( uint64_t message_handle, char * id ); </syntaxhighligh...") |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
=Syntax= | =Syntax= | ||
| − | < | + | <source lang="C"> |
| − | void truxton_message_set_depot_id( uint64_t message_handle, char * id ); | + | void truxton_message_set_depot_id( uint64_t message_handle, char const * id ); |
| − | </ | + | </source> |
=Parameters= | =Parameters= | ||
| Line 12: | Line 12: | ||
==<code>id</code>== | ==<code>id</code>== | ||
The string representation of a [https://en.wikipedia.org/wiki/Universally_unique_identifier GUID.] | The string representation of a [https://en.wikipedia.org/wiki/Universally_unique_identifier GUID.] | ||
| + | |||
| + | =Remarks= | ||
| + | This identifier should be a value from the <code>[ID]</code> column of the <code>[Depot]</code> table in the database. | ||
=Sample= | =Sample= | ||
| − | < | + | <source lang="C" highlight="7"> |
| − | void set_depot(uint64_t message, uint64_t file) | + | void set_depot( uint64_t message, uint64_t file ) |
{ | { | ||
char id[40]; | char id[40]; | ||
| − | truxton_file_get_depot_id(file, id, sizeof(id)); | + | truxton_file_get_depot_id( file, id, sizeof(id) ); |
truxton_message_set_depot_id( message, id ); | truxton_message_set_depot_id( message, id ); | ||
} | } | ||
| − | </ | + | </source> |
Latest revision as of 16:04, 16 February 2021
Sets the identifier of the media in the message.
Syntax
void truxton_message_set_depot_id( uint64_t message_handle, char const * id );
Parameters
message_handle
The handle created by the truxton_message_create call.
id
The string representation of a GUID.
Remarks
This identifier should be a value from the [ID] column of the [Depot] table in the database.
Sample
void set_depot( uint64_t message, uint64_t file )
{
char id[40];
truxton_file_get_depot_id( file, id, sizeof(id) );
truxton_message_set_depot_id( message, id );
}