(chise_make_name_table): Modify to avoid warning.
[chise/libchise.git] / chise.h
diff --git a/chise.h b/chise.h
index 4061264..4fab437 100644 (file)
--- a/chise.h
+++ b/chise.h
@@ -12,9 +12,11 @@ typedef enum CHISE_DS_Type
 
 typedef struct CHISE_DS CHISE_DS;
 
-CHISE_DS* chise_open_data_source (CHISE_DS_Type type, char *location);
+CHISE_DS*
+CHISE_DS_open (CHISE_DS_Type type, char *location,
+              DBTYPE subtype, int modemask);
 
-int chise_ds_close (CHISE_DS *ds);
+int CHISE_DS_close (CHISE_DS *ds);
 
 
 typedef int CHISE_Char_ID;
@@ -41,49 +43,47 @@ chise_value_to_c_string (const CHISE_Value *s)
 }
 
 
-typedef struct CHISE_Attribute_Table
-{
-  CHISE_DS *ds;
-  DB *db;
-} CHISE_Attribute_Table;
-
-
-typedef CHISE_Attribute_Table CHISE_Decoding_Table;
-
-CHISE_Decoding_Table*
-chise_ds_open_decoding_table (CHISE_DS *ds, const char *ccs,
-                             DBTYPE real_subtype,
-                             u_int32_t accessmask, int modemask);
-
-int chise_dt_close (CHISE_Decoding_Table *table);
+typedef struct CHISE_Feature_Table CHISE_Feature_Table;
+typedef CHISE_Feature_Table* CHISE_Feature;
 
-CHISE_Char_ID chise_dt_get_char (CHISE_Decoding_Table *table, int code_point);
+CHISE_Feature
+chise_ds_get_feature (CHISE_DS *ds, const unsigned char *feature);
 
-int chise_dt_put_char (CHISE_Decoding_Table *table,
-                      int code_point, CHISE_Char_ID cid);
+int chise_char_load_feature_value (CHISE_Char_ID cid,
+                                  CHISE_Feature feature,
+                                  CHISE_Value *valdatum);
 
+unsigned char*
+chise_char_gets_feature_value (CHISE_Char_ID cid,
+                              CHISE_Feature feature,
+                              unsigned char *dst, size_t size);
 
-typedef CHISE_Attribute_Table CHISE_Feature_Table;
+int
+chise_char_feature_value_iterate (CHISE_Feature feature,
+                                 int (*func) (CHISE_Char_ID cid,
+                                              CHISE_Feature feature,
+                                              CHISE_Value *valdatum));
 
-CHISE_Feature_Table*
-chise_ds_open_feature_table (CHISE_DS *ds, const char *feature,
-                            DBTYPE real_subtype,
-                            u_int32_t accessmask, int modemask);
+#if 0
+int
+chise_char_feature_str_iterate (CHISE_Feature feature,
+                               int (*func) (CHISE_Char_ID cid,
+                                            CHISE_Feature feature,
+                                            unsigned char *str));
+#endif
 
-int chise_ft_close (CHISE_Feature_Table *table);
 
-int chise_ft_get_value (CHISE_Feature_Table *table,
-                       CHISE_Char_ID cid, CHISE_Value *valdatum);
+typedef struct CHISE_CCS_Table CHISE_CCS_Table;
+typedef CHISE_CCS_Table* CHISE_CCS;
 
-void
-chise_ft_iterate (CHISE_Feature_Table *table,
-                 int (*func) (CHISE_Feature_Table *table,
-                              CHISE_Char_ID cid, CHISE_Value *valdatum));
+CHISE_CCS
+chise_ds_get_ccs (CHISE_DS *ds, const unsigned char *ccs);
 
+CHISE_Char_ID chise_ccs_decode (CHISE_CCS ccs, int code_point);
 
-CHISE_Char_ID chise_decode_char (CHISE_DS *ds, char *ccs, int code_point);
+int chise_ccs_set_decoded_char (CHISE_CCS ccs,
+                               int code_point, CHISE_Char_ID cid);
 
-int chise_get_feature (CHISE_DS *ds, CHISE_Char_ID cid,
-                      char *key, CHISE_Value *valdatum);
+int chise_ccs_sync (CHISE_CCS ccs);
 
 #endif /* !_CHISE_H */