Difference between revisions of "Truxton media get description"

From truxwiki.com
Jump to navigation Jump to search
(Created page with "This retrieves the description of the media. It corresponds to the <code>Description</code> column of the <code>Media</code> table. =Syntax= <syntaxhighlight lang="C"> void t...")
 
Line 32: Line 32:
 
   truxton_media_get_description(media, description, sizeof(description));
 
   truxton_media_get_description(media, description, sizeof(description));
  
   printf( "Descriptionis %s\n", description);
+
   printf( "Description is %s\n", description);
  
 
   truxton_media_free(media);
 
   truxton_media_free(media);
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 03:53, 10 July 2020

This retrieves the description of the media. It corresponds to the Description column of the Media table.

Syntax

void truxton_media_get_description( 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_description(uint64_t truxton)
{
   uint64_t media = truxton_media_open_id(truxton, "150929ce-bf30-4d5d-08d9-b48a0806c843");

   if ( file != 0 )
   {
      return;
   }

   char description[ MAX_PATH ];

   truxton_media_get_description(media, description, sizeof(description));

   printf( "Description is %s\n", description);

   truxton_media_free(media);
}