Wrap up version 1.3.3.
[minidlna.git] / scanner.h
blob1383ac4942287562113f7a96a496fc0001575118
1 /* Media file scanner
3 * Project : minidlna
4 * Website : http://sourceforge.net/projects/minidlna/
5 * Author : Justin Maggard
7 * MiniDLNA media server
8 * Copyright (C) 2008-2009 Justin Maggard
10 * This file is part of MiniDLNA.
12 * MiniDLNA is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
16 * MiniDLNA is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with MiniDLNA. If not, see <http://www.gnu.org/licenses/>.
24 #ifndef __SCANNER_H__
25 #define __SCANNER_H__
27 /* Try to be generally PlaysForSure compatible by using similar IDs */
28 #define BROWSEDIR_ID "64"
30 #define MUSIC_ID "1"
31 #define MUSIC_ALL_ID "1$4"
32 #define MUSIC_GENRE_ID "1$5"
33 #define MUSIC_ARTIST_ID "1$6"
34 #define MUSIC_ALBUM_ID "1$7"
35 #define MUSIC_PLIST_ID "1$F"
36 #define MUSIC_DIR_ID "1$14"
37 #define MUSIC_CONTRIB_ARTIST_ID "1$100"
38 #define MUSIC_ALBUM_ARTIST_ID "1$107"
39 #define MUSIC_COMPOSER_ID "1$108"
40 #define MUSIC_RATING_ID "1$101"
42 #define VIDEO_ID "2"
43 #define VIDEO_ALL_ID "2$8"
44 #define VIDEO_GENRE_ID "2$9"
45 #define VIDEO_ACTOR_ID "2$A"
46 #define VIDEO_SERIES_ID "2$E"
47 #define VIDEO_PLIST_ID "2$10"
48 #define VIDEO_DIR_ID "2$15"
49 #define VIDEO_RATING_ID "2$200"
51 #define IMAGE_ID "3"
52 #define IMAGE_ALL_ID "3$B"
53 #define IMAGE_DATE_ID "3$C"
54 #define IMAGE_ALBUM_ID "3$D"
55 #define IMAGE_CAMERA_ID "3$D2" // PlaysForSure == Keyword
56 #define IMAGE_PLIST_ID "3$11"
57 #define IMAGE_DIR_ID "3$16"
58 #define IMAGE_RATING_ID "3$300"
60 extern int valid_cache;
62 int
63 is_video(const char *file);
65 int
66 is_audio(const char *file);
68 int
69 is_image(const char *file);
71 int64_t
72 get_next_available_id(const char *table, const char *parentID);
74 int64_t
75 insert_directory(const char *name, const char *path, const char *base, const char *parentID, int objectID);
77 int
78 insert_file(const char *name, const char *path, const char *parentID, int object, media_types dir_types);
80 int
81 CreateDatabase(void);
83 void
84 start_scanner();
86 #endif