(concord_obj_put_feature_value_str): Renamed from
[chise/concord.git] / concord.c
index d80c93a..c08f10c 100644 (file)
--- a/concord.c
+++ b/concord.c
@@ -608,9 +608,9 @@ concord_feature_sync (CONCORD_Feature feature)
 }
 
 int
-concord_stroid_set_feature_str (const unsigned char* object_id,
-                               CONCORD_Feature feature,
-                               unsigned char* value)
+concord_obj_put_feature_value_str (const unsigned char* object_id,
+                                  CONCORD_Feature feature,
+                                  unsigned char* value)
 {
   if (feature == NULL)
     return -1;
@@ -620,9 +620,9 @@ concord_stroid_set_feature_str (const unsigned char* object_id,
 }
 
 int
-concord_stroid_get_feature_string (const unsigned char* object_id,
-                                  CONCORD_Feature feature,
-                                  CONCORD_String value)
+concord_obj_get_feature_value_string (const unsigned char* object_id,
+                                     CONCORD_Feature feature,
+                                     CONCORD_String value)
 {
   int status;
 
@@ -633,8 +633,8 @@ concord_stroid_get_feature_string (const unsigned char* object_id,
 }
 
 CONCORD_Object
-concord_stroid_get_feature_object (const unsigned char* object_id,
-                                  CONCORD_Feature feature)
+concord_obj_get_feature_value (const unsigned char* object_id,
+                              CONCORD_Feature feature)
 {
   DBT valdatum;
   int status;
@@ -648,9 +648,9 @@ concord_stroid_get_feature_object (const unsigned char* object_id,
 }
 
 unsigned char*
-concord_stroid_gets_feature (const unsigned char* object_id,
-                            CONCORD_Feature feature,
-                            unsigned char* dst, size_t size)
+concord_obj_gets_feature_value (const unsigned char* object_id,
+                               CONCORD_Feature feature,
+                               unsigned char* dst, size_t size)
 {
   DBT valdatum;
   int status;
@@ -668,10 +668,10 @@ concord_stroid_gets_feature (const unsigned char* object_id,
 }
 
 int
-concord_feature_foreach_object_string (CONCORD_Feature feature,
-                                      int (*func)(CONCORD_String object_id,
-                                                  CONCORD_Feature feature,
-                                                  CONCORD_String value))
+concord_feature_foreach_obj_string (CONCORD_Feature feature,
+                                   int (*func)(CONCORD_String object_id,
+                                               CONCORD_Feature feature,
+                                               CONCORD_String value))
 {
   CONCORD_String_Tank key, value;
   DBC *dbcp;
@@ -810,29 +810,29 @@ concord_index_sync (CONCORD_INDEX index)
 }
 
 int
-concord_index_strid_get_object_string (CONCORD_INDEX index,
-                                      const unsigned char* strid,
-                                      CONCORD_String object_id)
+concord_index_strid_put_obj (CONCORD_INDEX index,
+                            const unsigned char* strid,
+                            unsigned char* object_id)
 {
   if (index == NULL)
     return -1;
 
-  if (concord_index_setup_db (index, 0))
+  if (concord_index_setup_db (index, 1))
     return -1;  
 
-  return CONCORD_BDB_get (index->db, strid, object_id);
+  return CONCORD_BDB_put (index->db, strid, object_id);
 }
 
 int
-concord_index_strid_set_object_str (CONCORD_INDEX index,
+concord_index_strid_get_obj_string (CONCORD_INDEX index,
                                    const unsigned char* strid,
-                                   unsigned char* object_id)
+                                   CONCORD_String object_id)
 {
   if (index == NULL)
     return -1;
 
-  if (concord_index_setup_db (index, 1))
+  if (concord_index_setup_db (index, 0))
     return -1;  
 
-  return CONCORD_BDB_put (index->db, strid, object_id);
+  return CONCORD_BDB_get (index->db, strid, object_id);
 }