DataBase-API


Data Structures

struct  lms_gps_info
struct  lms_image_info
struct  lms_audio_info
struct  lms_video_info
struct  lms_playlist_info

Typedefs

typedef struct lms_db_image lms_db_image_t
typedef struct lms_db_audio lms_db_audio_t
typedef struct lms_db_video lms_db_video_t
typedef struct lms_db_playlist lms_db_playlist_t

Functions

API lms_db_image_tlms_db_image_new (sqlite3 *db) GNUC_NON_NULL(1)
API int lms_db_image_start (lms_db_image_t *ldi) GNUC_NON_NULL(1)
API int lms_db_image_free (lms_db_image_t *ldi) GNUC_NON_NULL(1)
API int lms_db_image_add (lms_db_image_t *ldi, struct lms_image_info *info) GNUC_NON_NULL(1
API lms_db_audio_tlms_db_audio_new (sqlite3 *db) GNUC_NON_NULL(1)
API int lms_db_audio_start (lms_db_audio_t *lda) GNUC_NON_NULL(1)
API int lms_db_audio_free (lms_db_audio_t *lda) GNUC_NON_NULL(1)
API int lms_db_audio_add (lms_db_audio_t *lda, struct lms_audio_info *info) GNUC_NON_NULL(1
API lms_db_video_tlms_db_video_new (sqlite3 *db) GNUC_NON_NULL(1)
API int lms_db_video_start (lms_db_video_t *ldv) GNUC_NON_NULL(1)
API int lms_db_video_free (lms_db_video_t *ldv) GNUC_NON_NULL(1)
API int lms_db_video_add (lms_db_video_t *ldv, struct lms_video_info *info) GNUC_NON_NULL(1
API lms_db_playlist_tlms_db_playlist_new (sqlite3 *db) GNUC_NON_NULL(1)
API int lms_db_playlist_start (lms_db_playlist_t *ldp) GNUC_NON_NULL(1)
API int lms_db_playlist_free (lms_db_playlist_t *ldp) GNUC_NON_NULL(1)
API int lms_db_playlist_add (lms_db_playlist_t *ldp, struct lms_playlist_info *info) GNUC_NON_NULL(1

Detailed Description

Although Light Media Scanner uses SQLite3 and doesn't try to hide it from plugins/parsers, it does provide some utilities to make development easier and less error prone.

Typedef Documentation

typedef struct lms_db_audio lms_db_audio_t

Definition at line 97 of file lightmediascanner_db.h.

typedef struct lms_db_image lms_db_image_t

Definition at line 78 of file lightmediascanner_db.h.

typedef struct lms_db_playlist lms_db_playlist_t

Definition at line 125 of file lightmediascanner_db.h.

typedef struct lms_db_video lms_db_video_t

Definition at line 111 of file lightmediascanner_db.h.


Function Documentation

API int lms_db_audio_add ( lms_db_audio_t lda,
struct lms_audio_info info 
)

API int lms_db_audio_free ( lms_db_audio_t lda  ) 

Free audio DB access tool.

Unreference and possible free resources allocated to access tool.

This is usually called from plugin's finish() callback.

Parameters:
lda handle returned by lms_db_audio_new().
Returns:
On success 0 is returned.

Definition at line 402 of file lightmediascanner_db_audio.c.

References lms_db_cache_del(), and lms_db_finalize_stmt().

Referenced by lms_db_audio_new().

Here is the call graph for this function:

API lms_db_audio_t* lms_db_audio_new ( sqlite3 *  db  ) 

Create audio DB access tool.

Creates or get a reference to tools to access 'audios' table in an optimized and easy way.

This is usually called from plugin's setup() callback with the db got from ctxt.

Parameters:
db database connection.
Returns:
DB access tool handle.

Definition at line 297 of file lightmediascanner_db_audio.c.

References lms_db_audio_free(), lms_db_cache_add(), and lms_db_cache_get().

Here is the call graph for this function:

API int lms_db_audio_start ( lms_db_audio_t lda  ) 

Start audio DB access tool.

Compile SQL statements and other initialization functions.

This is usually called from plugin's start() callback.

Parameters:
lda handle returned by lms_db_audio_new().
Returns:
On success 0 is returned.

Definition at line 341 of file lightmediascanner_db_audio.c.

References lms_db_compile_stmt().

Here is the call graph for this function:

API int lms_db_image_add ( lms_db_image_t ldi,
struct lms_image_info info 
)

API int lms_db_image_free ( lms_db_image_t ldi  ) 

Free image DB access tool.

Unreference and possible free resources allocated to access tool.

This is usually called from plugin's finish() callback.

Parameters:
ldi handle returned by lms_db_image_new().
Returns:
On success 0 is returned.

Definition at line 193 of file lightmediascanner_db_image.c.

References lms_db_cache_del(), and lms_db_finalize_stmt().

Referenced by lms_db_image_new().

Here is the call graph for this function:

API lms_db_image_t* lms_db_image_new ( sqlite3 *  db  ) 

Create image DB access tool.

Creates or get a reference to tools to access 'images' table in an optimized and easy way.

This is usually called from plugin's setup() callback with the db got from ctxt.

Parameters:
db database connection.
Returns:
DB access tool handle.

Definition at line 117 of file lightmediascanner_db_image.c.

References lms_db_cache_add(), lms_db_cache_get(), and lms_db_image_free().

Here is the call graph for this function:

API int lms_db_image_start ( lms_db_image_t ldi  ) 

Start image DB access tool.

Compile SQL statements and other initialization functions.

This is usually called from plugin's start() callback.

Parameters:
ldi handle returned by lms_db_image_new().
Returns:
On success 0 is returned.

Definition at line 161 of file lightmediascanner_db_image.c.

References lms_db_compile_stmt().

Here is the call graph for this function:

API int lms_db_playlist_add ( lms_db_playlist_t ldp,
struct lms_playlist_info info 
)

API int lms_db_playlist_free ( lms_db_playlist_t ldp  ) 

Free playlist DB access tool.

Unreference and possible free resources allocated to access tool.

This is usually called from plugin's finish() callback.

Parameters:
ldp handle returned by lms_db_playlist_new().
Returns:
On success 0 is returned.

Definition at line 185 of file lightmediascanner_db_playlist.c.

References lms_db_cache_del(), and lms_db_finalize_stmt().

Referenced by lms_db_playlist_new().

Here is the call graph for this function:

API lms_db_playlist_t* lms_db_playlist_new ( sqlite3 *  db  ) 

Create playlist DB access tool.

Creates or get a reference to tools to access 'playlists' table in an optimized and easy way.

This is usually called from plugin's setup() callback with the db got from ctxt.

Parameters:
db database connection.
Returns:
DB access tool handle.

Definition at line 111 of file lightmediascanner_db_playlist.c.

References lms_db_cache_add(), lms_db_cache_get(), and lms_db_playlist_free().

Here is the call graph for this function:

API int lms_db_playlist_start ( lms_db_playlist_t ldp  ) 

Start playlist DB access tool.

Compile SQL statements and other initialization functions.

This is usually called from plugin's start() callback.

Parameters:
ldp handle returned by lms_db_playlist_new().
Returns:
On success 0 is returned.

Definition at line 155 of file lightmediascanner_db_playlist.c.

References lms_db_compile_stmt().

Here is the call graph for this function:

API int lms_db_video_add ( lms_db_video_t ldv,
struct lms_video_info info 
)

API int lms_db_video_free ( lms_db_video_t ldv  ) 

Free video DB access tool.

Unreference and possible free resources allocated to access tool.

This is usually called from plugin's finish() callback.

Parameters:
ldv handle returned by lms_db_video_new().
Returns:
On success 0 is returned.

Definition at line 197 of file lightmediascanner_db_video.c.

References lms_db_cache_del(), and lms_db_finalize_stmt().

Referenced by lms_db_video_new().

Here is the call graph for this function:

API lms_db_video_t* lms_db_video_new ( sqlite3 *  db  ) 

Create video DB access tool.

Creates or get a reference to tools to access 'videos' table in an optimized and easy way.

This is usually called from plugin's setup() callback with the db got from ctxt.

Parameters:
db database connection.
Returns:
DB access tool handle.

Definition at line 124 of file lightmediascanner_db_video.c.

References lms_db_cache_add(), lms_db_cache_get(), and lms_db_video_free().

Here is the call graph for this function:

API int lms_db_video_start ( lms_db_video_t ldv  ) 

Start video DB access tool.

Compile SQL statements and other initialization functions.

This is usually called from plugin's start() callback.

Parameters:
ldv handle returned by lms_db_video_new().
Returns:
On success 0 is returned.

Definition at line 168 of file lightmediascanner_db_video.c.

References lms_db_compile_stmt().

Here is the call graph for this function:


Generated on Wed Apr 22 23:56:01 2009 for Light Media Scanner by  doxygen 1.5.8