Difference between revisions of "Truxton media open id"

From truxwiki.com
Jump to navigation Jump to search
(Created page with "This will tag the media. =Syntax= <syntaxhighlight lang="C"> void truxton_media_open_id( uint64_t truxton_handle, char const * guid_string ); </syntaxhighlight> =Parameters=...")
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
This will tag the media.
+
This will retrieve media given the globally unique identifier.
  
 
=Syntax=
 
=Syntax=
<syntaxhighlight lang="C">
+
<source lang="C">
 
void truxton_media_open_id( uint64_t truxton_handle, char const * guid_string );
 
void truxton_media_open_id( uint64_t truxton_handle, char const * guid_string );
</syntaxhighlight>
+
</source>
  
 
=Parameters=
 
=Parameters=
Line 10: Line 10:
 
This handle comes from calling <code>[[truxton_create]]()</code>.
 
This handle comes from calling <code>[[truxton_create]]()</code>.
  
==<code>guid_string </code>==
+
==<code>guid_string</code>==
The string representation of the identifier of the file to get in Truxton.
+
The string representation of the identifier of the media to get in Truxton.
This corresponds to the <code>ID</code> column of the <code>Media</code> table.
+
This corresponds to the <code>[ID]</code> column of the <code><nowiki>[</nowiki>[[Media Table|Media]]<nowiki>]</nowiki></code> table.
  
 
=Sample=
 
=Sample=
<syntaxhighlight lang="C" highlight="8">
+
<source lang="C" highlight="6">
  
 
#define TAG_ORIGIN_AUTOMATIC (1)
 
#define TAG_ORIGIN_AUTOMATIC (1)
 
#define TAG_ORIGIN_HUMAN    (2)
 
#define TAG_ORIGIN_HUMAN    (2)
  
void process_media(uint64_t truxton)
+
void process_media( uint64_t truxton )
 
{
 
{
   uint64_t media = truxton_media_open_id(truxton, "92A86F8F-DFD0-4DBE-B9FF-257D4EB17B4C");
+
   uint64_t media = truxton_media_open_id( truxton, "92A86F8F-DFD0-4DBE-B9FF-257D4EB17B4C" );
  
   truxton_media_tag(media, "Doofenshmirtz", "Infectinator from Evil Incorporated", TAG_ORIGIN_AUTOMATIC);
+
   truxton_media_tag( media, "Doofenshmirtz", "Infectinator from Evil Incorporated", TAG_ORIGIN_AUTOMATIC );
  
   truxton_media_destroy(media);
+
   truxton_media_destroy( media );
 
}
 
}
</syntaxhighlight>
+
</source>

Latest revision as of 05:50, 6 February 2026

This will retrieve media given the globally unique identifier.

Syntax

void truxton_media_open_id( uint64_t truxton_handle, char const * guid_string );

Parameters

truxton_handle

This handle comes from calling truxton_create().

guid_string

The string representation of the identifier of the media to get in Truxton. This corresponds to the [ID] column of the [Media] table.

Sample

#define TAG_ORIGIN_AUTOMATIC (1)
#define TAG_ORIGIN_HUMAN     (2)

void process_media( uint64_t truxton )
{
   uint64_t media = truxton_media_open_id( truxton, "92A86F8F-DFD0-4DBE-B9FF-257D4EB17B4C" );

   truxton_media_tag( media, "Doofenshmirtz", "Infectinator from Evil Incorporated", TAG_ORIGIN_AUTOMATIC );

   truxton_media_destroy( media );
}