Modify for C++.
[chise/libchise.git] / chise.h
diff --git a/chise.h b/chise.h
index 48587c4..696620b 100644 (file)
--- a/chise.h
+++ b/chise.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 MORIOKA Tomohiko
+/* Copyright (C) 2003,2004,2005 MORIOKA Tomohiko
    This file is part of the CHISE Library.
 
    The CHISE Library is free software; you can redistribute it and/or
 #ifndef _CHISE_H
 #define _CHISE_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <db.h>
 #include <errno.h>
 
@@ -39,6 +43,8 @@ CHISE_DS_open (CHISE_DS_Type type, const unsigned char *location,
 
 int CHISE_DS_close (CHISE_DS *ds);
 
+unsigned char* chise_ds_location (CHISE_DS *ds);
+
 int
 chise_ds_foreach_char_feature_name (CHISE_DS *ds,
                                    int (*func) (CHISE_DS *ds,
@@ -59,13 +65,13 @@ chise_value_size (const CHISE_Value *s)
 static inline char *
 chise_value_data (const CHISE_Value *s)
 {
-  return s->data;
+  return (char *)s->data;
 }
 
 static inline char *
 chise_value_to_c_string (const CHISE_Value *s)
 {
-  return s->data;
+  return (char *)s->data;
 }
 
 
@@ -151,4 +157,32 @@ chise_ds_decode_char (CHISE_DS *ds,
     chise_ccs_decode (chise_ds_get_ccs (ds, name), code_point);
 }
 
+
+typedef struct CHISE_Property_Table CHISE_Property_Table;
+typedef CHISE_Property_Table* CHISE_Property;
+
+CHISE_Property_Table*
+chise_ds_get_property (CHISE_DS *ds, const unsigned char *property);
+
+int chise_property_setup_db (CHISE_Property property, int writable);
+
+int chise_property_sync (CHISE_Property property);
+
+int chise_feature_set_property_value (CHISE_Feature feature,
+                                     CHISE_Property property,
+                                     unsigned char *value);
+
+int chise_feature_load_property_value (CHISE_Feature feature,
+                                      CHISE_Property_Table *table,
+                                      CHISE_Value *valdatum);
+
+unsigned char*
+chise_feature_gets_property_value (CHISE_Feature feature,
+                                  CHISE_Property_Table *table,
+                                  unsigned char *buf, size_t size);
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* !_CHISE_H */