2009-06-07 12:56:35 -04:00
|
|
|
|
|
|
|
#ifndef __DB_H__
|
|
|
|
#define __DB_H__
|
|
|
|
|
2009-06-07 14:49:13 -04:00
|
|
|
#include <time.h>
|
2009-06-11 17:17:17 -04:00
|
|
|
#include <stddef.h>
|
2009-06-07 12:56:35 -04:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2017-06-19 15:52:01 -04:00
|
|
|
#include "outputs.h"
|
2009-06-07 12:56:35 -04:00
|
|
|
|
|
|
|
enum index_type {
|
|
|
|
I_NONE,
|
|
|
|
I_FIRST,
|
|
|
|
I_LAST,
|
|
|
|
I_SUB
|
|
|
|
};
|
|
|
|
|
2010-04-24 04:20:26 -04:00
|
|
|
enum sort_type {
|
|
|
|
S_NONE = 0,
|
|
|
|
S_NAME,
|
|
|
|
S_ALBUM,
|
2010-10-09 09:57:34 -04:00
|
|
|
S_ARTIST,
|
2014-03-11 18:20:29 -04:00
|
|
|
S_PLAYLIST,
|
2015-02-23 12:43:38 -05:00
|
|
|
S_YEAR,
|
2015-05-26 15:10:28 -04:00
|
|
|
S_GENRE,
|
|
|
|
S_COMPOSER,
|
|
|
|
S_DISC,
|
|
|
|
S_TRACK,
|
2015-05-29 23:31:54 -04:00
|
|
|
S_VPATH,
|
2016-12-04 02:18:33 -05:00
|
|
|
S_POS,
|
|
|
|
S_SHUFFLE_POS,
|
2010-04-24 04:20:26 -04:00
|
|
|
};
|
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
#define Q_F_BROWSE (1 << 15)
|
|
|
|
|
|
|
|
enum query_type {
|
2015-05-29 23:31:54 -04:00
|
|
|
Q_ITEMS = 1,
|
|
|
|
Q_PL = 2,
|
2017-01-04 17:20:59 -05:00
|
|
|
Q_FIND_PL = 3,
|
|
|
|
Q_PLITEMS = 4,
|
|
|
|
Q_GROUP_ALBUMS = 5,
|
|
|
|
Q_GROUP_ARTISTS = 6,
|
|
|
|
Q_GROUP_ITEMS = 7,
|
|
|
|
Q_COUNT_ITEMS = 8,
|
|
|
|
Q_BROWSE_ARTISTS = Q_F_BROWSE | 1,
|
|
|
|
Q_BROWSE_ALBUMS = Q_F_BROWSE | 2,
|
|
|
|
Q_BROWSE_GENRES = Q_F_BROWSE | 3,
|
|
|
|
Q_BROWSE_COMPOSERS = Q_F_BROWSE | 4,
|
|
|
|
Q_GROUP_DIRS = Q_F_BROWSE | 5,
|
|
|
|
Q_BROWSE_YEARS = Q_F_BROWSE | 6,
|
|
|
|
Q_BROWSE_DISCS = Q_F_BROWSE | 7,
|
|
|
|
Q_BROWSE_TRACKS = Q_F_BROWSE | 8,
|
|
|
|
Q_BROWSE_VPATH = Q_F_BROWSE | 9,
|
|
|
|
Q_BROWSE_PATH = Q_F_BROWSE | 10,
|
2009-06-07 12:56:35 -04:00
|
|
|
};
|
|
|
|
|
2014-01-11 17:05:29 -05:00
|
|
|
#define ARTWORK_UNKNOWN 0
|
|
|
|
#define ARTWORK_NONE 1
|
|
|
|
#define ARTWORK_EMBEDDED 2
|
|
|
|
#define ARTWORK_OWN 3
|
|
|
|
#define ARTWORK_DIR 4
|
|
|
|
#define ARTWORK_PARENTDIR 5
|
2014-03-11 18:20:29 -04:00
|
|
|
#define ARTWORK_SPOTIFY 6
|
2015-03-14 16:42:53 -04:00
|
|
|
#define ARTWORK_HTTP 7
|
2014-01-11 17:05:29 -05:00
|
|
|
|
2017-11-19 15:14:41 -05:00
|
|
|
#define DB_ADMIN_SCHEMA_VERSION_MAJOR "schema_version_major"
|
|
|
|
#define DB_ADMIN_SCHEMA_VERSION_MINOR "schema_version_minor"
|
|
|
|
#define DB_ADMIN_SCHEMA_VERSION "schema_version"
|
|
|
|
#define DB_ADMIN_QUEUE_VERSION "queue_version"
|
|
|
|
#define DB_ADMIN_DB_UPDATE "db_update"
|
|
|
|
#define DB_ADMIN_START_TIME "start_time"
|
|
|
|
#define DB_ADMIN_LASTFM_SESSION_KEY "lastfm_sk"
|
|
|
|
#define DB_ADMIN_SPOTIFY_REFRESH_TOKEN "spotify_refresh_token"
|
2017-11-19 01:46:28 -05:00
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
struct query_params {
|
|
|
|
/* Query parameters, filled in by caller */
|
|
|
|
enum query_type type;
|
|
|
|
enum index_type idx_type;
|
2010-04-24 04:20:26 -04:00
|
|
|
enum sort_type sort;
|
2010-03-07 05:53:16 -05:00
|
|
|
int id;
|
2014-11-10 16:53:08 -05:00
|
|
|
int64_t persistentid;
|
2009-06-07 12:56:35 -04:00
|
|
|
int offset;
|
|
|
|
int limit;
|
|
|
|
|
|
|
|
char *filter;
|
|
|
|
|
|
|
|
/* Query results, filled in by query_start */
|
|
|
|
int results;
|
|
|
|
|
|
|
|
/* Private query context, keep out */
|
2017-10-14 14:16:34 -04:00
|
|
|
void *stmt;
|
2015-03-16 18:33:42 -04:00
|
|
|
char buf1[32];
|
|
|
|
char buf2[32];
|
2009-06-07 12:56:35 -04:00
|
|
|
};
|
|
|
|
|
2010-01-30 11:01:27 -05:00
|
|
|
struct pairing_info {
|
|
|
|
char *remote_id;
|
|
|
|
char *name;
|
|
|
|
char *guid;
|
|
|
|
};
|
|
|
|
|
2015-04-23 05:34:44 -04:00
|
|
|
enum media_kind {
|
2015-04-24 11:25:01 -04:00
|
|
|
MEDIA_KIND_MUSIC = 1,
|
2015-04-23 05:34:44 -04:00
|
|
|
MEDIA_KIND_MOVIE = 2,
|
|
|
|
MEDIA_KIND_PODCAST = 4,
|
|
|
|
MEDIA_KIND_AUDIOBOOK = 8,
|
2015-04-23 17:38:36 -04:00
|
|
|
MEDIA_KIND_MUSICVIDEO = 32,
|
2015-04-23 05:34:44 -04:00
|
|
|
MEDIA_KIND_TVSHOW = 64,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum data_kind {
|
2015-04-24 16:57:08 -04:00
|
|
|
DATA_KIND_FILE = 0, /* normal file */
|
2015-08-04 16:33:32 -04:00
|
|
|
DATA_KIND_HTTP = 1, /* network stream (radio) */
|
2015-04-24 16:57:08 -04:00
|
|
|
DATA_KIND_SPOTIFY = 2, /* iTunes has no spotify data kind, but we use 2 */
|
|
|
|
DATA_KIND_PIPE = 3, /* iTunes has no pipe data kind, but we use 3 */
|
2015-04-23 05:34:44 -04:00
|
|
|
};
|
|
|
|
|
2015-04-24 16:57:08 -04:00
|
|
|
/* Note that fields marked as integers in the metadata map in filescanner_ffmpeg must be uint32_t here */
|
2009-06-07 12:56:35 -04:00
|
|
|
struct media_file_info {
|
|
|
|
char *path;
|
|
|
|
uint32_t index;
|
|
|
|
char *fname;
|
|
|
|
char *title;
|
|
|
|
char *artist;
|
|
|
|
char *album;
|
|
|
|
char *genre;
|
|
|
|
char *comment;
|
|
|
|
char *type; /* daap.songformat */
|
|
|
|
char *composer;
|
|
|
|
char *orchestra;
|
|
|
|
char *conductor;
|
|
|
|
char *grouping;
|
|
|
|
char *url; /* daap.songdataurl (asul) */
|
|
|
|
|
|
|
|
uint32_t bitrate;
|
|
|
|
uint32_t samplerate;
|
|
|
|
uint32_t song_length;
|
2010-02-02 15:01:56 -05:00
|
|
|
int64_t file_size;
|
2009-06-07 12:56:35 -04:00
|
|
|
uint32_t year; /* TDRC */
|
|
|
|
|
|
|
|
uint32_t track; /* TRCK */
|
|
|
|
uint32_t total_tracks;
|
|
|
|
|
|
|
|
uint32_t disc; /* TPOS */
|
|
|
|
uint32_t total_discs;
|
|
|
|
|
|
|
|
uint32_t time_added; /* FIXME: time_t */
|
|
|
|
uint32_t time_modified;
|
|
|
|
uint32_t time_played;
|
|
|
|
|
|
|
|
uint32_t play_count;
|
2013-12-17 14:58:55 -05:00
|
|
|
uint32_t seek;
|
2009-06-07 12:56:35 -04:00
|
|
|
uint32_t rating;
|
|
|
|
uint32_t db_timestamp;
|
|
|
|
|
|
|
|
uint32_t disabled;
|
|
|
|
uint32_t bpm; /* TBPM */
|
|
|
|
|
|
|
|
uint32_t id;
|
|
|
|
|
|
|
|
char *description; /* daap.songdescription */
|
|
|
|
char *codectype; /* song.codectype, 4 chars max (32 bits) */
|
|
|
|
|
|
|
|
uint32_t item_kind; /* song or movie */
|
|
|
|
uint32_t data_kind; /* dmap.datakind (asdk) */
|
2015-09-02 12:31:43 -04:00
|
|
|
uint64_t sample_count; //TODO [unused] sample count is never set and therefor always 0
|
2015-04-01 17:08:34 -04:00
|
|
|
uint32_t compilation;
|
2014-01-11 17:05:29 -05:00
|
|
|
char artwork;
|
2009-06-07 12:56:35 -04:00
|
|
|
|
|
|
|
/* iTunes 5+ */
|
|
|
|
uint32_t contentrating;
|
|
|
|
|
|
|
|
/* iTunes 6.0.2 */
|
|
|
|
uint32_t has_video;
|
|
|
|
uint32_t bits_per_sample;
|
|
|
|
|
2009-12-26 02:28:28 -05:00
|
|
|
uint32_t media_kind;
|
|
|
|
uint32_t tv_episode_sort;
|
|
|
|
uint32_t tv_season_num;
|
|
|
|
char *tv_series_name;
|
|
|
|
char *tv_episode_num_str; /* com.apple.itunes.episode-num-str, used as a unique episode identifier */
|
|
|
|
char *tv_network_name;
|
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
char *album_artist;
|
2010-03-06 11:13:56 -05:00
|
|
|
|
2013-12-17 14:58:55 -05:00
|
|
|
int64_t songartistid;
|
2010-03-06 11:13:56 -05:00
|
|
|
int64_t songalbumid;
|
2010-09-21 07:16:38 -04:00
|
|
|
|
|
|
|
char *title_sort;
|
|
|
|
char *artist_sort;
|
|
|
|
char *album_sort;
|
|
|
|
char *composer_sort;
|
|
|
|
char *album_artist_sort;
|
2014-12-21 14:41:44 -05:00
|
|
|
|
|
|
|
char *virtual_path;
|
2015-12-27 01:16:50 -05:00
|
|
|
|
|
|
|
uint32_t directory_id; /* Id of directory */
|
2016-01-29 13:46:56 -05:00
|
|
|
uint32_t date_released;
|
2009-06-07 12:56:35 -04:00
|
|
|
};
|
|
|
|
|
2009-06-11 17:17:17 -04:00
|
|
|
#define mfi_offsetof(field) offsetof(struct media_file_info, field)
|
|
|
|
|
2016-11-12 06:35:22 -05:00
|
|
|
/* PL_SPECIAL value must be in sync with type value in Q_PL* in db_init.c */
|
2010-01-21 11:52:51 -05:00
|
|
|
enum pl_type {
|
2015-04-21 13:12:54 -04:00
|
|
|
PL_SPECIAL = 0,
|
2015-03-29 19:03:15 -04:00
|
|
|
PL_FOLDER = 1,
|
2015-04-21 13:12:54 -04:00
|
|
|
PL_SMART = 2,
|
|
|
|
PL_PLAIN = 3,
|
2015-03-29 19:03:15 -04:00
|
|
|
PL_MAX,
|
2010-01-21 11:52:51 -05:00
|
|
|
};
|
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
struct playlist_info {
|
|
|
|
uint32_t id; /* integer id (miid) */
|
|
|
|
char *title; /* playlist name as displayed in iTunes (minm) */
|
2010-01-21 11:52:51 -05:00
|
|
|
enum pl_type type; /* see PL_ types */
|
2009-06-07 12:56:35 -04:00
|
|
|
uint32_t items; /* number of items (mimc) */
|
2015-03-16 18:33:42 -04:00
|
|
|
uint32_t streams; /* number of internet streams */
|
2009-06-07 12:56:35 -04:00
|
|
|
char *query; /* where clause if type 1 (MSPS) */
|
|
|
|
uint32_t db_timestamp; /* time last updated */
|
2009-06-10 09:23:02 -04:00
|
|
|
uint32_t disabled;
|
2009-06-07 12:56:35 -04:00
|
|
|
char *path; /* path of underlying playlist */
|
|
|
|
uint32_t index; /* index of playlist for paths with multiple playlists */
|
2010-01-21 11:52:51 -05:00
|
|
|
uint32_t special_id; /* iTunes identifies certain 'special' playlists with special meaning */
|
2014-12-21 14:41:44 -05:00
|
|
|
char *virtual_path; /* virtual path of underlying playlist */
|
2015-03-14 18:35:19 -04:00
|
|
|
uint32_t parent_id; /* Id of parent playlist if the playlist is nested */
|
2015-12-27 01:16:50 -05:00
|
|
|
uint32_t directory_id; /* Id of directory */
|
2009-06-07 12:56:35 -04:00
|
|
|
};
|
|
|
|
|
2009-06-11 17:17:17 -04:00
|
|
|
#define pli_offsetof(field) offsetof(struct playlist_info, field)
|
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
struct db_playlist_info {
|
|
|
|
char *id;
|
|
|
|
char *title;
|
|
|
|
char *type;
|
|
|
|
char *items;
|
2015-03-16 18:33:42 -04:00
|
|
|
char *streams;
|
2009-06-07 12:56:35 -04:00
|
|
|
char *query;
|
|
|
|
char *db_timestamp;
|
2009-06-10 09:23:02 -04:00
|
|
|
char *disabled;
|
2009-06-07 12:56:35 -04:00
|
|
|
char *path;
|
|
|
|
char *index;
|
2010-01-21 11:52:51 -05:00
|
|
|
char *special_id;
|
2015-02-23 14:49:53 -05:00
|
|
|
char *virtual_path;
|
2015-03-14 18:35:19 -04:00
|
|
|
char *parent_id;
|
2015-12-27 01:16:50 -05:00
|
|
|
char *directory_id;
|
2009-06-07 12:56:35 -04:00
|
|
|
};
|
|
|
|
|
2009-06-11 17:17:17 -04:00
|
|
|
#define dbpli_offsetof(field) offsetof(struct db_playlist_info, field)
|
|
|
|
|
2010-01-10 06:26:48 -05:00
|
|
|
struct group_info {
|
2010-03-06 12:56:30 -05:00
|
|
|
uint32_t id; /* integer id (miid) */
|
2010-01-10 06:26:48 -05:00
|
|
|
uint64_t persistentid; /* ulonglong id (mper) */
|
2013-12-18 13:14:39 -05:00
|
|
|
char *itemname; /* album or album_artist (minm) */
|
|
|
|
char *itemname_sort; /* album_sort or album_artist_sort (~mshc) */
|
2010-01-10 06:26:48 -05:00
|
|
|
uint32_t itemcount; /* number of items (mimc) */
|
2013-12-15 15:47:49 -05:00
|
|
|
uint32_t groupalbumcount; /* number of albums (agac) */
|
2010-01-10 06:26:48 -05:00
|
|
|
char *songalbumartist; /* song album artist (asaa) */
|
2014-02-21 14:39:57 -05:00
|
|
|
uint64_t songartistid; /* song artist id (asri) */
|
2016-06-11 17:10:13 -04:00
|
|
|
uint32_t song_length;
|
2010-01-10 06:26:48 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#define gri_offsetof(field) offsetof(struct group_info, field)
|
|
|
|
|
|
|
|
struct db_group_info {
|
2010-03-06 12:56:30 -05:00
|
|
|
char *id;
|
2010-01-10 06:26:48 -05:00
|
|
|
char *persistentid;
|
|
|
|
char *itemname;
|
2013-12-18 13:14:39 -05:00
|
|
|
char *itemname_sort;
|
2010-01-10 06:26:48 -05:00
|
|
|
char *itemcount;
|
2013-08-29 16:00:37 -04:00
|
|
|
char *groupalbumcount;
|
2010-01-10 06:26:48 -05:00
|
|
|
char *songalbumartist;
|
2014-02-21 14:39:57 -05:00
|
|
|
char *songartistid;
|
2016-06-11 17:10:13 -04:00
|
|
|
char *song_length;
|
2010-01-10 06:26:48 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#define dbgri_offsetof(field) offsetof(struct db_group_info, field)
|
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
struct db_media_file_info {
|
|
|
|
char *id;
|
|
|
|
char *path;
|
|
|
|
char *fname;
|
|
|
|
char *title;
|
|
|
|
char *artist;
|
|
|
|
char *album;
|
|
|
|
char *genre;
|
|
|
|
char *comment;
|
|
|
|
char *type;
|
|
|
|
char *composer;
|
|
|
|
char *orchestra;
|
|
|
|
char *conductor;
|
|
|
|
char *grouping;
|
|
|
|
char *url;
|
|
|
|
char *bitrate;
|
|
|
|
char *samplerate;
|
|
|
|
char *song_length;
|
|
|
|
char *file_size;
|
|
|
|
char *year;
|
|
|
|
char *track;
|
|
|
|
char *total_tracks;
|
|
|
|
char *disc;
|
|
|
|
char *total_discs;
|
|
|
|
char *bpm;
|
|
|
|
char *compilation;
|
2014-01-11 17:05:29 -05:00
|
|
|
char *artwork;
|
2009-06-07 12:56:35 -04:00
|
|
|
char *rating;
|
|
|
|
char *play_count;
|
2013-12-17 14:58:55 -05:00
|
|
|
char *seek;
|
2009-06-07 12:56:35 -04:00
|
|
|
char *data_kind;
|
|
|
|
char *item_kind;
|
|
|
|
char *description;
|
|
|
|
char *time_added;
|
|
|
|
char *time_modified;
|
|
|
|
char *time_played;
|
|
|
|
char *db_timestamp;
|
|
|
|
char *disabled;
|
|
|
|
char *sample_count;
|
|
|
|
char *codectype;
|
|
|
|
char *idx;
|
|
|
|
char *has_video;
|
|
|
|
char *contentrating;
|
|
|
|
char *bits_per_sample;
|
|
|
|
char *album_artist;
|
2009-12-26 02:28:28 -05:00
|
|
|
char *media_kind;
|
|
|
|
char *tv_episode_sort;
|
|
|
|
char *tv_season_num;
|
|
|
|
char *tv_series_name;
|
|
|
|
char *tv_episode_num_str;
|
|
|
|
char *tv_network_name;
|
2013-12-17 14:58:55 -05:00
|
|
|
char *songartistid;
|
2010-03-06 11:13:56 -05:00
|
|
|
char *songalbumid;
|
2010-09-21 07:16:38 -04:00
|
|
|
char *title_sort;
|
|
|
|
char *artist_sort;
|
|
|
|
char *album_sort;
|
|
|
|
char *composer_sort;
|
|
|
|
char *album_artist_sort;
|
2014-12-21 14:41:44 -05:00
|
|
|
char *virtual_path;
|
2015-12-27 01:16:50 -05:00
|
|
|
char *directory_id;
|
2016-01-29 13:46:56 -05:00
|
|
|
char *date_released;
|
2009-06-07 12:56:35 -04:00
|
|
|
};
|
|
|
|
|
2009-06-11 17:17:17 -04:00
|
|
|
#define dbmfi_offsetof(field) offsetof(struct db_media_file_info, field)
|
|
|
|
|
2009-06-10 12:11:11 -04:00
|
|
|
struct watch_info {
|
|
|
|
int wd;
|
|
|
|
char *path;
|
|
|
|
uint32_t cookie;
|
|
|
|
};
|
|
|
|
|
2009-06-11 17:17:17 -04:00
|
|
|
#define wi_offsetof(field) offsetof(struct watch_info, field)
|
|
|
|
|
2009-06-11 10:44:49 -04:00
|
|
|
struct watch_enum {
|
|
|
|
uint32_t cookie;
|
|
|
|
char *match;
|
|
|
|
|
|
|
|
/* Private enum context, keep out */
|
2017-10-14 14:16:34 -04:00
|
|
|
void *stmt;
|
2009-06-11 10:44:49 -04:00
|
|
|
};
|
|
|
|
|
2015-05-26 15:24:10 -04:00
|
|
|
struct filecount_info {
|
2015-04-06 03:19:48 -04:00
|
|
|
uint32_t count;
|
2017-03-04 11:23:52 -05:00
|
|
|
uint64_t length;
|
2015-04-06 03:19:48 -04:00
|
|
|
};
|
2009-06-07 12:56:35 -04:00
|
|
|
|
2016-11-12 06:35:22 -05:00
|
|
|
/* Directory ids must be in sync with the ids in Q_DIR* in db_init.c */
|
2016-01-24 12:45:28 -05:00
|
|
|
enum directory_ids {
|
|
|
|
DIR_ROOT = 1,
|
|
|
|
DIR_FILE = 2,
|
|
|
|
DIR_HTTP = 3,
|
|
|
|
DIR_SPOTIFY = 4,
|
2016-11-12 06:35:22 -05:00
|
|
|
DIR_MAX
|
2016-01-24 12:45:28 -05:00
|
|
|
};
|
|
|
|
|
2015-12-27 01:16:50 -05:00
|
|
|
struct directory_info {
|
|
|
|
uint32_t id;
|
|
|
|
char *virtual_path;
|
|
|
|
uint32_t db_timestamp;
|
|
|
|
uint32_t disabled;
|
|
|
|
uint32_t parent_id;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct directory_enum {
|
|
|
|
int parent_id;
|
|
|
|
|
|
|
|
/* Private enum context, keep out */
|
2017-10-14 14:16:34 -04:00
|
|
|
void *stmt;
|
2015-12-27 01:16:50 -05:00
|
|
|
};
|
|
|
|
|
2016-11-04 10:34:00 -04:00
|
|
|
struct db_queue_item
|
|
|
|
{
|
2016-12-03 02:03:19 -05:00
|
|
|
/* A unique id for this queue item. If the same item appears multiple
|
2016-11-04 10:34:00 -04:00
|
|
|
times in the queue each corresponding queue item has its own id. */
|
2016-12-03 02:03:19 -05:00
|
|
|
uint32_t id;
|
2016-11-04 10:34:00 -04:00
|
|
|
|
|
|
|
/* Id of the file/item in the files database */
|
|
|
|
uint32_t file_id;
|
|
|
|
|
|
|
|
/* Length of the item in ms */
|
|
|
|
uint32_t song_length;
|
|
|
|
|
|
|
|
/* Data type of the item */
|
|
|
|
enum data_kind data_kind;
|
|
|
|
/* Media type of the item */
|
|
|
|
enum media_kind media_kind;
|
|
|
|
|
|
|
|
uint32_t seek;
|
|
|
|
|
|
|
|
uint32_t pos;
|
|
|
|
uint32_t shuffle_pos;
|
|
|
|
|
|
|
|
char *path;
|
|
|
|
char *virtual_path;
|
|
|
|
|
|
|
|
char *title;
|
|
|
|
char *artist;
|
|
|
|
char *album_artist;
|
|
|
|
char *album;
|
|
|
|
char *genre;
|
|
|
|
|
|
|
|
int64_t songalbumid;
|
|
|
|
uint32_t time_modified;
|
|
|
|
|
|
|
|
char *artist_sort;
|
|
|
|
char *album_sort;
|
|
|
|
char *album_artist_sort;
|
|
|
|
|
|
|
|
uint32_t year;
|
|
|
|
uint32_t track;
|
|
|
|
uint32_t disc;
|
2017-01-22 17:10:15 -05:00
|
|
|
|
|
|
|
char *artwork_url;
|
2017-11-25 11:57:35 -05:00
|
|
|
|
|
|
|
uint32_t queue_version;
|
2016-11-04 10:34:00 -04:00
|
|
|
};
|
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
char *
|
2017-10-14 04:14:09 -04:00
|
|
|
db_escape_string(const char *str); // TODO Remove this, use db_mprintf instead
|
|
|
|
|
|
|
|
char *
|
|
|
|
db_mprintf(const char *fmt, ...);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_snprintf(char *s, int n, const char *fmt, ...);
|
2009-06-07 12:56:35 -04:00
|
|
|
|
2010-01-30 11:01:27 -05:00
|
|
|
void
|
|
|
|
free_pi(struct pairing_info *pi, int content_only);
|
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
void
|
|
|
|
free_mfi(struct media_file_info *mfi, int content_only);
|
|
|
|
|
|
|
|
void
|
|
|
|
free_pli(struct playlist_info *pli, int content_only);
|
|
|
|
|
2015-12-27 01:16:50 -05:00
|
|
|
void
|
|
|
|
free_di(struct directory_info *di, int content_only);
|
|
|
|
|
2017-10-25 17:32:16 -04:00
|
|
|
void
|
|
|
|
free_query_params(struct query_params *qp, int content_only);
|
|
|
|
|
2016-11-04 10:34:00 -04:00
|
|
|
void
|
|
|
|
free_queue_item(struct db_queue_item *queue_item, int content_only);
|
|
|
|
|
2017-10-25 17:32:16 -04:00
|
|
|
void
|
|
|
|
unicode_fixup_mfi(struct media_file_info *mfi);
|
|
|
|
|
2010-12-05 06:22:52 -05:00
|
|
|
/* Maintenance and DB hygiene */
|
|
|
|
void
|
|
|
|
db_hook_post_scan(void);
|
|
|
|
|
2009-06-07 14:49:13 -04:00
|
|
|
void
|
|
|
|
db_purge_cruft(time_t ref);
|
|
|
|
|
2013-11-29 16:48:53 -05:00
|
|
|
void
|
|
|
|
db_purge_all(void);
|
|
|
|
|
2014-05-11 17:13:09 -04:00
|
|
|
/* Transactions */
|
|
|
|
void
|
|
|
|
db_transaction_begin(void);
|
|
|
|
|
|
|
|
void
|
|
|
|
db_transaction_end(void);
|
|
|
|
|
2016-11-04 10:34:00 -04:00
|
|
|
void
|
|
|
|
db_transaction_rollback(void);
|
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
/* Queries */
|
|
|
|
int
|
|
|
|
db_query_start(struct query_params *qp);
|
|
|
|
|
|
|
|
void
|
|
|
|
db_query_end(struct query_params *qp);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_query_fetch_file(struct query_params *qp, struct db_media_file_info *dbmfi);
|
|
|
|
|
|
|
|
int
|
2016-02-21 12:05:11 -05:00
|
|
|
db_query_fetch_pl(struct query_params *qp, struct db_playlist_info *dbpli, int with_itemcount);
|
2009-06-07 12:56:35 -04:00
|
|
|
|
2010-01-10 06:26:48 -05:00
|
|
|
int
|
|
|
|
db_query_fetch_group(struct query_params *qp, struct db_group_info *dbgri);
|
|
|
|
|
2015-04-06 03:19:48 -04:00
|
|
|
int
|
2015-05-26 15:24:10 -04:00
|
|
|
db_query_fetch_count(struct query_params *qp, struct filecount_info *fci);
|
2015-04-06 03:19:48 -04:00
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
int
|
|
|
|
db_query_fetch_string(struct query_params *qp, char **string);
|
|
|
|
|
2010-12-05 10:27:06 -05:00
|
|
|
int
|
|
|
|
db_query_fetch_string_sort(struct query_params *qp, char **string, char **sortstring);
|
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
/* Files */
|
|
|
|
int
|
2009-06-11 12:41:50 -04:00
|
|
|
db_files_get_count(void);
|
2009-06-07 12:56:35 -04:00
|
|
|
|
2015-11-01 03:15:24 -05:00
|
|
|
int
|
|
|
|
db_files_get_artist_count(void);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_files_get_album_count(void);
|
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
void
|
|
|
|
db_file_inc_playcount(int id);
|
|
|
|
|
|
|
|
void
|
2011-06-12 05:06:37 -04:00
|
|
|
db_file_ping(int id);
|
2009-06-07 12:56:35 -04:00
|
|
|
|
2017-09-30 18:43:24 -04:00
|
|
|
int
|
|
|
|
db_file_ping_bypath(const char *path, time_t mtime_max);
|
|
|
|
|
2013-11-30 17:12:09 -05:00
|
|
|
void
|
2017-09-30 18:43:24 -04:00
|
|
|
db_file_ping_bymatch(const char *path, int isdir);
|
2013-11-30 17:12:09 -05:00
|
|
|
|
2010-03-07 05:06:15 -05:00
|
|
|
char *
|
|
|
|
db_file_path_byid(int id);
|
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
int
|
2017-09-30 18:43:24 -04:00
|
|
|
db_file_id_bypath(const char *path);
|
2009-06-11 14:44:22 -04:00
|
|
|
|
2009-11-22 10:30:45 -05:00
|
|
|
int
|
2017-09-30 18:43:24 -04:00
|
|
|
db_file_id_byfile(const char *filename);
|
2009-11-22 10:30:45 -05:00
|
|
|
|
2009-11-22 09:39:38 -05:00
|
|
|
int
|
2017-09-30 18:43:24 -04:00
|
|
|
db_file_id_byurl(const char *url);
|
2009-11-22 09:39:38 -05:00
|
|
|
|
2015-07-16 21:22:24 -04:00
|
|
|
int
|
2017-09-30 18:43:24 -04:00
|
|
|
db_file_id_by_virtualpath_match(const char *path);
|
2015-07-16 21:22:24 -04:00
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
struct media_file_info *
|
|
|
|
db_file_fetch_byid(int id);
|
|
|
|
|
2014-12-21 14:41:44 -05:00
|
|
|
struct media_file_info *
|
2017-05-01 07:28:46 -04:00
|
|
|
db_file_fetch_byvirtualpath(const char *path);
|
2014-12-21 14:41:44 -05:00
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
int
|
|
|
|
db_file_add(struct media_file_info *mfi);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_file_update(struct media_file_info *mfi);
|
|
|
|
|
2015-08-04 16:33:32 -04:00
|
|
|
void
|
2017-01-15 17:22:06 -05:00
|
|
|
db_file_seek_update(int id, uint32_t seek);
|
2015-08-04 16:33:32 -04:00
|
|
|
|
2009-06-10 15:36:43 -04:00
|
|
|
void
|
2017-09-30 18:43:24 -04:00
|
|
|
db_file_delete_bypath(const char *path);
|
2009-06-10 15:36:43 -04:00
|
|
|
|
2009-06-10 16:11:24 -04:00
|
|
|
void
|
2017-09-30 18:43:24 -04:00
|
|
|
db_file_disable_bypath(const char *path, char *strip, uint32_t cookie);
|
2009-06-10 16:11:24 -04:00
|
|
|
|
2009-06-11 08:42:55 -04:00
|
|
|
void
|
2017-09-30 18:43:24 -04:00
|
|
|
db_file_disable_bymatch(const char *path, char *strip, uint32_t cookie);
|
2009-06-11 08:42:55 -04:00
|
|
|
|
2009-06-10 16:11:24 -04:00
|
|
|
int
|
2017-09-30 18:43:24 -04:00
|
|
|
db_file_enable_bycookie(uint32_t cookie, const char *path);
|
2009-06-10 16:11:24 -04:00
|
|
|
|
2015-12-27 01:16:50 -05:00
|
|
|
int
|
2017-09-30 18:43:24 -04:00
|
|
|
db_file_update_directoryid(const char *path, int dir_id);
|
2015-12-27 01:16:50 -05:00
|
|
|
|
2017-08-12 10:47:44 -04:00
|
|
|
int
|
|
|
|
db_filecount_get(struct filecount_info *fci, struct query_params *qp);
|
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
/* Playlists */
|
|
|
|
int
|
2009-06-11 12:41:50 -04:00
|
|
|
db_pl_get_count(void);
|
2009-06-07 12:56:35 -04:00
|
|
|
|
|
|
|
void
|
|
|
|
db_pl_ping(int id);
|
|
|
|
|
2013-11-30 17:12:09 -05:00
|
|
|
void
|
2017-09-30 18:43:24 -04:00
|
|
|
db_pl_ping_bymatch(const char *path, int isdir);
|
2013-11-30 17:12:09 -05:00
|
|
|
|
2017-10-02 17:02:25 -04:00
|
|
|
void
|
|
|
|
db_pl_ping_items_bymatch(const char *path, int id);
|
|
|
|
|
2017-05-01 07:28:46 -04:00
|
|
|
int
|
|
|
|
db_pl_id_bypath(const char *path);
|
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
struct playlist_info *
|
2016-12-31 01:28:18 -05:00
|
|
|
db_pl_fetch_bypath(const char *path);
|
2009-06-07 12:56:35 -04:00
|
|
|
|
2014-12-21 14:41:44 -05:00
|
|
|
struct playlist_info *
|
2017-05-01 07:28:46 -04:00
|
|
|
db_pl_fetch_byvirtualpath(const char *virtual_path);
|
2014-12-21 14:41:44 -05:00
|
|
|
|
2009-11-22 06:34:37 -05:00
|
|
|
struct playlist_info *
|
2017-09-30 18:43:24 -04:00
|
|
|
db_pl_fetch_bytitlepath(const char *title, const char *path);
|
2009-11-22 06:34:37 -05:00
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
int
|
2015-03-14 17:34:03 -04:00
|
|
|
db_pl_add(struct playlist_info *pli, int *id);
|
2009-06-07 12:56:35 -04:00
|
|
|
|
|
|
|
int
|
2016-12-31 01:28:18 -05:00
|
|
|
db_pl_add_item_bypath(int plid, const char *path);
|
2009-06-07 12:56:35 -04:00
|
|
|
|
2009-11-22 06:17:28 -05:00
|
|
|
int
|
|
|
|
db_pl_add_item_byid(int plid, int fileid);
|
|
|
|
|
2009-06-11 13:04:21 -04:00
|
|
|
void
|
|
|
|
db_pl_clear_items(int id);
|
|
|
|
|
2014-03-11 18:20:29 -04:00
|
|
|
int
|
2015-03-14 17:34:03 -04:00
|
|
|
db_pl_update(struct playlist_info *pli);
|
2014-03-11 18:20:29 -04:00
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
void
|
|
|
|
db_pl_delete(int id);
|
|
|
|
|
2009-06-10 15:36:43 -04:00
|
|
|
void
|
2017-09-30 18:43:24 -04:00
|
|
|
db_pl_delete_bypath(const char *path);
|
2009-06-10 15:36:43 -04:00
|
|
|
|
2009-06-10 16:11:24 -04:00
|
|
|
void
|
2017-09-30 18:43:24 -04:00
|
|
|
db_pl_disable_bypath(const char *path, char *strip, uint32_t cookie);
|
2009-06-10 16:11:24 -04:00
|
|
|
|
2009-06-11 08:42:55 -04:00
|
|
|
void
|
2017-09-30 18:43:24 -04:00
|
|
|
db_pl_disable_bymatch(const char *path, char *strip, uint32_t cookie);
|
2009-06-11 08:42:55 -04:00
|
|
|
|
2009-06-10 16:11:24 -04:00
|
|
|
int
|
2017-09-30 18:43:24 -04:00
|
|
|
db_pl_enable_bycookie(uint32_t cookie, const char *path);
|
2009-06-10 16:11:24 -04:00
|
|
|
|
2010-03-06 12:56:30 -05:00
|
|
|
/* Groups */
|
2016-12-14 13:28:27 -05:00
|
|
|
int
|
|
|
|
db_groups_cleanup();
|
|
|
|
|
2014-11-10 16:53:08 -05:00
|
|
|
int
|
|
|
|
db_group_persistentid_byid(int id, int64_t *persistentid);
|
2010-03-07 06:53:23 -05:00
|
|
|
|
2015-12-27 01:16:50 -05:00
|
|
|
|
|
|
|
/* Directories */
|
|
|
|
int
|
|
|
|
db_directory_id_byvirtualpath(char *virtual_path);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_directory_enum_start(struct directory_enum *de);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_directory_enum_fetch(struct directory_enum *de, struct directory_info *di);
|
|
|
|
|
|
|
|
void
|
|
|
|
db_directory_enum_end(struct directory_enum *de);
|
|
|
|
|
2014-12-21 14:41:44 -05:00
|
|
|
int
|
2015-12-27 01:16:50 -05:00
|
|
|
db_directory_addorupdate(char *virtual_path, int disabled, int parent_id);
|
|
|
|
|
|
|
|
void
|
2017-01-01 10:51:21 -05:00
|
|
|
db_directory_ping_bymatch(char *virtual_path);
|
2015-12-27 01:16:50 -05:00
|
|
|
|
|
|
|
void
|
|
|
|
db_directory_disable_bymatch(char *path, char *strip, uint32_t cookie);
|
2014-12-21 14:41:44 -05:00
|
|
|
|
|
|
|
int
|
2015-12-27 01:16:50 -05:00
|
|
|
db_directory_enable_bycookie(uint32_t cookie, char *path);
|
2014-12-21 14:41:44 -05:00
|
|
|
|
2016-01-30 01:27:20 -05:00
|
|
|
int
|
|
|
|
db_directory_enable_bypath(char *path);
|
|
|
|
|
2010-01-30 11:01:27 -05:00
|
|
|
/* Remotes */
|
|
|
|
int
|
|
|
|
db_pairing_add(struct pairing_info *pi);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_pairing_fetch_byguid(struct pairing_info *pi);
|
|
|
|
|
2014-03-11 18:20:29 -04:00
|
|
|
#ifdef HAVE_SPOTIFY_H
|
|
|
|
/* Spotify */
|
|
|
|
void
|
|
|
|
db_spotify_purge(void);
|
|
|
|
|
|
|
|
void
|
|
|
|
db_spotify_pl_delete(int id);
|
2016-01-16 11:02:03 -05:00
|
|
|
|
|
|
|
void
|
2016-11-13 14:28:29 -05:00
|
|
|
db_spotify_files_delete(void);
|
2014-03-11 18:20:29 -04:00
|
|
|
#endif
|
|
|
|
|
2014-08-15 16:54:47 -04:00
|
|
|
/* Admin */
|
|
|
|
int
|
2016-12-09 10:31:42 -05:00
|
|
|
db_admin_set(const char *key, const char *value);
|
2014-08-15 16:54:47 -04:00
|
|
|
|
2017-11-19 01:46:28 -05:00
|
|
|
int
|
|
|
|
db_admin_setint(const char *key, int value);
|
|
|
|
|
2017-11-12 03:27:26 -05:00
|
|
|
int
|
|
|
|
db_admin_setint64(const char *key, int64_t value);
|
|
|
|
|
2014-08-15 16:54:47 -04:00
|
|
|
char *
|
|
|
|
db_admin_get(const char *key);
|
|
|
|
|
2017-11-19 01:46:28 -05:00
|
|
|
int
|
|
|
|
db_admin_getint(const char *key);
|
|
|
|
|
2017-11-12 03:27:26 -05:00
|
|
|
int64_t
|
|
|
|
db_admin_getint64(const char *key);
|
|
|
|
|
2014-08-15 16:54:47 -04:00
|
|
|
int
|
|
|
|
db_admin_delete(const char *key);
|
|
|
|
|
2017-06-19 15:52:01 -04:00
|
|
|
/* Speakers/outputs */
|
2010-11-02 13:40:14 -04:00
|
|
|
int
|
2017-06-19 15:52:01 -04:00
|
|
|
db_speaker_save(struct output_device *device);
|
2010-11-02 13:40:14 -04:00
|
|
|
|
|
|
|
int
|
2017-06-19 15:52:01 -04:00
|
|
|
db_speaker_get(struct output_device *device, uint64_t id);
|
2017-06-17 19:29:40 -04:00
|
|
|
|
2010-11-02 13:40:14 -04:00
|
|
|
void
|
|
|
|
db_speaker_clear_all(void);
|
|
|
|
|
2016-11-04 10:34:00 -04:00
|
|
|
/* Queue */
|
2017-01-22 17:10:15 -05:00
|
|
|
int
|
|
|
|
db_queue_update_item(struct db_queue_item *queue_item);
|
2016-11-12 07:23:41 -05:00
|
|
|
|
2016-11-04 10:34:00 -04:00
|
|
|
int
|
|
|
|
db_queue_add_by_queryafteritemid(struct query_params *qp, uint32_t item_id);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_queue_add_by_query(struct query_params *qp, char reshuffle, uint32_t item_id);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_queue_add_by_playlistid(int plid, char reshuffle, uint32_t item_id);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_queue_add_by_fileid(int id, char reshuffle, uint32_t item_id);
|
|
|
|
|
2017-02-18 00:54:44 -05:00
|
|
|
int
|
|
|
|
db_queue_add_item(struct db_queue_item *queue_item, char reshuffle, uint32_t item_id);
|
|
|
|
|
2016-11-04 10:34:00 -04:00
|
|
|
int
|
2017-04-16 17:54:07 -04:00
|
|
|
db_queue_enum_start(struct query_params *qp);
|
2016-11-04 10:34:00 -04:00
|
|
|
|
|
|
|
void
|
2017-04-16 17:54:07 -04:00
|
|
|
db_queue_enum_end(struct query_params *qp);
|
2016-11-04 10:34:00 -04:00
|
|
|
|
|
|
|
int
|
2017-04-16 17:54:07 -04:00
|
|
|
db_queue_enum_fetch(struct query_params *qp, struct db_queue_item *queue_item);
|
2016-11-04 10:34:00 -04:00
|
|
|
|
|
|
|
struct db_queue_item *
|
|
|
|
db_queue_fetch_byitemid(uint32_t item_id);
|
|
|
|
|
|
|
|
struct db_queue_item *
|
|
|
|
db_queue_fetch_byfileid(uint32_t file_id);
|
|
|
|
|
|
|
|
struct db_queue_item *
|
|
|
|
db_queue_fetch_bypos(uint32_t pos, char shuffle);
|
|
|
|
|
|
|
|
struct db_queue_item *
|
|
|
|
db_queue_fetch_byposrelativetoitem(int pos, uint32_t item_id, char shuffle);
|
|
|
|
|
|
|
|
struct db_queue_item *
|
|
|
|
db_queue_fetch_next(uint32_t item_id, char shuffle);
|
|
|
|
|
|
|
|
struct db_queue_item *
|
|
|
|
db_queue_fetch_prev(uint32_t item_id, char shuffle);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_queue_cleanup();
|
|
|
|
|
|
|
|
int
|
2017-02-11 03:28:35 -05:00
|
|
|
db_queue_clear(uint32_t keep_item_id);
|
2016-11-04 10:34:00 -04:00
|
|
|
|
|
|
|
int
|
|
|
|
db_queue_delete_byitemid(uint32_t item_id);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_queue_delete_bypos(uint32_t pos, int count);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_queue_delete_byposrelativetoitem(uint32_t pos, uint32_t item_id, char shuffle);
|
|
|
|
|
|
|
|
int
|
2017-04-17 04:46:24 -04:00
|
|
|
db_queue_move_byitemid(uint32_t item_id, int pos_to, char shuffle);
|
2016-11-04 10:34:00 -04:00
|
|
|
|
|
|
|
int
|
|
|
|
db_queue_move_bypos(int pos_from, int pos_to);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_queue_move_byposrelativetoitem(uint32_t from_pos, uint32_t to_offset, uint32_t item_id, char shuffle);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_queue_reshuffle(uint32_t item_id);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_queue_get_count();
|
|
|
|
|
|
|
|
int
|
|
|
|
db_queue_get_pos(uint32_t item_id, char shuffle);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_queue_get_pos_byfileid(uint32_t file_id, char shuffle);
|
|
|
|
|
2009-06-10 12:11:11 -04:00
|
|
|
/* Inotify */
|
|
|
|
int
|
|
|
|
db_watch_clear(void);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_watch_add(struct watch_info *wi);
|
|
|
|
|
|
|
|
int
|
2009-06-11 10:47:15 -04:00
|
|
|
db_watch_delete_bywd(uint32_t wd);
|
2009-06-10 12:11:11 -04:00
|
|
|
|
2009-06-11 10:12:17 -04:00
|
|
|
int
|
|
|
|
db_watch_delete_bypath(char *path);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_watch_delete_bymatch(char *path);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_watch_delete_bycookie(uint32_t cookie);
|
|
|
|
|
2009-06-10 12:11:11 -04:00
|
|
|
int
|
|
|
|
db_watch_get_bywd(struct watch_info *wi);
|
|
|
|
|
2014-06-09 17:42:02 -04:00
|
|
|
int
|
|
|
|
db_watch_get_bypath(struct watch_info *wi);
|
|
|
|
|
2009-06-11 09:24:10 -04:00
|
|
|
void
|
|
|
|
db_watch_mark_bypath(char *path, char *strip, uint32_t cookie);
|
|
|
|
|
|
|
|
void
|
|
|
|
db_watch_mark_bymatch(char *path, char *strip, uint32_t cookie);
|
|
|
|
|
2009-06-11 09:42:51 -04:00
|
|
|
void
|
|
|
|
db_watch_move_bycookie(uint32_t cookie, char *path);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_watch_cookie_known(uint32_t cookie);
|
|
|
|
|
2009-06-11 10:44:49 -04:00
|
|
|
int
|
|
|
|
db_watch_enum_start(struct watch_enum *we);
|
|
|
|
|
|
|
|
void
|
|
|
|
db_watch_enum_end(struct watch_enum *we);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_watch_enum_fetchwd(struct watch_enum *we, uint32_t *wd);
|
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
|
|
|
|
int
|
|
|
|
db_perthread_init(void);
|
|
|
|
|
|
|
|
void
|
|
|
|
db_perthread_deinit(void);
|
|
|
|
|
|
|
|
int
|
|
|
|
db_init(void);
|
|
|
|
|
2010-04-26 12:24:09 -04:00
|
|
|
void
|
|
|
|
db_deinit(void);
|
|
|
|
|
2009-06-07 12:56:35 -04:00
|
|
|
#endif /* !__DB_H__ */
|