Difference between revisions of "Truxton message participant set id"
Jump to navigation
Jump to search
(Created page with "This creates a message participant object. =Syntax= <source lang="C"> void truxton_message_participant_set_type( uint64_t participant_handle, char const * id ); </source> =P...") |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | This | + | This sets the globally unique identifier of a message participant object. |
=Syntax= | =Syntax= | ||
<source lang="C"> | <source lang="C"> | ||
| − | void | + | void truxton_message_participant_set_id( uint64_t participant_handle, char const * id ); |
</source> | </source> | ||
| Line 12: | Line 12: | ||
==<code>id</code>== | ==<code>id</code>== | ||
The globally unique identifier of the participant. | The globally unique identifier of the participant. | ||
| + | This corresponds to the <code>[ID]</code> column of the <code>[MessageAddress_Message]</code> table. | ||
=Sample= | =Sample= | ||
Latest revision as of 06:47, 18 February 2026
This sets the globally unique identifier of a message participant object.
Syntax
void truxton_message_participant_set_id( uint64_t participant_handle, char const * id );
Parameters
participant_handle
This handle comes from calling truxton_message_participant_create().
id
The globally unique identifier of the participant.
This corresponds to the [ID] column of the [MessageAddress_Message] table.
Sample
void process_participant_result(uint64_t truxton, PGresult * result, int row_number)
{
uint64_t participant_handle = truxton_message_participant_create(truxton);
truxton_message_participant_set_id(participant_handle, ::PQgetvalue(result, row_number, 0));
truxton_message_participant_set_media_id(participant_handle, ::PQgetvalue(result, row_number, 1));
truxton_message_participant_set_file_id(participant_handle, ::PQgetvalue(result, row_number, 2));
truxton_message_participant_set_message_address_id(participant_handle, ::PQgetvalue(result, row_number, 3));
truxton_message_participant_set_message_id(participant_handle, ::PQgetvalue(result, row_number, 4));
truxton_message_participant_set_type(participant_handle, atoi(result, row_number, 5));
truxton_message_participant_set_account(participant_handle, ::PQgetvalue(result, row_number, 7));
truxton_message_participant_set_server(participant_handle, ::PQgetvalue(result, row_number, 8));
truxton_message_participant_set_name(participant_handle, ::PQgetvalue(result, row_number, 9));
dump(participant_handle);
truxton_message_participant_destroy(participant_handle);
}