Difference between revisions of "Truxton media add child"
Jump to navigation
Jump to search
| Line 17: | Line 17: | ||
=Sample= | =Sample= | ||
<source lang="C" highlight="9"> | <source lang="C" highlight="9"> | ||
| − | uint64_t make_new_generated_file(uint64_t media) | + | uint64_t make_new_generated_file( uint64_t media ) |
{ | { | ||
char guid_string[ 40 ]; | char guid_string[ 40 ]; | ||
| − | truxton_media_get_generated_files_folder_id( media, guid_string, sizeof(guid_string)); | + | truxton_media_get_generated_files_folder_id( media, guid_string, sizeof(guid_string) ); |
uint64_t child_file = truxton_media_add_child( media ) | uint64_t child_file = truxton_media_add_child( media ) | ||
Revision as of 06:48, 10 February 2021
This creates a new child file belonging to this media. This new child will be an orphan. You must set the parent file id in order to have it show up in the file hierarchy.
Syntax
uint64_t truxton_media_add_child( uint64_t media_handle );
Parameters
media_handle
The handle created by the truxton_media_open_id or truxton_media_create call.
Return value
The handle to a new orphaned child file object belonging to this media.
Sample
uint64_t make_new_generated_file( uint64_t media )
{
char guid_string[ 40 ];
truxton_media_get_generated_files_folder_id( media, guid_string, sizeof(guid_string) );
uint64_t child_file = truxton_media_add_child( media )
truxton_child_file_set_parent_id( child_file, guid_string );
return( child_file );
}