Difference between revisions of "Truxton investigation add media"
Jump to navigation
Jump to search
(Created page with "Adds a piece of media to an investigation. This will make a record in the <code>[InvestigationMedia]</code>. =Syntax= <source lang="C"> int truxton_investigation_add_media( u...") |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 14: | Line 14: | ||
==<code>media_id</code>== | ==<code>media_id</code>== | ||
The string representation of a [https://en.wikipedia.org/wiki/Universally_unique_identifier GUID.] | The string representation of a [https://en.wikipedia.org/wiki/Universally_unique_identifier GUID.] | ||
| − | This value should be present in the <code>[ID]</code> column of the <code>[Media]</code> table. | + | This value should be present in the <code>[ID]</code> column of the <code><nowiki>[</nowiki>[[Media Table|Media]]<nowiki>]</nowiki></code> table. |
=Return value= | =Return value= | ||
| Line 29: | Line 29: | ||
if ( truxton_investigation_add_media( investigation, media_guid ) != 0 ) | if ( truxton_investigation_add_media( investigation, media_guid ) != 0 ) | ||
{ | { | ||
| − | printf(" | + | printf("Added Media %s to investigation %s.\n", media_guid, investigation_guid ); |
} | } | ||
Latest revision as of 07:50, 3 February 2024
Adds a piece of media to an investigation.
This will make a record in the [InvestigationMedia].
Syntax
int truxton_investigation_add_media( uint64_t investigation_handle, char const * media_id );
Parameters
investigation_handle
The handle to the investigation object.
This handle comes from calling truxton_investigation_create().
media_id
The string representation of a GUID.
This value should be present in the [ID] column of the [Media] table.
Return value
A non-zero value on success, zero on failure.
Sample
void add_media( uint64_t truxton, char const * investigation_guid, char const * media_guid )
{
uint64_t investigation = truxton_investigation_create( truxton );
truxton_investigation_set_id( investigation, investigation_guid );
if ( truxton_investigation_add_media( investigation, media_guid ) != 0 )
{
printf("Added Media %s to investigation %s.\n", media_guid, investigation_guid );
}
truxton_investigation_destroy( investigation );
}