Happy new year
[yaz-moved-to-github.git] / include / yaz / cql.h
index bf88187..166ecb3 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2008 Index Data.
+ * Copyright (C) 1995-2009 Index Data.
  * All rights reserved.
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -227,6 +227,12 @@ void cql_fputs(const char *buf, void *client_data);
 */
 typedef struct cql_transform_t_ *cql_transform_t;
 
+/** \brief creates a CQL transform handle
+    \returns transform handle or NULL for failure
+*/
+YAZ_EXPORT
+cql_transform_t cql_transform_create(void);
+
 /** \brief creates a CQL transform handle from am opened file handle
     \param f file where transformation spec is read
     \returns transform handle or NULL for failure
@@ -244,6 +250,19 @@ cql_transform_t cql_transform_open_FILE (FILE *f);
 YAZ_EXPORT
 cql_transform_t cql_transform_open_fname(const char *fname);
 
+
+/** \brief defines CQL transform pattern
+    \param ct CQL transform handle
+    \param pattern pattern string
+    \param value pattern value
+    \returns 0 for succes; -1 for failure
+*/
+YAZ_EXPORT
+int cql_transform_define_pattern(cql_transform_t ct, const char *pattern,
+                                 const char *value);
+    
+
+
 /** \brief destroys a CQL transform handle
     \param ct CQL transform handle
  */