update.
[chise/libchise.git] / chise.h
diff --git a/chise.h b/chise.h
index a1a89db..696620b 100644 (file)
--- a/chise.h
+++ b/chise.h
@@ -1,6 +1,28 @@
+/* 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The CHISE Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the CHISE Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
 #ifndef _CHISE_H
 #define _CHISE_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <db.h>
 #include <errno.h>
 
@@ -21,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,
@@ -41,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;
 }
 
 
@@ -133,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 */