Truxton update media type
Jump to navigation
Jump to search
Sets the type of an existing media.
This corresponds to the [MediaTypeID] column of the [Media] table.
It should contain a value from the [ID] column of the [MediaType] table or a defined constant.
Contents
Syntax
int truxton_update_media_type( uint64_t truxton_handle, char const * media_id, uint64_t media_type );
Parameters
truxton_handle
The Truxton instance that contains this media.
This handle comes from calling truxton_create().
media_id
The string representation of the GUID of the media to modify.
It should match the value in the [ID] column of a record in the [Media] table.
media_type
The type of the media.
This should be a value from the [ID] column from the [MediaType] table or a defined constant.
Return value
A non-zero value on success, zero on failure.
Sample
void it_is_a_sim_card( char const * media_id )
{
uint64_t truxton = truxton_create();
if ( truxton_update_media_type( truxton, media_id, MEDIA_TYPE_SIM_CARD_IMAGE ) == 0 )
{
printf( "Cannot update the media type.\n" );
}
truxton_destroy( truxton );
}