Truxton C API
Truxton functionality is exposed to the C programming world as a DLL named TruxtonCAPI.dll in the C:\Program Files\Truxton\SDK folder.
This DLL can be called from any programming language that has the ability to make operating system calls.
Contents
- 1 Philosophy
- 2 API Groups
- 2.1 Initialization
- 2.2 ETL Functions
- 2.3 Child Files
- 2.4 File IO
- 2.5 File Record Fields
- 2.6 Meta Data from File
- 2.7 ETL Creation
- 2.8 Debugging
- 2.9 Message
- 2.10 String Map
- 2.11 File Export
- 2.12 Artifacts
- 2.13 Event
- 2.14 EXIF (Camera Information)
- 2.15 Geographic Location
- 2.16 Website Visit
- 2.17 USB Device
- 2.18 Relation
Philosophy
The API is considered to be "flat" in that only sixty-four bit integers and ASCII character strings are used in the interface. This was chosen to make it easy for other languages to interface to. The coding convention is all lower case names with underscores separating words. Truxton is a member of the east const posse.
API Groups
The API is broken down into the different areas of Truxton.
Initialization
- truxton_start - Initializes Truxton
- truxton_stop - Uninitializes Truxton
ETL Functions
- truxton_create - Creates a Truxton object
- truxton_destroy - Frees a Truxton object
- truxton_get_device_id - Retrieves the Device identifier
- truxton_get_etl_id - Retrieves the identifier for this ETL process
- truxton_get_machine_id - Retrieves the machine identifier
- truxton_get_version - Retrieves the version of Truxton
- truxton_start_adding_files - Prepares Truxton to add files to the database
Child Files
A child file is one that you have created and need to save in Truxton.
- truxton_child_file_create - Create a file object to save to Truxton
- truxton_child_file_destroy - Destroys a file object
- truxton_child_file_clear - Returns a file object to an initial state of all zeroes
- truxton_child_file_get_id - Retrieves the GUID of the child file
- truxton_child_file_set_id - Sets the GUID of the child file
- truxton_child_file_get_parent_id - Retrieves the GUID of the parent file
- truxton_child_file_set_parent_id - Sets the GUID of the parent of the child
- truxton_child_file_get_media_id - Retrieves the GUID of the media this child belongs to
- truxton_child_file_set_media_id - Sets the GUID of the media this child belongs to
- truxton_child_file_get_name - Retrieves the name of the file
- truxton_child_file_set_name - Sets the name of the file
- truxton_child_file_get_path - Retrieves the path of the file
- truxton_child_file_set_path - Sets the path of the file
- truxton_child_file_get_hash - Retrieves the MD5 hash (digital fingerprint) of the file's contents
- truxton_child_file_get_number_of_children - Retrieves the number of child files of this file
- truxton_child_file_set_number_of_children - Sets the number of child files of this file
- truxton_child_file_get_created - Retrieves the date and time of when the file was created
- truxton_child_file_set_created - Sets the date and time of when the file was created
- truxton_child_file_get_accessed - Retrieves the date and time of when the file was accessed
- truxton_child_file_set_accessed - Sets the date and time of when the file was accessed
- truxton_child_file_get_modified - Retrieves the date and time of when the file was modified (last written to)
- truxton_child_file_set_modified - Sets the date and time of when the file was modified (last written to)
- truxton_child_file_get_size - Retrieves the size of the file, in bytes, as reported by the operating system
- truxton_child_file_set_size - Sets the size of the file, in bytes, as reported by the operating system
- truxton_child_file_get_origin - Retrieves the origin of the file
- truxton_child_file_set_origin - Sets the origin of the file
- truxton_child_file_get_content_status - Retrieves the status of the contents of the file
- truxton_child_file_set_content_status - Sets the status of the contents of the file
- truxton_child_file_get_truxton - Retrieves the instance of Truxton this child belongs to
- truxton_child_file_begin_write - Prepares Truxton for writing contents to be associated with this file
- truxton_child_file_end_write - Tells Truxton to finish writing contents
- truxton_child_file_write - Gives Truxton bytes to store as the file contents
- truxton_child_file_save - Commits data to the database
- truxton_child_file_set_type - Sets the type of the file
- truxton_child_file_get_type - Retrieves the type of the file
- truxton_child_file_set_attributes - Sets the attributes of the file
- truxton_child_file_get_attributes - Retrieves the attributes of the file
- truxton_child_file_set_disk_offset - Sets the physical disk offset of the first byte of contents
- truxton_child_file_get_disk_offset - Retrieves the physical disk offset of the first byte of contents
- truxton_child_file_get_entropy - Retrieves the entropy of the file contents
File IO
- [[truxton_file_open_id( uint64_t truxton_handle, const char * guid );
- [[truxton_file_open_md5( uint64_t truxton_handle, const char * guid );
- [[truxton_file_close( uint64_t file_handle );
- [[truxton_file_free( uint64_t file_handle );
- [[truxton_file_tell( uint64_t file_handle );
- [[truxton_file_length( uint64_t file_handle );
- [[truxton_file_is_closed( uint64_t file_handle );
- [[truxton_file_seek( uint64_t file_handle, int64_t distance, int origin );
- [[truxton_file_readline( uint64_t file_handle, uint8_t * buffer, size_t buffer_size, int64_t limit );
- [[truxton_file_read( uint64_t file_handle, uint8_t * buffer, size_t buffer_size );
File Record Fields
- [[truxton_file_get_id( uint64_t file_handle, char * destination_string, size_t max_size);
- [[truxton_file_get_media_id( uint64_t file_handle, char * destination_string, size_t max_size);
- [[truxton_file_get_parent_id( uint64_t file_handle, char * destination_string, size_t max_size);
- [[truxton_file_get_number_of_children( uint64_t file_handle );
- truxton_file_get_is_resident
- truxton_file_get_created
- truxton_file_get_accessed
- truxton_file_get_modified
- truxton_file_get_name
- truxton_file_get_attributes
- truxton_file_get_size
- truxton_file_get_origin
- truxton_file_get_content_status
- truxton_file_get_type
- truxton_file_get_hash
- truxton_file_get_entropy
- truxton_file_get_disk_offset
- truxton_file_get_is_eliminated
- truxton_file_get_depot_name
- truxton_file_get_depot_offset
- truxton_file_get_depot_length
- truxton_file_create_child
- truxton_file_get_details
- truxton_file_get_truxton
Meta Data from File
- truxton_file_create_artifact
- truxton_file_create_event
- truxton_file_create_exif
- truxton_file_create_location
- truxton_file_create_relation
- truxton_file_create_url
- truxton_file_create_usb
ETL Creation
- truxton_etl_add_command_line_argument
- truxton_etl_add_desired_file_type
- truxton_etl_create
- truxton_etl_destroy
- truxton_etl_get_description
- truxton_etl_get_id
- truxton_etl_get_message
- truxton_etl_get_stage_number
- truxton_etl_set_application_name
- truxton_etl_set_depot_type
- truxton_etl_set_depot_type_name
- truxton_etl_set_description
- truxton_etl_set_expander_identifier
- truxton_etl_set_expander_version
- truxton_etl_set_queue_name
- truxton_etl_set_stage_number
- truxton_etl_set_thread_safe
- truxton_etl_set_poly_file_expander
Debugging
- truxton_etl_send_me_file_id
- truxton_etl_send_me_files
- truxton_etl_send_me_hash
- truxton_etl_send_me_local_file
Message
- truxton_message_create
- truxton_message_destroy
- truxton_message_get_queue_is_empty
- truxton_message_set_queue_is_empty
- truxton_message_get_route_id
- truxton_message_set_route_id
- truxton_message_get_priority
- truxton_message_set_priority
- truxton_message_get_file_id
- truxton_message_set_file_id
- truxton_message_get_parent_id
- truxton_message_set_parent_id
- truxton_message_get_media_id
- truxton_message_set_media_id
- truxton_message_get_depot_id
- truxton_message_set_depot_id
- truxton_message_get_depot_offset
- truxton_message_set_depot_offset
- truxton_message_get_depot_length
- truxton_message_set_depot_length
- truxton_message_get_hash
- truxton_message_set_hash
- truxton_message_get_signature
- truxton_message_set_signature
- truxton_message_get_file_type
- truxton_message_set_file_type
- truxton_message_get_depot_filename
- truxton_message_set_depot_filename
- truxton_message_get_dont_route
- truxton_message_set_dont_route
- truxton_message_get_truxton
- truxton_message_set_truxton
String Map
- truxton_string_map_create
- truxton_string_map_destroy
- truxton_string_map_set
- truxton_string_map_get
- truxton_string_map_copy
- truxton_string_map_clone
- truxton_string_map_size
File Export
- truxton_file_export_create
- truxton_file_export_destroy
- truxton_file_export_set_option
- truxton_file_export_get_where_clause
- truxton_file_export_add_string_criteria
- truxton_file_export_add_integer_criteria
- truxton_file_export_set_truxton
- truxton_file_export_where_clause
Artifacts
uint64_t truxton_artifact_create(uint64_t truxton_handle); void truxton_artifact_destroy(uint64_t entity_handle); int truxton_artifact_save(uint64_t entity_handle); uint64_t truxton_artifact_get_data_type(uint64_t entity_handle); void truxton_artifact_set_data_type(uint64_t entity_handle, uint64_t data_type); void truxton_artifact_get_file_id(uint64_t entity_handle, char* buffer, size_t buffer_size); void truxton_artifact_set_file_id(uint64_t entity_handle, char const* guid); void truxton_artifact_get_id(uint64_t entity_handle, char* buffer, size_t buffer_size); uint64_t truxton_artifact_get_length(uint64_t entity_handle); void truxton_artifact_set_length(uint64_t entity_handle, uint64_t length); void truxton_artifact_get_media_id(uint64_t entity_handle, char* buffer, size_t buffer_size); void truxton_artifact_set_media_id(uint64_t entity_handle, char const* guid); void truxton_artifact_get_object_id(uint64_t entity_handle, char* buffer, size_t buffer_size); void truxton_artifact_set_object_id(uint64_t entity_handle, char const* guid); uint64_t truxton_artifact_get_object_type(uint64_t entity_handle); void truxton_artifact_set_object_type(uint64_t entity_handle, uint32_t artifact_type); uint64_t truxton_artifact_get_offset(uint64_t entity_handle); void truxton_artifact_set_offset(uint64_t entity_handle, uint64_t offset); void truxton_artifact_get_value(uint64_t entity_handle, char* buffer, size_t buffer_size); void truxton_artifact_set_value(uint64_t entity_handle, char const* value);
Event
uint64_t truxton_event_create(uint64_t truxton_handle); void truxton_event_destroy(uint64_t event_handle); int truxton_event_save(uint64_t event_handle); void truxton_event_get_id(uint64_t event_handle, char* buffer, size_t buffer_size); void truxton_event_set_title(uint64_t event_handle, char const* value); void truxton_event_get_title(uint64_t event_handle, char* buffer, size_t buffer_size); void truxton_event_set_description(uint64_t event_handle, char const* value); void truxton_event_get_description(uint64_t event_handle, char* buffer, size_t buffer_size); uint64_t truxton_event_get_start(uint64_t event_handle); void truxton_event_set_start(uint64_t event_handle, uint64_t value); uint64_t truxton_event_get_end(uint64_t event_handle); void truxton_event_set_end(uint64_t event_handle, uint64_t value); uint64_t truxton_event_get_type(uint64_t event_handle); void truxton_event_set_type(uint64_t event_handle, uint64_t value); void truxton_event_get_media_id(uint64_t event_handle, char* buffer, size_t buffer_size); void truxton_event_set_media_id(uint64_t event_handle, char const* guid); void truxton_event_get_file_id(uint64_t event_handle, char* buffer, size_t buffer_size); void truxton_event_set_file_id(uint64_t event_handle, char const* guid);
EXIF (Camera Information)
uint64_t truxton_exif_create(uint64_t truxton_handle); void truxton_exif_destroy(uint64_t exif_handle); int truxton_exif_save(uint64_t exif_handle); void truxton_exif_get_id(uint64_t exif_handle, char* buffer, size_t buffer_size); void truxton_exif_get_file_id(uint64_t exif_handle, char* buffer, size_t buffer_size); void truxton_exif_set_file_id(uint64_t exif_handle, char const* guid); void truxton_exif_get_media_id(uint64_t exif_handle, char* buffer, size_t buffer_size); void truxton_exif_set_media_id(uint64_t exif_handle, char const* guid); uint64_t truxton_exif_get_gps_time(uint64_t exif_handle); void truxton_exif_set_gps_time(uint64_t exif_handle, uint64_t value); uint64_t truxton_exif_get_gps_time_offset(uint64_t exif_handle); void truxton_exif_set_gps_time_offset(uint64_t exif_handle, uint64_t value); uint64_t truxton_exif_get_device_time(uint64_t exif_handle); void truxton_exif_set_device_time(uint64_t exif_handle, uint64_t value); uint64_t truxton_exif_get_device_time_offset(uint64_t exif_handle); void truxton_exif_set_device_time_offset(uint64_t exif_handle, uint64_t value); double truxton_exif_get_latitude(uint64_t exif_handle); void truxton_exif_set_latitude(uint64_t exif_handle, double value); uint64_t truxton_exif_get_latitude_offset(uint64_t exif_handle); void truxton_exif_set_latitude_offset(uint64_t exif_handle, uint64_t value); double truxton_exif_get_longitude(uint64_t exif_handle); void truxton_exif_set_longitude(uint64_t exif_handle, double value); uint64_t truxton_exif_get_longitude_offset(uint64_t exif_handle); void truxton_exif_set_longitude_offset(uint64_t exif_handle, uint64_t value); double truxton_exif_get_altitude(uint64_t exif_handle); void truxton_exif_set_altitude(uint64_t exif_handle, double value); uint64_t truxton_exif_get_altitude_offset(uint64_t exif_handle); void truxton_exif_set_altitude_offset(uint64_t exif_handle, uint64_t value); double truxton_exif_get_heading(uint64_t exif_handle); void truxton_exif_set_heading(uint64_t exif_handle, double value); uint64_t truxton_exif_get_heading_offset(uint64_t exif_handle); void truxton_exif_set_heading_offset(uint64_t exif_handle, uint64_t value); double truxton_exif_get_focal_length(uint64_t exif_handle); void truxton_exif_set_focal_length(uint64_t exif_handle, double value); uint64_t truxton_exif_get_focal_length_offset(uint64_t exif_handle); void truxton_exif_set_focal_length_offset(uint64_t exif_handle, uint64_t value); uint64_t truxton_exif_get_shutter_count(uint64_t exif_handle); void truxton_exif_set_shutter_count(uint64_t exif_handle, uint64_t value); uint64_t truxton_exif_get_shutter_count_offset(uint64_t exif_handle); void truxton_exif_set_shutter_count_offset(uint64_t exif_handle, uint64_t value); uint64_t truxton_exif_get_thumbnail_offset(uint64_t exif_handle); void truxton_exif_set_thumbnail_offset(uint64_t exif_handle, uint64_t value); uint64_t truxton_exif_get_thumbnail_offset_offset(uint64_t exif_handle); void truxton_exif_set_thumbnail_offset_offset(uint64_t exif_handle, uint64_t value); uint64_t truxton_exif_get_thumbnail_length(uint64_t exif_handle); void truxton_exif_set_thumbnail_length(uint64_t exif_handle, uint64_t value); uint64_t truxton_exif_get_thumbnail_length_offset(uint64_t exif_handle); void truxton_exif_set_thumbnail_length_offset(uint64_t exif_handle, uint64_t value); void truxton_exif_get_make(uint64_t exif_handle, char* buffer, size_t buffer_size); void truxton_exif_set_make(uint64_t exif_handle, char const* guid); uint64_t truxton_exif_get_make_offset(uint64_t exif_handle); void truxton_exif_set_make_offset(uint64_t exif_handle, uint64_t value); void truxton_exif_get_model(uint64_t exif_handle, char* buffer, size_t buffer_size); void truxton_exif_set_model(uint64_t exif_handle, char const* guid); uint64_t truxton_exif_get_model_offset(uint64_t exif_handle); void truxton_exif_set_model_offset(uint64_t exif_handle, uint64_t value); void truxton_exif_get_body_serial_number(uint64_t exif_handle, char* buffer, size_t buffer_size); void truxton_exif_set_body_serial_number(uint64_t exif_handle, char const* guid); uint64_t truxton_exif_get_body_serial_number_offset(uint64_t exif_handle); void truxton_exif_set_body_serial_number_offset(uint64_t exif_handle, uint64_t value); void truxton_exif_get_lens_serial_number(uint64_t exif_handle, char* buffer, size_t buffer_size); void truxton_exif_set_lens_serial_number(uint64_t exif_handle, char const* guid); uint64_t truxton_exif_get_lens_serial_number_offset(uint64_t exif_handle); void truxton_exif_set_lens_serial_number_offset(uint64_t exif_handle, uint64_t value);
Geographic Location
uint64_t truxton_location_create(uint64_t truxton_handle); void truxton_location_destroy(uint64_t location_handle); int truxton_location_save(uint64_t location_handle); void truxton_location_get_id(uint64_t location_handle, char* buffer, size_t buffer_size); void truxton_location_get_file_id(uint64_t location_handle, char* buffer, size_t buffer_size); void truxton_location_set_file_id(uint64_t location_handle, char const* guid); void truxton_location_get_media_id(uint64_t location_handle, char* buffer, size_t buffer_size); void truxton_location_set_media_id(uint64_t location_handle, char const* guid); double truxton_location_get_altitude(uint64_t location_handle); void truxton_location_set_altitude(uint64_t location_handle, double value); void truxton_location_get_label(uint64_t location_handle, char* buffer, size_t buffer_size); void truxton_location_set_label(uint64_t location_handle, char const* value); double truxton_location_get_latitude(uint64_t location_handle); void truxton_location_set_latitude(uint64_t location_handle, double value); double truxton_location_get_longitude(uint64_t location_handle); void truxton_location_set_longitude(uint64_t location_handle, double value); uint64_t truxton_location_get_type(uint64_t location_handle); void truxton_location_set_type(uint64_t location_handle, uint64_t value); uint64_t truxton_location_get_when(uint64_t location_handle); void truxton_location_set_when(uint64_t location_handle, uint64_t value);
Website Visit
uint64_t truxton_url_create(uint64_t truxton_handle); void truxton_url_destroy(uint64_t url_handle); int truxton_url_save(uint64_t url_handle);
void truxton_url_get_account(uint64_t url_handle, char* buffer, size_t buffer_size); void truxton_url_set_account(uint64_t url_handle, char const* value); uint64_t truxton_url_get_account_offset(uint64_t url_handle); void truxton_url_set_account_offset(uint64_t url_handle, uint64_t value); void truxton_url_get_file_id(uint64_t url_handle, char* buffer, size_t buffer_size); void truxton_url_set_file_id(uint64_t url_handle, char const* guid); uint64_t truxton_url_get_format(uint64_t url_handle); void truxton_url_set_format(uint64_t url_handle, uint64_t value); void truxton_url_get_id(uint64_t url_handle, char* buffer, size_t buffer_size); void truxton_url_get_local_filename(uint64_t url_handle, char* buffer, size_t buffer_size); void truxton_url_set_local_filename(uint64_t url_handle, char const* value); void truxton_url_get_media_id(uint64_t url_handle, char* buffer, size_t buffer_size); void truxton_url_set_media_id(uint64_t url_handle, char const* guid); uint64_t truxton_url_get_method(uint64_t url_handle); void truxton_url_set_method(uint64_t url_handle, uint64_t value); uint64_t truxton_url_get_type(uint64_t url_handle); void truxton_url_set_type(uint64_t url_handle, uint64_t value); void truxton_url_set_url(uint64_t url_handle, char const* value); void truxton_url_get_url(uint64_t url_handle, char* buffer, size_t buffer_size); uint64_t truxton_url_get_url_offset(uint64_t url_handle); void truxton_url_set_url_offset(uint64_t url_handle, uint64_t value); uint64_t truxton_url_get_when(uint64_t url_handle); void truxton_url_set_when(uint64_t url_handle, uint64_t value);
USB Device
uint64_t truxton_usb_create(uint64_t truxton_handle); void truxton_usb_destroy(uint64_t usb_handle); int truxton_usb_save(uint64_t usb_handle);
void truxton_usb_get_id(uint64_t usb_handle, char* buffer, size_t buffer_size); void truxton_usb_get_file_id(uint64_t usb_handle, char* buffer, size_t buffer_size); void truxton_usb_set_file_id(uint64_t usb_handle, char const* guid); void truxton_usb_get_media_id(uint64_t usb_handle, char* buffer, size_t buffer_size); void truxton_usb_set_media_id(uint64_t usb_handle, char const* guid); void truxton_usb_get_device_id(uint64_t usb_handle, char* buffer, size_t buffer_size); void truxton_usb_set_device_id(uint64_t usb_handle, char const* guid); uint64_t truxton_usb_get_device_type(uint64_t usb_handle); void truxton_usb_set_device_type(uint64_t usb_handle, uint64_t value); uint64_t truxton_usb_get_file_offset(uint64_t usb_handle); void truxton_usb_set_file_offset(uint64_t usb_handle, uint64_t value); uint64_t truxton_usb_get_product_id(uint64_t usb_handle); void truxton_usb_set_product_id(uint64_t usb_handle, uint64_t value); uint64_t truxton_usb_get_revision(uint64_t usb_handle); void truxton_usb_set_revision(uint64_t usb_handle, uint64_t value); uint64_t truxton_usb_get_when(uint64_t usb_handle); void truxton_usb_set_when(uint64_t usb_handle, uint64_t value); uint64_t truxton_usb_get_vendor_id(uint64_t usb_handle); void truxton_usb_set_vendor_id(uint64_t usb_handle, uint64_t value);
Relation
uint64_t truxton_relation_create(uint64_t truxton_handle); void truxton_relation_destroy(uint64_t relation_handle); int truxton_relation_save(uint64_t relation_handle); void truxton_relation_get_a_id(uint64_t relation_handle, char* buffer, size_t buffer_size); void truxton_relation_set_a_id(uint64_t relation_handle, char const* guid); void truxton_relation_get_b_id(uint64_t relation_handle, char* buffer, size_t buffer_size); void truxton_relation_set_b_id(uint64_t relation_handle, char const* guid); void truxton_relation_get_source_id(uint64_t relation_handle, char* buffer, size_t buffer_size); void truxton_relation_set_source_id(uint64_t relation_handle, char const* guid); uint64_t truxton_relation_get_a_type(uint64_t relation_handle); void truxton_relation_set_a_type(uint64_t relation_handle, uint64_t value); uint64_t truxton_relation_get_b_type(uint64_t relation_handle); void truxton_relation_set_b_type(uint64_t relation_handle, uint64_t value); uint64_t truxton_relation_get_source_type(uint64_t relation_handle); void truxton_relation_set_source_type(uint64_t relation_handle, uint64_t value); uint64_t truxton_relation_get_relation(uint64_t relation_handle); void truxton_relation_set_relation(uint64_t relation_handle, uint64_t value);