CHISE_DS_Berkeley_DB
} CHISE_DS_Type;
-typedef struct CHISE_DS
-{
- CHISE_DS_Type type;
- unsigned char *location;
-} CHISE_DS;
+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;
}
-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);
+typedef struct CHISE_Feature_Table CHISE_Feature_Table;
+typedef CHISE_Feature_Table* CHISE_Feature;
-int chise_dt_close (CHISE_Decoding_Table *table);
+CHISE_Feature
+chise_ds_get_feature (CHISE_DS *ds, const unsigned char *feature);
-CHISE_Char_ID chise_dt_get_char (CHISE_Decoding_Table *table, int code_point);
+int chise_char_load_feature_value (CHISE_Char_ID cid,
+ CHISE_Feature feature,
+ CHISE_Value *valdatum);
-int chise_dt_put_char (CHISE_Decoding_Table *table,
- int code_point, CHISE_Char_ID cid);
+unsigned char*
+chise_char_gets_feature_value (CHISE_Char_ID cid,
+ CHISE_Feature feature,
+ unsigned char *dst, size_t size);
+int
+chise_char_feature_value_iterate (CHISE_Feature feature,
+ int (*func) (CHISE_Char_ID cid,
+ CHISE_Feature feature,
+ CHISE_Value *valdatum));
-typedef CHISE_Attribute_Table CHISE_Feature_Table;
+#if 0
+int
+chise_char_feature_str_iterate (CHISE_Feature feature,
+ int (*func) (CHISE_Char_ID cid,
+ CHISE_Feature feature,
+ unsigned char *str));
+#endif
-CHISE_Feature_Table*
-chise_ds_open_feature_table (CHISE_DS *ds, const char *feature,
- DBTYPE real_subtype,
- u_int32_t accessmask, int modemask);
-int chise_ft_close (CHISE_Feature_Table *table);
+typedef struct CHISE_CCS_Table CHISE_CCS_Table;
+typedef CHISE_CCS_Table* CHISE_CCS;
-int chise_ft_get_value (CHISE_Feature_Table *table,
- CHISE_Char_ID cid, CHISE_Value *valdatum);
+CHISE_CCS
+chise_ds_get_ccs (CHISE_DS *ds, const unsigned char *ccs);
-void
-chise_ft_iterate (CHISE_Feature_Table *table,
- int (*func) (CHISE_Feature_Table *table,
- CHISE_Char_ID cid, CHISE_Value *valdatum));
+static inline CHISE_Char_ID
+chise_ds_decode_char (CHISE_DS *ds,
+ const unsigned char *ccs, int code_point);
+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);
-
-CHISE_Attribute_Table*
-chise_open_attribute_table (CHISE_DS *ds,
- const char *encoding, const char *feature,
- DBTYPE real_subtype,
- u_int32_t accessmask, int modemask);
-
-int chise_close_attribute_table (CHISE_Attribute_Table *at);
-
-int chise_get_attribute_table (CHISE_Attribute_Table *at,
- char *key, CHISE_Value *valdatum);
+static inline CHISE_Char_ID
+chise_ds_decode_char (CHISE_DS *ds,
+ const unsigned char *ccs, int code_point)
+{
+ return
+ chise_ccs_decode (chise_ds_get_ccs (ds, ccs), code_point);
+}
#endif /* !_CHISE_H */