src/lib/lightmediascanner_db_common.c File Reference

#include "lightmediascanner_db_private.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

Include dependency graph for lightmediascanner_db_common.c:

Go to the source code of this file.

Functions

int sqlite3_prepare_v2 (sqlite3 *db, const char *sql, int len, sqlite3_stmt **stmt, const char **tail)
int sqlite3_clear_bindings (sqlite3_stmt *stmt)
int lms_db_create_trigger_if_not_exists (sqlite3 *db, const char *sql)
sqlite3_stmt * lms_db_compile_stmt (sqlite3 *db, const char *sql)
int lms_db_finalize_stmt (sqlite3_stmt *stmt, const char *name)
int lms_db_reset_stmt (sqlite3_stmt *stmt)
int lms_db_bind_text (sqlite3_stmt *stmt, int col, const char *text, int len)
int lms_db_bind_blob (sqlite3_stmt *stmt, int col, const void *blob, int len)
int lms_db_bind_int64 (sqlite3_stmt *stmt, int col, int64_t value)
int lms_db_bind_int64_or_null (sqlite3_stmt *stmt, int col, int64_t *p_value)
int lms_db_bind_int (sqlite3_stmt *stmt, int col, int value)
int lms_db_bind_double (sqlite3_stmt *stmt, int col, double value)
int lms_db_table_version_get (sqlite3 *db, const char *table)
int lms_db_table_version_set (sqlite3 *db, const char *table, unsigned int version)
int lms_db_table_update (sqlite3 *db, const char *table, unsigned int current_version, unsigned int last_version, const lms_db_table_updater_t *updaters)
int lms_db_table_update_if_required (sqlite3 *db, const char *table, unsigned int last_version, lms_db_table_updater_t *updaters)
int lms_db_cache_add (struct lms_db_cache *cache, const sqlite3 *db, void *data)
int lms_db_cache_del (struct lms_db_cache *cache, const sqlite3 *db, void *data)
int lms_db_cache_get (struct lms_db_cache *cache, const sqlite3 *db, void **pdata)
int lms_db_create_core_tables_if_required (sqlite3 *db)
sqlite3_stmt * lms_db_compile_stmt_begin_transaction (sqlite3 *db)
int lms_db_begin_transaction (sqlite3_stmt *stmt)
sqlite3_stmt * lms_db_compile_stmt_end_transaction (sqlite3 *db)
int lms_db_end_transaction (sqlite3_stmt *stmt)
sqlite3_stmt * lms_db_compile_stmt_get_file_info (sqlite3 *db)
int lms_db_get_file_info (sqlite3_stmt *stmt, struct lms_file_info *finfo)
sqlite3_stmt * lms_db_compile_stmt_update_file_info (sqlite3 *db)
int lms_db_update_file_info (sqlite3_stmt *stmt, const struct lms_file_info *finfo)
sqlite3_stmt * lms_db_compile_stmt_insert_file_info (sqlite3 *db)
int lms_db_insert_file_info (sqlite3_stmt *stmt, struct lms_file_info *finfo)
sqlite3_stmt * lms_db_compile_stmt_delete_file_info (sqlite3 *db)
int lms_db_delete_file_info (sqlite3_stmt *stmt, const struct lms_file_info *finfo)
sqlite3_stmt * lms_db_compile_stmt_set_file_dtime (sqlite3 *db)
int lms_db_set_file_dtime (sqlite3_stmt *stmt, const struct lms_file_info *finfo)
sqlite3_stmt * lms_db_compile_stmt_get_files (sqlite3 *db)
int lms_db_get_files (sqlite3_stmt *stmt, const char *path, int len)


Function Documentation

int lms_db_begin_transaction ( sqlite3_stmt *  stmt  ) 

Definition at line 532 of file lightmediascanner_db_common.c.

Referenced by lms_process_single_process().

int lms_db_bind_blob ( sqlite3_stmt *  stmt,
int  col,
const void *  blob,
int  len 
)

int lms_db_bind_double ( sqlite3_stmt *  stmt,
int  col,
double  value 
)

Definition at line 251 of file lightmediascanner_db_common.c.

int lms_db_bind_int ( sqlite3_stmt *  stmt,
int  col,
int  value 
)

int lms_db_bind_int64 ( sqlite3_stmt *  stmt,
int  col,
int64_t  value 
)

int lms_db_bind_int64_or_null ( sqlite3_stmt *  stmt,
int  col,
int64_t *  p_value 
)

Definition at line 210 of file lightmediascanner_db_common.c.

int lms_db_bind_text ( sqlite3_stmt *  stmt,
int  col,
const char *  text,
int  len 
)

int lms_db_cache_add ( struct lms_db_cache cache,
const sqlite3 *  db,
void *  data 
)

int lms_db_cache_del ( struct lms_db_cache cache,
const sqlite3 *  db,
void *  data 
)

int lms_db_cache_get ( struct lms_db_cache cache,
const sqlite3 *  db,
void **  pdata 
)

sqlite3_stmt* lms_db_compile_stmt ( sqlite3 *  db,
const char *  sql 
)

sqlite3_stmt* lms_db_compile_stmt_begin_transaction ( sqlite3 *  db  ) 

Definition at line 526 of file lightmediascanner_db_common.c.

References lms_db_compile_stmt().

Here is the call graph for this function:

sqlite3_stmt* lms_db_compile_stmt_delete_file_info ( sqlite3 *  db  ) 

Definition at line 711 of file lightmediascanner_db_common.c.

References lms_db_compile_stmt().

Here is the call graph for this function:

sqlite3_stmt* lms_db_compile_stmt_end_transaction ( sqlite3 *  db  ) 

Definition at line 553 of file lightmediascanner_db_common.c.

References lms_db_compile_stmt().

Here is the call graph for this function:

sqlite3_stmt* lms_db_compile_stmt_get_file_info ( sqlite3 *  db  ) 

Definition at line 580 of file lightmediascanner_db_common.c.

References lms_db_compile_stmt().

Here is the call graph for this function:

sqlite3_stmt* lms_db_compile_stmt_get_files ( sqlite3 *  db  ) 

Definition at line 776 of file lightmediascanner_db_common.c.

References lms_db_compile_stmt().

Here is the call graph for this function:

sqlite3_stmt* lms_db_compile_stmt_insert_file_info ( sqlite3 *  db  ) 

Definition at line 666 of file lightmediascanner_db_common.c.

References lms_db_compile_stmt().

Here is the call graph for this function:

sqlite3_stmt* lms_db_compile_stmt_set_file_dtime ( sqlite3 *  db  ) 

Definition at line 741 of file lightmediascanner_db_common.c.

References lms_db_compile_stmt().

Here is the call graph for this function:

sqlite3_stmt* lms_db_compile_stmt_update_file_info ( sqlite3 *  db  ) 

Definition at line 622 of file lightmediascanner_db_common.c.

References lms_db_compile_stmt().

Here is the call graph for this function:

int lms_db_create_core_tables_if_required ( sqlite3 *  db  ) 

Definition at line 475 of file lightmediascanner_db_common.c.

int lms_db_create_trigger_if_not_exists ( sqlite3 *  db,
const char *  sql 
)

Definition at line 55 of file lightmediascanner_db_common.c.

int lms_db_delete_file_info ( sqlite3_stmt *  stmt,
const struct lms_file_info finfo 
)

Definition at line 717 of file lightmediascanner_db_common.c.

References lms_file_info::id, lms_db_bind_int64(), and lms_db_reset_stmt().

Here is the call graph for this function:

int lms_db_end_transaction ( sqlite3_stmt *  stmt  ) 

Definition at line 559 of file lightmediascanner_db_common.c.

Referenced by lms_process_single_process().

int lms_db_finalize_stmt ( sqlite3_stmt *  stmt,
const char *  name 
)

int lms_db_get_file_info ( sqlite3_stmt *  stmt,
struct lms_file_info finfo 
)

int lms_db_get_files ( sqlite3_stmt *  stmt,
const char *  path,
int  len 
)

Definition at line 783 of file lightmediascanner_db_common.c.

References lms_db_bind_blob().

Here is the call graph for this function:

int lms_db_insert_file_info ( sqlite3_stmt *  stmt,
struct lms_file_info finfo 
)

int lms_db_reset_stmt ( sqlite3_stmt *  stmt  ) 

int lms_db_set_file_dtime ( sqlite3_stmt *  stmt,
const struct lms_file_info finfo 
)

Definition at line 747 of file lightmediascanner_db_common.c.

References lms_file_info::dtime, lms_file_info::id, lms_db_bind_int(), lms_db_bind_int64(), and lms_db_reset_stmt().

Here is the call graph for this function:

int lms_db_table_update ( sqlite3 *  db,
const char *  table,
unsigned int  current_version,
unsigned int  last_version,
const lms_db_table_updater_t updaters 
)

Definition at line 337 of file lightmediascanner_db_common.c.

References lms_db_table_version_set().

Referenced by lms_db_table_update_if_required().

Here is the call graph for this function:

int lms_db_table_update_if_required ( sqlite3 *  db,
const char *  table,
unsigned int  last_version,
lms_db_table_updater_t updaters 
)

Definition at line 367 of file lightmediascanner_db_common.c.

References lms_db_table_update(), and lms_db_table_version_get().

Here is the call graph for this function:

int lms_db_table_version_get ( sqlite3 *  db,
const char *  table 
)

Definition at line 270 of file lightmediascanner_db_common.c.

References lms_db_bind_text(), lms_db_compile_stmt(), lms_db_finalize_stmt(), and lms_db_reset_stmt().

Referenced by lms_db_table_update_if_required().

Here is the call graph for this function:

int lms_db_table_version_set ( sqlite3 *  db,
const char *  table,
unsigned int  version 
)

Definition at line 304 of file lightmediascanner_db_common.c.

References lms_db_bind_int(), lms_db_bind_text(), lms_db_compile_stmt(), lms_db_finalize_stmt(), and lms_db_reset_stmt().

Referenced by lms_db_table_update().

Here is the call graph for this function:

int lms_db_update_file_info ( sqlite3_stmt *  stmt,
const struct lms_file_info finfo 
)

Definition at line 629 of file lightmediascanner_db_common.c.

References lms_file_info::dtime, lms_file_info::id, lms_db_bind_int(), lms_db_reset_stmt(), lms_file_info::mtime, and lms_file_info::size.

Here is the call graph for this function:

int sqlite3_clear_bindings ( sqlite3_stmt *  stmt  ) 

Definition at line 36 of file lightmediascanner_db_common.c.

Referenced by lms_db_reset_stmt().

int sqlite3_prepare_v2 ( sqlite3 *  db,
const char *  sql,
int  len,
sqlite3_stmt **  stmt,
const char **  tail 
)

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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author:
Gustavo Sverzut Barbieri <gustavo.barbieri@openbossa.org>

Definition at line 28 of file lightmediascanner_db_common.c.

Referenced by lms_db_compile_stmt().


Generated on Sun Oct 5 12:24:56 2008 for Light Media Scanner by  doxygen 1.5.6