core/database: Move database out of containers/ subdirectory

It doesn't make sense to have a subdirectory with a single file.  Let's
move it back to core/

Implements #45: Move database into core/
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2016-04-29 11:18:44 -04:00 committed by Anna Schumaker
parent fa0dee5921
commit 92a53d90b4
13 changed files with 9 additions and 29 deletions

View File

@ -3,7 +3,6 @@ Import("env")
res = Glob("*.c") res = Glob("*.c")
res += SConscript("tags/Sconscript") res += SConscript("tags/Sconscript")
res += SConscript("containers/Sconscript")
res += SConscript("playlists/Sconscript") res += SConscript("playlists/Sconscript")
env.UsePackage("gstreamer-1.0") env.UsePackage("gstreamer-1.0")

View File

@ -1,3 +0,0 @@
#!/usr/bin/python
res = Glob("*.c")
Return("res")

View File

@ -1,7 +1,7 @@
/* /*
* Copyright 2013 (c) Anna Schumaker. * Copyright 2013 (c) Anna Schumaker.
*/ */
#include <core/containers/database.h> #include <core/database.h>
#include <core/idle.h> #include <core/idle.h>
#define DB_ENTRY_AT(db, index) \ #define DB_ENTRY_AT(db, index) \

View File

@ -14,7 +14,7 @@
#ifndef OCARINA_CORE_TAGS_ALBUM_H #ifndef OCARINA_CORE_TAGS_ALBUM_H
#define OCARINA_CORE_TAGS_ALBUM_H #define OCARINA_CORE_TAGS_ALBUM_H
#include <core/containers/database.h> #include <core/database.h>
#include <core/tags/artist.h> #include <core/tags/artist.h>
struct album { struct album {

View File

@ -13,7 +13,7 @@
#ifndef OCARINA_CORE_TAGS_ARTIST_H #ifndef OCARINA_CORE_TAGS_ARTIST_H
#define OCARINA_CORE_TAGS_ARTIST_H #define OCARINA_CORE_TAGS_ARTIST_H
#include <core/containers/database.h> #include <core/database.h>
struct artist { struct artist {
gchar *ar_name; /* This artist's name. */ gchar *ar_name; /* This artist's name. */

View File

@ -13,7 +13,7 @@
#ifndef OCARINA_CORE_TAGS_GENRE_H #ifndef OCARINA_CORE_TAGS_GENRE_H
#define OCARINA_CORE_TAGS_GENRE_H #define OCARINA_CORE_TAGS_GENRE_H
#include <core/containers/database.h> #include <core/database.h>
struct genre { struct genre {
gchar *ge_name; /* This genre's name. */ gchar *ge_name; /* This genre's name. */

View File

@ -13,7 +13,7 @@
#ifndef OCARINA_CORE_TAGS_LIBRARY_H #ifndef OCARINA_CORE_TAGS_LIBRARY_H
#define OCARINA_CORE_TAGS_LIBRARY_H #define OCARINA_CORE_TAGS_LIBRARY_H
#include <core/containers/database.h> #include <core/database.h>
struct library { struct library {
unsigned int li_size; /* This library's track count. */ unsigned int li_size; /* This library's track count. */

View File

@ -20,7 +20,7 @@
#ifndef OCARINA_CORE_TAGS_TRACK_H #ifndef OCARINA_CORE_TAGS_TRACK_H
#define OCARINA_CORE_TAGS_TRACK_H #define OCARINA_CORE_TAGS_TRACK_H
#include <core/containers/database.h> #include <core/database.h>
#include <core/date.h> #include <core/date.h>
#include <core/tags/album.h> #include <core/tags/album.h>
#include <core/tags/artist.h> #include <core/tags/artist.h>

View File

@ -3,7 +3,7 @@ string
file file
date date
idle idle
containers/database database
filter filter
tags/artist tags/artist
tags/album tags/album

View File

@ -29,8 +29,7 @@ res += [ CoreTest("string") ]
res += [ CoreTest("file") ] res += [ CoreTest("file") ]
res += [ CoreTest("date") ] res += [ CoreTest("date") ]
res += [ CoreTest("idle") ] res += [ CoreTest("idle") ]
res += [ CoreTest("database") ]
res += SConscript("containers/Sconscript")
res += [ CoreTest("filter") ] res += [ CoreTest("filter") ]
res += SConscript("tags/Sconscript") res += SConscript("tags/Sconscript")

View File

@ -1,15 +0,0 @@
#!/usr/bin/python
Import("CoreTest", "testing_group")
res = []
def ContainerTest(name):
run = CoreTest("containers/%s" % name)
Alias("tests/core/containers", run)
if len(res) > 0 and testing_group([ "tests/core/containers" ]):
Depends(run, res[-1])
return run
res += [ ContainerTest("database") ]
Return("res")

View File

@ -2,7 +2,7 @@
* Copyright 2014 (c) Anna Schumaker. * Copyright 2014 (c) Anna Schumaker.
* Test a Database * Test a Database
*/ */
#include <core/containers/database.h> #include <core/database.h>
#include <core/idle.h> #include <core/idle.h>
#include <core/string.h> #include <core/string.h>
#include <tests/test.h> #include <tests/test.h>