-/* Copyright (C) 2003,2004,2005 MORIOKA Tomohiko
+/* Copyright (C) 2003,2004,2005,2006 MORIOKA Tomohiko
This file is part of the CONCORD Library.
The CONCORD Library is free software; you can redistribute it and/or
}
CONCORD_DS
-concord_open_ds (CONCORD_Backend_Type type, const unsigned char* location,
+concord_open_ds (CONCORD_Backend_Type type, const char* location,
int subtype, int modemask)
{
CONCORD_DS ds = (CONCORD_DS)malloc (sizeof (CONCORD_DS_Table));
return 0;
}
-unsigned char*
+char*
concord_ds_location (CONCORD_DS ds)
{
return ds->location;
}
CONCORD_Genre
-concord_ds_get_genre (CONCORD_DS ds, const unsigned char* name)
+concord_ds_get_genre (CONCORD_DS ds, const char* name)
{
CONCORD_Genre genre;
int
concord_ds_foreach_genre_name (CONCORD_DS ds,
- int (*func) (CONCORD_DS ds,
- unsigned char* name))
+ int (*func) (CONCORD_DS ds, char* name))
{
unsigned char* dname = ds->location;
DIR *dir;
return status;
}
+char*
+concord_genre_get_name (CONCORD_Genre genre)
+{
+ return genre->name;
+}
+
CONCORD_DS
concord_genre_get_data_source (CONCORD_Genre genre)
{
int
concord_genre_foreach_feature_name (CONCORD_Genre genre,
int (*func) (CONCORD_Genre genre,
- unsigned char* name))
+ char* name))
{
unsigned char *dname
= alloca (strlen (genre->ds->location)
}
CONCORD_Feature
-concord_genre_get_feature (CONCORD_Genre genre, const unsigned char* name)
+concord_genre_get_feature (CONCORD_Genre genre, const char* name)
{
CONCORD_Genre g_feature
= concord_ds_get_genre (genre->ds, "feature");
}
CONCORD_INDEX
-concord_genre_get_index (CONCORD_Genre genre, const unsigned char* name)
+concord_genre_get_index (CONCORD_Genre genre, const char* name)
{
CONCORD_INDEX index;
return status;
}
-unsigned char*
+char*
concord_feature_get_name (CONCORD_Feature feature)
{
return feature->name;
}
+CONCORD_Genre
+concord_feature_get_genre (CONCORD_Feature feature)
+{
+ return feature->genre;
+}
+
int
concord_feature_setup_db (CONCORD_Feature feature, int writable)
{
}
int
-concord_obj_put_feature_value_str (const unsigned char* object_id,
+concord_obj_put_feature_value_str (const char* object_id,
CONCORD_Feature feature,
unsigned char* value)
{
}
int
-concord_obj_get_feature_value_string (const unsigned char* object_id,
+concord_obj_get_feature_value_string (const char* object_id,
CONCORD_Feature feature,
CONCORD_String value)
{
}
CONCORD_Object
-concord_obj_get_feature_value (const unsigned char* object_id,
+concord_obj_get_feature_value (const char* object_id,
CONCORD_Feature feature)
{
DBT valdatum;
}
unsigned char*
-concord_obj_gets_feature_value (const unsigned char* object_id,
+concord_obj_gets_feature_value (const char* object_id,
CONCORD_Feature feature,
unsigned char* dst, size_t size)
{
int
concord_index_strid_put_obj (CONCORD_INDEX index,
- const unsigned char* strid,
- unsigned char* object_id)
+ const char* strid, char* object_id)
{
if (index == NULL)
return -1;
int
concord_index_strid_get_obj_string (CONCORD_INDEX index,
- const unsigned char* strid,
+ const char* strid,
CONCORD_String object_id)
{
if (index == NULL)