2
* * Copyright (C) 2006-2011 Anders Brander <anders@brander.dk>,
3
* * Anders Kvist <akv@lnxbx.dk> and Klaus Post <klauspost@gmail.com>
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program 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.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
#include <rawstudio.h>
26
* Add a RSIoJob to be executed later
27
* @param job A RSIoJob. This will be unreffed upon completion
28
* @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads
29
* @param priority Lower value means higher priority
30
* @param user_data A pointer to pass to the callback
33
rs_io_idle_add_job(RSIoJob *job, gint idle_class, gint priority, gpointer user_data);
37
* @param path Absolute path to a file to prefetch
38
* @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads
39
* @return A pointer to a RSIoJob, this can be used with rs_io_idle_cancel()
42
rs_io_idle_prefetch_file(const gchar *path, gint idle_class);
45
* Load metadata belonging to a photo
46
* @param path Absolute path to a photo
47
* @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads
48
* @param callback A callback to call when the data is ready or NULL
49
* @param user_data Data to pass to the callback
50
* @return A pointer to a RSIoJob, this can be used with rs_io_idle_cancel()
53
rs_io_idle_read_metadata(const gchar *path, gint idle_class, RSGotMetadataCB callback, gpointer user_data);
56
* Compute a "Rawstudio checksum" of a file
57
* @param path Absolute path to a file
58
* @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads
59
* @param callback A callback to call when the data is ready or NULL
60
* @param user_data Data to pass to the callback
61
* @return A pointer to a RSIoJob, this can be used with rs_io_idle_cancel()
64
rs_io_idle_read_checksum(const gchar *path, gint idle_class, RSGotChecksumCB callback, gpointer user_data);
67
* Restore tags of a new directory or add tags to a photo
68
* @param filename Absolute path to a file to tags to
69
* @param tag_id The id of the tag to add.
70
* @param auto_tag Is the tag an automatically generated tag
71
* @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads
72
* @return A pointer to a RSIoJob, this can be used with rs_io_idle_cancel()
75
rs_io_idle_add_tag(const gchar *filename, gint tag_id, gboolean auto_tag, gint idle_class);
78
* Restore tags of a new directory
79
* @param path Absolute path to a directory to restore tags to
80
* @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads
81
* @return A pointer to a RSIoJob, this can be used with rs_io_idle_cancel()
84
rs_io_idle_restore_tags(const gchar *path, gint idle_class);
87
* Cancel a complete class of idle requests
88
* @param idle_class The class identifier
91
rs_io_idle_cancel_class(gint idle_class);
94
* Cancel a idle request
95
* @param request_id A request_id as returned by rs_io_idle_read_complete_file()
98
rs_io_idle_cancel(RSIoJob *job);
101
* Pause the worker threads
104
rs_io_idle_pause(void);
107
* Unpause the worker threads
110
rs_io_idle_unpause(void);
119
* Release the IO lock
125
* Returns the number of jobs left
128
rs_io_get_jobs_left(void);