core/containers: Move database into the containers/ directory

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2015-11-30 09:48:19 -05:00
parent f02853e9c7
commit c34f0c160d
12 changed files with 14 additions and 14 deletions

View File

@ -1,7 +1,7 @@
/*
* Copyright 2013 (c) Anna Schumaker.
*/
#include <core/database.h>
#include <core/containers/database.h>
#define DB_ENTRY_AT(db, index) \
(struct db_entry *)g_ptr_array_index(db->db_entries, index)
@ -20,7 +20,7 @@ static void __dbe_free(struct database *db, struct db_entry *dbe)
}
}
struct db_entry *__dbe_next(const struct database *db, unsigned int index)
static struct db_entry *__dbe_next(const struct database *db, unsigned int index)
{
if (!db->db_entries)
return NULL;

View File

@ -2,7 +2,7 @@
* Copyright 2014 (c) Anna Schumaker.
*/
extern "C" {
#include <core/database.h>
#include <core/containers/database.h>
#include <core/idle.h>
}
#include <core/index.h>

View File

@ -18,8 +18,8 @@
*
* The database class will add a newline after each struct db_entry.
*/
#ifndef OCARINA_CORE_DATABASE_H
#define OCARINA_CORE_DATABASE_H
#ifndef OCARINA_CORE_CONTAINERS_DATABASE_H
#define OCARINA_CORE_CONTAINERS_DATABASE_H
#include <core/file.h>
@ -144,4 +144,4 @@ struct db_entry *db_next(const struct database *, struct db_entry *);
ent != NULL; \
ent = next, next = db_next(db, ent))
#endif /* OCARINA_CORE_DATABASE_H */
#endif /* OCARINA_CORE_CONTAINERS_DATABASE_H */

View File

@ -7,8 +7,8 @@
#ifndef OCARINA_CORE_INDEX_H
#define OCARINA_CORE_INDEX_H
#include <core/containers/database.h>
#include <core/containers/set.h>
#include <core/database.h>
struct index_entry {

View File

@ -14,7 +14,7 @@
#ifndef OCARINA_CORE_TAGS_ALBUM_H
#define OCARINA_CORE_TAGS_ALBUM_H
#include <core/database.h>
#include <core/containers/database.h>
struct album {
unsigned int al_year; /* This album's year. */

View File

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

View File

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

View File

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

View File

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

View File

@ -20,7 +20,6 @@ res += [ CoreTest("file", "file.c") ]
res += [ CoreTest("date", "date.c") ]
res += SConscript("containers/Sconscript")
res += [ CoreTest("database", "database.c") ]
res += [ CoreTest("index", "index.c") ]
res += [ CoreTest("filter", "filter.c") ]
res += [ CoreTest("idle", "idle.c") ]

View File

@ -12,5 +12,6 @@ def ContainerTest(name, source):
return run
res = [ ContainerTest("set", "set.c") ]
res = [ ContainerTest("database", "database.c") ]
Return("res")

View File

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