Added second part of helper functions for CharSetandLanguageNegotaiation-3 Model.
[yaz-moved-to-github.git] / include / yaz / charneg.h
index bc5d5e7..fb91ef1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: charneg.h,v 1.1 2002-05-18 09:41:36 oleg Exp $
+ * $Id: charneg.h,v 1.2 2002-05-19 15:39:54 oleg Exp $
  */
 #ifndef CHARNEG_H
 #define CHARNEG_H
@@ -8,9 +8,44 @@
 
 YAZ_BEGIN_CDECL
 
-YAZ_EXPORT Z_External *yaz_set_charset_and_lang(ODR odr, int oid_class, int oid_value,
-       const char **charsets, int num_charsets,
-       const char **langs, int num_langs);
+/*
+ * Character set and language negotiation model - 3 (*)
+ *
+ * These a set helper functions for support (*). There are
+ * client and server parts. At that moment the (*) is based on
+ * Z_PrivateCharacterSet_externallySpecified method.
+ *
+ */  
+
+/*
+ * Get (*) record from request
+ */
+YAZ_EXPORT Z_CharSetandLanguageNegotiation *
+       yaz_get_charneg_record(Z_OtherInformation *p);
+
+/*
+ * Client's part. 
+ */
+YAZ_EXPORT Z_External *yaz_set_proposal_charneg(ODR odr,
+       const char **charsets, int num_charsets, const char **langs,
+               int num_langs, int selected);
+
+YAZ_EXPORT void yaz_get_response_charneg(NMEM mem,
+       Z_CharSetandLanguageNegotiation *p, char **charset, char **lang,
+               int *selected);
+
+/*
+ * Server's part
+ */
+YAZ_EXPORT Z_External *yaz_set_response_charneg(ODR odr,
+       const char *charset, const char *lang, int selected);
+
+
+YAZ_EXPORT void yaz_get_proposal_charneg(NMEM mem,
+       Z_CharSetandLanguageNegotiation *p, char **charsets, int *num_charsets,
+               char **langs, int *num_langs, int *selected);
+
 
 YAZ_END_CDECL