Difference between revisions of "Truxton message set media id"

From truxwiki.com
Jump to navigation Jump to search
 
Line 15: Line 15:
  
 
=Remarks=
 
=Remarks=
This identifier should be a value from the <code>[ID]</code> column of the <code>[Media]</code> table in the database.
+
This identifier should be a value from the <code>[ID]</code> column of the <code><nowiki>[</nowiki>[[Media Table|Media]]<nowiki>]</nowiki></code> table in the database.
  
 
=Sample=
 
=Sample=

Latest revision as of 08:58, 3 February 2024

Sets the identifier of the media in the message. This corresponds to the [MediaID] column of the [File] table as well as the [ID] column of the [Media] table.

Syntax

void truxton_message_set_media_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 [Media] table in the database.

Sample

void set_parent( uint64_t message, uint64_t file )
{
   char id[40];

   truxton_file_get_media_id( file, id, sizeof(id) );

   truxton_message_set_media_id( message, id );
}