Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
folder_survey.h
Go to the documentation of this file.
1/*
2 This file is part of the Ansel project.
3 Copyright (C) 2026 Guillaume STUTIN.
4
5 Ansel is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9*/
10
11#ifndef DT_COMMON_FOLDER_SURVEY_H
12#define DT_COMMON_FOLDER_SURVEY_H
13
14#include <glib.h>
15
20#define DT_FOLDER_SURVEY_STYLES_CONF_KEY "studio_capture/styles"
21#define DT_FOLDER_SURVEY_STYLES_SEPARATOR "\x1f"
22
30
40
46
51
61gboolean dt_folder_survey_can_start(const char **message);
62
67
76
82
88
89/* Two questions this module needs a user for, and cannot ask itself.
90 *
91 * The resume-at-startup prompt is pure GUI orchestration (ask, switch view, start) and
92 * lives whole in gui/common/folder_survey_gui.c; only the session marker below is backend.
93 * The pending-import prompt is interleaved with private session state, so it is inverted
94 * instead: the backend asks through a handler the GUI registers.
95 */
96
103typedef gboolean (*dt_folder_survey_confirm_import_handler_t)(int new_files);
104
107
117
122
130
135#endif // DT_COMMON_FOLDER_SURVEY_H
int dt_folder_survey_start()
Validate the persisted configuration and start monitoring.
void dt_folder_survey_cleanup()
Release folder survey state after control workers have stopped.
gboolean dt_folder_survey_session_was_active()
TRUE when the previous application session quit while monitoring.
char * dt_folder_survey_destination_preview()
Build the expanded destination path of a sample file from the current configuration,...
gboolean dt_folder_survey_is_active()
TRUE while the periodic folder scan is running.
gboolean(* dt_folder_survey_confirm_import_handler_t)(int new_files)
void dt_folder_survey_stop()
Stop new scans before control workers begin shutting down.
void dt_folder_survey_forget_session()
Persist the cleared session marker, so resume is not proposed again.
void dt_folder_survey_absorb_new_files()
Record every file currently in the surveyed folder as already handled, so restarting the survey will ...
gboolean dt_folder_survey_can_start(const char **message)
Check, without any side effect, whether the persisted configuration has everything dt_folder_survey_s...
gboolean dt_folder_survey_take_session_marker()
Consume the "a session was monitoring when we last closed" marker.
void dt_folder_survey_init()
Initialize the folder survey state from the persisted configuration.
void dt_folder_survey_halt()
User-requested stop: end monitoring and clear the persisted session marker so the next application st...
void dt_folder_survey_set_confirm_import_handler(dt_folder_survey_confirm_import_handler_t handler)
int dt_folder_survey_count_new_files()
Count files in the surveyed folder that are unknown to the persisted baseline, i.e....