Added COOKIE UserInfo OID.
[yaz-moved-to-github.git] / include / oid.h
index 98e914a..fb8c58c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  *
  * Permission to use, copy, modify, distribute, and sell this software and
  * its documentation, in whole or in part, for any purpose, is hereby granted,
  * OF THIS SOFTWARE.
  *
  * $Log: oid.h,v $
- * Revision 1.15  1996-10-09 15:54:57  quinn
+ * Revision 1.31  1999-04-15 09:19:43  adam
+ * Added COOKIE UserInfo OID.
+ *
+ * Revision 1.30  1999/04/09 12:16:11  adam
+ * Added OtherInfo private OID proxy.
+ *
+ * Revision 1.29  1998/12/03 11:33:04  adam
+ * Added OID's for XML.
+ *
+ * Revision 1.28  1998/10/13 16:01:52  adam
+ * Implemented support for dynamic object identifiers.
+ * Function oid_getvalbyname now accepts raw OID's as well as traditional
+ * names.
+ *
+ * Revision 1.27  1998/05/18 13:06:58  adam
+ * Changed the way attribute sets are handled by the retriaval module.
+ * Extended Explain conversion / schema.
+ * Modified server and client to work with ASN.1 compiled protocol handlers.
+ *
+ * Revision 1.26  1998/03/20 14:46:06  adam
+ * Added UNIverse Resource Reports.
+ *
+ * Revision 1.25  1998/02/10 15:31:52  adam
+ * Implemented date and time structure. Changed the Update Extended
+ * Service.
+ *
+ * Revision 1.24  1997/09/29 13:18:59  adam
+ * Added function, oid_ent_to_oid, to replace the function
+ * oid_getoidbyent, which is not thread safe.
+ *
+ * Revision 1.23  1997/09/01 08:49:50  adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.22  1997/08/19 08:45:13  quinn
+ * Added Thesaurus
+ *
+ * Revision 1.21  1997/08/19 08:43:49  quinn
+ * Housekeeping
+ *
+ * Revision 1.19  1997/07/28 12:34:42  adam
+ * Added new OID entries (RVDM).
+ *
+ * Revision 1.18  1997/05/14 06:53:42  adam
+ * C++ support.
+ *
+ * Revision 1.17  1997/05/02 08:39:27  quinn
+ * Support for private OID table added. Thanks to Ronald van der Meer
+ *
+ * Revision 1.16  1997/04/30 08:52:08  quinn
+ * Null
+ *
+ * Revision 1.15  1996/10/09  15:54:57  quinn
  * Added SearchInfoReport
  *
  * Revision 1.14  1996/10/07  15:29:17  quinn
 
 #include <yconfig.h>
 
-#define OID_SIZE 100
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define OID_SIZE 20
     
 typedef enum oid_proto
 {
+    PROTO_NOP=0,
     PROTO_Z3950,
     PROTO_SR,
     PROTO_GENERAL,
@@ -92,6 +149,7 @@ typedef enum oid_proto
 
 typedef enum oid_class
 {
+    CLASS_NOP=0,
     CLASS_APPCTX,
     CLASS_ABSYN,
     CLASS_ATTSET,
@@ -105,11 +163,13 @@ typedef enum oid_class
     CLASS_ELEMSPEC,
     CLASS_VARSET,
     CLASS_SCHEMA,
-    CLASS_TAGSET
+    CLASS_TAGSET,
+    CLASS_GENERAL
 } oid_class;
 
 typedef enum oid_value
 {
+    VAL_NOP=0,
     VAL_APDU,
     VAL_BER,
     VAL_BASIC_CTX,
@@ -120,6 +180,9 @@ typedef enum oid_value
     VAL_GILS,
     VAL_WAIS,
     VAL_STAS,
+    VAL_COLLECT1,
+    VAL_CIMI1,
+    VAL_GEO,
     VAL_DIAG1,
     VAL_ISO2709,
     VAL_UNIMARC,
@@ -137,6 +200,8 @@ typedef enum oid_value
     VAL_PICAMARC,
     VAL_AUSMARC,
     VAL_IBERMARC,
+    VAL_CATMARC,
+    VAL_MALMARC,
     VAL_EXPLAIN,
     VAL_SUTRS,
     VAL_OPAC,
@@ -144,6 +209,7 @@ typedef enum oid_value
     VAL_GRS0,
     VAL_GRS1,
     VAL_EXTENDED,
+    VAL_FRAGMENT,
     VAL_RESOURCE1,
     VAL_RESOURCE2,
     VAL_PROMPT1,
@@ -162,7 +228,35 @@ typedef enum oid_value
     VAL_VAR1,
     VAL_ESPEC1,
     VAL_SOIF,
-    VAL_SEARCHRES1
+    VAL_SEARCHRES1,
+    VAL_THESAURUS,
+    VAL_CHARLANG,
+    VAL_USERINFO1,
+    VAL_MULTISRCH1,
+    VAL_MULTISRCH2,
+    VAL_DATETIME,
+    VAL_SQLRS,
+    VAL_PDF,
+    VAL_POSTSCRIPT,
+    VAL_HTML,
+    VAL_TIFF,
+    VAL_GIF,
+    VAL_JPEG,
+    VAL_PNG,
+    VAL_MPEG,
+    VAL_SGML,
+    VAL_TIFFB,
+    VAL_WAV,
+    VAL_UPDATEES,
+    VAL_TEXT_XML,
+    VAL_APPLICATION_XML,
+    VAL_UNIVERSE_REPORT,
+    VAL_PROXY,
+    VAL_COOKIE,
+/* add new types here... */
+
+/* VAL_DYNAMIC must have highest value */
+    VAL_DYNAMIC
 } oid_value;
 
 typedef struct oident
@@ -170,16 +264,24 @@ typedef struct oident
     oid_proto proto;
     oid_class oclass;
     oid_value value;
-    int oidsuffix[20];
+    int oidsuffix[OID_SIZE];
     char *desc;
 } oident;
 
-int *oid_getoidbyent(struct oident *ent);
-struct oident *oid_getentbyoid(int *o);
-void oid_oidcpy(int *t, int *s);
-void oid_oidcat(int *t, int *s);
-int oid_oidcmp(int *o1, int *o2);
-int oid_oidlen(int *o);
-oid_value oid_getvalbyname(const char *name);
+YAZ_EXPORT int *oid_getoidbyent(struct oident *ent);
+YAZ_EXPORT int *oid_ent_to_oid(struct oident *ent, int *dst);
+YAZ_EXPORT struct oident *oid_getentbyoid(int *o);
+YAZ_EXPORT void oid_oidcpy(int *t, int *s);
+YAZ_EXPORT void oid_oidcat(int *t, int *s);
+YAZ_EXPORT int oid_oidcmp(int *o1, int *o2);
+YAZ_EXPORT int oid_oidlen(int *o);
+YAZ_EXPORT oid_value oid_getvalbyname(const char *name);
+YAZ_EXPORT void oid_setprivateoids(oident *list);
+YAZ_EXPORT struct oident *oid_addent (int *oid, int proto, int oclass,
+                                     const char *desc, int value);
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif