Ansel
0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
metadata_repository.h
Go to the documentation of this file.
1
/*
2
This file is part of darktable,
3
Copyright (C) 2026 Aurélien PIERRE.
4
5
darktable 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
darktable is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with darktable. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
34
35
#ifndef DT_DATABASE_METADATA_REPOSITORY_H
36
#define DT_DATABASE_METADATA_REPOSITORY_H
37
38
#include <glib.h>
39
#include <stdint.h>
40
41
#ifdef __cplusplus
42
extern
"C"
{
43
#endif
44
45
G_BEGIN_DECLS
46
54
GList *
dt_metadata_repository_get_values
(
const
int32_t imgid,
const
int
keyid);
55
63
GList *
dt_metadata_repository_get_all
(
const
int32_t imgid);
64
67
void
dt_metadata_repository_remove
(
const
int32_t imgid,
const
char
*keyid_list);
68
70
typedef
struct
dt_metadata_row_t
71
{
72
int32_t
imgid
;
73
int
keyid
;
74
const
char
*
value
;
75
}
dt_metadata_row_t
;
76
85
void
dt_metadata_repository_add
(
const
dt_metadata_row_t
*rows,
const
size_t
count);
86
93
int32_t
dt_metadata_repository_find_image_by_value
(
const
char
*
value
);
94
96
typedef
void
(*
dt_metadata_repository_row_cb
)(
void
*user_data,
const
int
keyid,
const
char
*
value
);
97
99
void
dt_metadata_repository_foreach
(
const
int32_t imgid,
dt_metadata_repository_row_cb
cb,
100
void
*user_data);
101
104
typedef
void
(*
dt_metadata_repository_selected_cb
)(
void
*user_data,
const
int
keyid,
105
const
char
*
value
,
const
uint32_t count);
106
114
void
dt_metadata_repository_foreach_selected
(
dt_metadata_repository_selected_cb
cb,
115
void
*user_data);
116
118
void
dt_metadata_repository_cleanup
(
void
);
119
120
G_END_DECLS
121
122
123
#ifdef __cplusplus
124
}
125
#endif
126
127
#endif
// DT_DATABASE_METADATA_REPOSITORY_H
128
129
// clang-format off
130
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
131
// vim: shiftwidth=2 expandtab tabstop=2 cindent
132
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
133
// clang-format on
void
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
value
dev roi_request value
Definition
dev_roi_request.c:200
dt_metadata_repository_get_values
G_BEGIN_DECLS GList * dt_metadata_repository_get_values(const int32_t imgid, const int keyid)
Values stored under keyid, ordered by value.
Definition
metadata_repository.c:28
dt_metadata_repository_remove
void dt_metadata_repository_remove(const int32_t imgid, const char *keyid_list)
Delete the rows of imgid whose key is in keyid_list, a comma-separated list of decimal key ids....
Definition
metadata_repository.c:91
dt_metadata_repository_get_all
GList * dt_metadata_repository_get_all(const int32_t imgid)
Every (key, value) pair of imgid, as a flat list.
Definition
metadata_repository.c:69
dt_metadata_repository_selected_cb
void(* dt_metadata_repository_selected_cb)(void *user_data, const int keyid, const char *value, const uint32_t count)
One distinct (key, value) across the selection, and how many selected images carry it.
Definition
metadata_repository.h:104
dt_metadata_repository_foreach_selected
void dt_metadata_repository_foreach_selected(dt_metadata_repository_selected_cb cb, void *user_data)
Every distinct (key, value) pair across main.selected_images, ordered by value.
Definition
metadata_repository.c:163
dt_metadata_repository_row_cb
void(* dt_metadata_repository_row_cb)(void *user_data, const int keyid, const char *value)
One main.meta_data row: its key id and its value.
Definition
metadata_repository.h:96
dt_metadata_repository_cleanup
void dt_metadata_repository_cleanup(void)
Finalise the prepared statements. See dt_colorlabel_repository_cleanup().
Definition
metadata_repository.c:184
dt_metadata_repository_foreach
void dt_metadata_repository_foreach(const int32_t imgid, dt_metadata_repository_row_cb cb, void *user_data)
Every metadata row of imgid, in row order.
Definition
metadata_repository.c:149
dt_metadata_repository_find_image_by_value
int32_t dt_metadata_repository_find_image_by_value(const char *value)
The first image carrying value under any key, or -1.
Definition
metadata_repository.c:133
dt_metadata_repository_add
void dt_metadata_repository_add(const dt_metadata_row_t *rows, const size_t count)
Insert count rows as a single multi-VALUES statement.
Definition
metadata_repository.c:106
dt_metadata_row_t
Definition
metadata_repository.h:71
dt_metadata_row_t::value
const char * value
Definition
metadata_repository.h:74
dt_metadata_row_t::imgid
int32_t imgid
Definition
metadata_repository.h:72
dt_metadata_row_t::keyid
int keyid
Definition
metadata_repository.h:73
src
database
metadata_repository.h
Generated by
1.15.0