* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $Id: prt-ext.h,v 1.16 2007-04-12 13:52:57 adam Exp $ */
+/* $Id: prt-ext.h,v 1.17 2007-04-13 09:55:41 adam Exp $ */
/**
* \file prt-ext.h
YAZ_EXPORT int z_External(ODR o, Z_External **p, int opt, const char *name);
/** \brief returns type information for OID (NULL if not known) */
YAZ_EXPORT Z_ext_typeent *z_ext_getentbyref(const int *oid);
-/** \brief encodes EXTERNAL record based on OID (NULL if knot known) */
+/** \brief encodes EXTERNAL record based on OID (NULL if not known) */
YAZ_EXPORT Z_External *z_ext_record_oid(ODR o, const int *oid,
const char *buf, int len);
+/** \brief encodes EXTERNAL XML record */
+Z_External *z_ext_record_xml(ODR o, const char *buf, int len);
+
+/** \brief encodes EXTERNAL SUTRS record */
+Z_External *z_ext_record_sutrs(ODR o, const char *buf, int len);
+
+/** \brief encodes EXTERNAL USMARC/MARC21 record */
+Z_External *z_ext_record_usmarc(ODR o, const char *buf, int len);
+
YAZ_END_CDECL
#endif
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: prt-ext.c,v 1.8 2007-04-12 13:52:57 adam Exp $
+ * $Id: prt-ext.c,v 1.9 2007-04-13 09:55:41 adam Exp $
*/
/**
return thisext;
}
+Z_External *z_ext_record_xml(ODR o, const char *buf, int len)
+{
+ const int *oid = yaz_string_to_oid(yaz_oid_std(),
+ CLASS_RECSYN, OID_STR_XML);
+ return z_ext_record_oid(o, oid, buf, len);
+}
+
+Z_External *z_ext_record_sutrs(ODR o, const char *buf, int len)
+{
+ const int *oid = yaz_string_to_oid(yaz_oid_std(),
+ CLASS_RECSYN, OID_STR_SUTRS);
+ return z_ext_record_oid(o, oid, buf, len);
+}
+
+Z_External *z_ext_record_usmarc(ODR o, const char *buf, int len)
+{
+ const int *oid = yaz_string_to_oid(yaz_oid_std(),
+ CLASS_RECSYN, OID_STR_USMARC);
+ return z_ext_record_oid(o, oid, buf, len);
+}
+
/*
* Local variables:
* c-basic-offset: 4
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: zoom-c.c,v 1.123 2007-04-12 13:52:57 adam Exp $
+ * $Id: zoom-c.c,v 1.124 2007-04-13 09:55:41 adam Exp $
*/
/**
* \file zoom-c.c
odr_prepend(c->odr_out, "ZOOM-C",
ireq->implementationName));
- version = odr_strdup(c->odr_out, "$Revision: 1.123 $");
+ version = odr_strdup(c->odr_out, "$Revision: 1.124 $");
if (strlen(version) > 10) /* check for unexpanded CVS strings */
version[strlen(version)-2] = '\0';
ireq->implementationVersion =
str = ZOOM_options_get(p->options, "doc");
if (str)
{
- const int *oid = yaz_string_to_oid(yaz_oid_std(),
- CLASS_RECSYN, OID_STR_XML);
req->u.esRequest->notToKeep->itemRequest =
- z_ext_record_oid(p->odr_out, oid, str, strlen(str));
+ z_ext_record_xml(p->odr_out, str, strlen(str));
}
else
req->u.esRequest->notToKeep->itemRequest = encode_ill_request(p);
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: ztest.c,v 1.86 2007-04-12 13:52:58 adam Exp $
+ * $Id: ztest.c,v 1.87 2007-04-13 09:55:41 adam Exp $
*/
/*
targetPart->taskPackageRecords[0]->which =
Z_IUTaskPackageRecordStructure_record;
targetPart->taskPackageRecords[0]->u.record =
- z_ext_record_oid(rr->stream,
- yaz_string_to_oid_odr(
- yaz_oid_std(),
- CLASS_RECSYN,
- OID_STR_SUTRS,
- rr->stream),
- "test", 4);
+ z_ext_record_sutrs(rr->stream, "test", 4);
targetPart->taskPackageRecords[0]->correlationInfo = 0;
targetPart->taskPackageRecords[0]->recordStatus =
odr_intdup (rr->stream,