Truxton media get originator

From truxwiki.com
Revision as of 05:54, 10 July 2020 by Sam (talk | contribs) (Created page with "This retrieves the originator of the media. It corresponds to the <code>Originator</code> column of the <code>Media</code> table. This is an arbitrary string value that Truxt...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This retrieves the originator of the media. It corresponds to the Originator column of the Media table.

This is an arbitrary string value that Truxton will associate with the media. It identifies who gave you the media.

Syntax

void truxton_media_get_originator( uint64_t media_handle, char * destination_string, size_t max_size );

Parameters

media_handle

The handle created by the truxton_media_create or truxton_media_open_id call.

destination_string

The string to be written to.

max_size

The maximum number of characters that can be written to destination_string.

Sample

void print_origin(uint64_t truxton)
{
   uint64_t media = truxton_media_open_id(truxton, "150929ce-bf30-4d5d-08d9-b48a0806c843");

   if ( media != 0 )
   {
      return;
   }

   char origin[ MAX_PATH ];

   truxton_media_get_originator(media, origin, sizeof(origin));

   printf( "%s asked us to process this media.\n", origin);

   truxton_media_free(media);
}