Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
import_jobs.h File Reference
#include "common/image.h"
#include "control/control.h"
#include "common/variables.h"
+ Include dependency graph for import_jobs.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dt_control_import_t
 

Typedefs

typedef enum dt_import_onconflict_t dt_import_onconflict_t
 Behaviour when a copy-on-import destination path already exists.
 
typedef struct dt_control_import_t dt_control_import_t
 

Enumerations

enum  dt_import_onconflict_t {
  DT_IMPORT_ONCONFLICT_SKIP = 0 ,
  DT_IMPORT_ONCONFLICT_OVERWRITE = 1 ,
  DT_IMPORT_ONCONFLICT_UNIQUE = 2
}
 Behaviour when a copy-on-import destination path already exists. More...
 

Functions

void dt_control_import_data_free (dt_control_import_t *data)
 
gchar * dt_build_filename_from_pattern (const char *const filename, const int index, dt_image_t *img, dt_control_import_t *data)
 Build a full path for a given image file, given a pattern.
 
int dt_control_import (dt_control_import_t data)
 Process a list of images to import with or without copying the files on an arbitrary hard-drive.
 

Typedef Documentation

◆ dt_control_import_t

◆ dt_import_onconflict_t

Behaviour when a copy-on-import destination path already exists.

SKIP is value 0 so the default (zero-initialized) behaviour of every existing caller is preserved: the existing destination is kept and imported as-is.

Enumeration Type Documentation

◆ dt_import_onconflict_t

Behaviour when a copy-on-import destination path already exists.

SKIP is value 0 so the default (zero-initialized) behaviour of every existing caller is preserved: the existing destination is kept and imported as-is.

Enumerator
DT_IMPORT_ONCONFLICT_SKIP 
DT_IMPORT_ONCONFLICT_OVERWRITE 
DT_IMPORT_ONCONFLICT_UNIQUE 

Definition at line 35 of file import_jobs.h.

Function Documentation

◆ dt_build_filename_from_pattern()

gchar * dt_build_filename_from_pattern ( const char *const  filename,
const int  index,
dt_image_t img,
dt_control_import_t data 
)

Build a full path for a given image file, given a pattern.

Parameters
filenameFull path of the original file
indexIncremental number in a sequence
imgdt_image_t object. Needs to be inited with EXIF fields prior to calling this function, otherwise EXIF variables are expanded to defaults/fallback.
dataImport options
Returns
gchar* The full path after variables expansion

Definition at line 76 of file import_jobs.c.

References _path_cleanup(), dt_control_import_t::base_folder, dt_control_import_t::datetime, DT_DEBUG_PRINT, dt_free, dt_print(), dt_util_normalize_path(), dt_variables_expand(), dt_variables_params_destroy(), dt_variables_params_init(), dt_variables_set_datetime(), FALSE, dt_control_import_t::jobcode, dt_control_import_t::target_dir, dt_control_import_t::target_file_pattern, dt_control_import_t::target_subfolder_pattern, and UNKNOWN_IMAGE.

Referenced by _import_copy_file(), _set_test_path(), and dt_folder_survey_destination_preview().

◆ dt_control_import()

int dt_control_import ( dt_control_import_t  data)

Process a list of images to import with or without copying the files on an arbitrary hard-drive.

Parameters
dataimport informations to transmit through the functions
Returns
int 0 when the import job was queued, non-zero on failure

Definition at line 762 of file import_jobs.c.

References _control_import_job_create(), dt_control_import_t::callback_data, darktable_t::control, darktable, dt_control_add_job(), dt_control_import_data_free(), DT_JOB_QUEUE_USER_FG, FALSE, dt_control_import_t::file_imported, dt_control_import_t::imgs, and IS_NULL_PTR.

Referenced by _folder_survey_job_run(), _process_file_list(), and _thumbtable_dnd_import().

◆ dt_control_import_data_free()