(concord_obj_put_feature_value_str): Renamed from
authortomo <tomo>
Fri, 24 Jun 2005 13:39:11 +0000 (13:39 +0000)
committertomo <tomo>
Fri, 24 Jun 2005 13:39:11 +0000 (13:39 +0000)
`concord_stroid_set_feature_str'.
(concord_obj_get_feature_value): Renamed from
`concord_stroid_get_feature_object'.
(concord_obj_get_feature_value_string): Renamed from
`concord_stroid_get_feature_string'.
(concord_obj_gets_feature_value): Renamed from
`concord_stroid_gets_feature'.
(concord_feature_foreach_obj_string): Renamed from
`concord_feature_foreach_object_string'.
(concord_index_strid_get_obj_string): Renamed from
`concord_index_strid_get_object_string'.
(concord_index_strid_put_obj): Renamed from
`concord_index_strid_set_object_str'.

concord.c
concord.h

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);
 }
index b557b6a..95a79b8 100644 (file)
--- a/concord.h
+++ b/concord.h
@@ -97,28 +97,28 @@ int concord_feature_setup_db (CONCORD_Feature feature, int writable);
 int concord_feature_sync (CONCORD_Feature feature);
 
 int
-concord_stroid_set_feature_str (const unsigned char* object_id,
-                               CONCORD_Feature feature,
-                               unsigned char* value);
-
-int
-concord_stroid_get_feature_string (const unsigned char* object_id,
+concord_obj_put_feature_value_str (const unsigned char* object_id,
                                   CONCORD_Feature feature,
-                                  CONCORD_String value);
+                                  unsigned char* value);
+
 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);
+int
+concord_obj_get_feature_value_string (const unsigned char* object_id,
+                                     CONCORD_Feature feature,
+                                     CONCORD_String value);
 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);
 
 int
-concord_feature_foreach_object_string (CONCORD_Feature feature,
-                                      int (*func)
-                                      (CONCORD_String object_id,
-                                       CONCORD_Feature feature,
-                                       CONCORD_String valdatum));
+concord_feature_foreach_obj_string (CONCORD_Feature feature,
+                                   int (*func)
+                                   (CONCORD_String object_id,
+                                    CONCORD_Feature feature,
+                                    CONCORD_String valdatum));
 
 
 typedef struct CONCORD_INDEX_Table CONCORD_INDEX_Table;
@@ -131,13 +131,13 @@ int concord_index_setup_db (CONCORD_INDEX index, int writable);
 
 int concord_index_sync (CONCORD_INDEX index);
 
-int concord_index_strid_get_object_string (CONCORD_INDEX index,
-                                          const unsigned char* strid,
-                                          CONCORD_String object_id);
+int concord_index_strid_put_obj (CONCORD_INDEX index,
+                                const unsigned char* strid,
+                                unsigned char* object_id);
 
-int concord_index_strid_set_object_str (CONCORD_INDEX index,
+int concord_index_strid_get_obj_string (CONCORD_INDEX index,
                                        const unsigned char* strid,
-                                       unsigned char* object_id);
+                                       CONCORD_String object_id);
 
 #if 0
 {