#include <sys/wait.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lightmediascanner.h"
#include "lightmediascanner_private.h"
#include "lightmediascanner_db_private.h"
Include dependency graph for lightmediascanner_process.c:
Go to the source code of this file.
Defines | |
#define | _GNU_SOURCE |
Functions | |
int | lms_parsers_setup (lms_t *lms, sqlite3 *db) |
int | lms_parsers_start (lms_t *lms, sqlite3 *db) |
int | lms_parsers_finish (lms_t *lms, sqlite3 *db) |
int | lms_parsers_check_using (lms_t *lms, void **parser_match, struct lms_file_info *finfo) |
int | lms_parsers_run (lms_t *lms, sqlite3 *db, void **parser_match, struct lms_file_info *finfo) |
int | lms_close_pipes (struct pinfo *pinfo) |
int | lms_create_pipes (struct pinfo *pinfo) |
int | lms_create_slave (struct pinfo *pinfo, int(*work)(lms_t *lms, struct fds *fds)) |
int | lms_finish_slave (struct pinfo *pinfo, int(*finish)(const struct fds *fds)) |
int | lms_restart_slave (struct pinfo *pinfo, int(*work)(lms_t *lms, struct fds *fds)) |
int | lms_process (lms_t *lms, const char *top_path) |
#define _GNU_SOURCE |
Copyright (C) 2007 by INdT
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Definition at line 25 of file lightmediascanner_process.c.
int lms_close_pipes | ( | struct pinfo * | pinfo | ) |
Definition at line 566 of file lightmediascanner_process.c.
References pinfo::master, and pinfo::slave.
Referenced by lms_check(), and lms_process().
int lms_create_pipes | ( | struct pinfo * | pinfo | ) |
Definition at line 577 of file lightmediascanner_process.c.
References pinfo::master, pinfo::poll, fds::r, pinfo::slave, and fds::w.
Referenced by lms_check(), and lms_process().
Definition at line 604 of file lightmediascanner_process.c.
References pinfo::child, pinfo::lms, lms_free(), pinfo::master, and pinfo::slave.
Here is the call graph for this function:
Definition at line 641 of file lightmediascanner_process.c.
References pinfo::child, and pinfo::master.
int lms_parsers_check_using | ( | lms_t * | lms, | |
void ** | parser_match, | |||
struct lms_file_info * | finfo | |||
) |
Definition at line 367 of file lightmediascanner_process.c.
References lms_file_info::base, lms_plugin::match, lms::n_parsers, lms::parsers, lms_file_info::path, lms_file_info::path_len, and parser::plugin.
int lms_parsers_finish | ( | lms_t * | lms, | |
sqlite3 * | db | |||
) |
Definition at line 345 of file lightmediascanner_process.c.
References lms_plugin::finish, lms::n_parsers, lms::parsers, and parser::plugin.
int lms_parsers_run | ( | lms_t * | lms, | |
sqlite3 * | db, | |||
void ** | parser_match, | |||
struct lms_file_info * | finfo | |||
) |
Definition at line 387 of file lightmediascanner_process.c.
References lms::n_parsers, lms_plugin::parse, lms::parsers, and parser::plugin.
int lms_parsers_setup | ( | lms_t * | lms, | |
sqlite3 * | db | |||
) |
Definition at line 293 of file lightmediascanner_process.c.
References lms_parser_del_int(), lms::n_parsers, lms::parsers, parser::plugin, and lms_plugin::setup.
Here is the call graph for this function:
int lms_parsers_start | ( | lms_t * | lms, | |
sqlite3 * | db | |||
) |
Definition at line 319 of file lightmediascanner_process.c.
References lms_parser_del_int(), lms::n_parsers, lms::parsers, parser::plugin, and lms_plugin::start.
Here is the call graph for this function:
int lms_process | ( | lms_t * | lms, | |
const char * | top_path | |||
) |
Process the given directory.
This will add or update media found in the given directory or its children.
lms | previously allocated Light Media Scanner instance. | |
top_path | top directory to scan. |
Definition at line 821 of file lightmediascanner_process.c.
References lms::is_processing, pinfo::lms, lms_close_pipes(), lms_create_pipes(), lms_create_slave(), lms_finish_slave(), lms::parsers, and PATH_SIZE.
Here is the call graph for this function:
Definition at line 664 of file lightmediascanner_process.c.
References pinfo::child, lms_create_slave(), and pinfo::poll.
Here is the call graph for this function: