2 * Copyright (C) 2007 by INdT
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 * @author Gustavo Sverzut Barbieri <gustavo.barbieri@openbossa.org>
21 #ifndef _LIGHTMEDIASCANNER_PRIVATE_H_
22 #define _LIGHTMEDIASCANNER_PRIVATE_H_ 1
25 # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
26 # define GNUC_NON_NULL(...) __attribute__((nonnull(__VA_ARGS__)))
28 # define GNUC_NON_NULL(...)
31 # define GNUC_NON_NULL(...)
34 #include "lightmediascanner.h"
35 #include "lightmediascanner_plugin.h"
36 #include "lightmediascanner_charset_conv.h"
37 #include <sys/types.h>
42 #define PATH_SIZE PATH_MAX
49 /* info to be carried along lms_process() and lms_check() */
65 struct parser *parsers;
67 lms_charset_conv_t *cs_conv;
70 unsigned int commit_interval;
71 unsigned int is_processing:1;
72 unsigned int stop_processing:1;
75 int lms_parser_del_int(lms_t *lms, int i) GNUC_NON_NULL(1);
76 int lms_create_pipes(struct pinfo *pinfo) GNUC_NON_NULL(1);
77 int lms_close_pipes(struct pinfo *pinfo) GNUC_NON_NULL(1);
78 int lms_create_slave(struct pinfo *pinfo, int (*work)(lms_t *lms, struct fds *fds)) GNUC_NON_NULL(1, 2);
79 int lms_restart_slave(struct pinfo *pinfo, int (*work)(lms_t *lms, struct fds *fds)) GNUC_NON_NULL(1, 2);
80 int lms_finish_slave(struct pinfo *pinfo, int (*finish)(const struct fds *fds)) GNUC_NON_NULL(1, 2);
82 int lms_parsers_setup(lms_t *lms, sqlite3 *db) GNUC_NON_NULL(1, 2);
83 int lms_parsers_start(lms_t *lms, sqlite3 *db) GNUC_NON_NULL(1, 2);
84 int lms_parsers_finish(lms_t *lms, sqlite3 *db) GNUC_NON_NULL(1, 2);
85 int lms_parsers_check_using(lms_t *lms, void **parser_match, struct lms_file_info *finfo) GNUC_NON_NULL(1, 2, 3);
86 int lms_parsers_run(lms_t *lms, sqlite3 *db, void **parser_match, struct lms_file_info *finfo) GNUC_NON_NULL(1, 2, 3, 4);
89 #endif /* _LIGHTMEDIASCANNER_PRIVATE_H_ */