From d588f1d530f53c4d38a4a5f954545b06b2751968 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 8 May 2007 12:04:50 +0000 Subject: [PATCH] Use Odr_oid for OIDs. Require YAZ 3.0.2. --- configure.ac | 6 +++--- include/yazpp/z-assoc.h | 8 ++++---- include/yazpp/z-server.h | 14 +++++++------- src/yaz-my-server.cpp | 6 +++--- src/yaz-z-assoc.cpp | 8 ++++---- src/yaz-z-server-sr.cpp | 4 ++-- src/yaz-z-server.cpp | 6 +++--- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/configure.ac b/configure.ac index 3340e8d..0693a0b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl YAZ++ Toolkit, Index Data 1994-2007 dnl See the file LICENSE for details. -dnl $Id: configure.ac,v 1.16 2007-04-12 15:00:33 adam Exp $ +dnl $Id: configure.ac,v 1.17 2007-05-08 12:04:50 adam Exp $ AC_PREREQ(2.59) AC_INIT([yazpp],[1.0.3],[adam@indexdata.dk]) AC_CONFIG_SRCDIR(configure.ac) @@ -13,12 +13,12 @@ AC_PROG_CXX AC_HEADER_STDC AM_PROG_LIBTOOL -YAZ_INIT(threads,2.1.99) +YAZ_INIT([threads],[3.0.2]) if test -z "$YAZLIB"; then AC_MSG_ERROR([YAZ development libraries missing]) fi YAZ_DOC -AC_CHECK_HEADERS(unistd.h sys/stat.h sys/time.h sys/types.h) +AC_CHECK_HEADERS([unistd.h sys/stat.h sys/time.h sys/types.h]) AC_ARG_ENABLE(zoom,[ --disable-zoom disable ZOOM (for old C++ compilers)],[enable_zoom=$enableval],[enable_zoom=yes]) AM_CONDITIONAL(ZOOM, test $enable_zoom = "yes") diff --git a/include/yazpp/z-assoc.h b/include/yazpp/z-assoc.h index 805726c..6b7ac81 100644 --- a/include/yazpp/z-assoc.h +++ b/include/yazpp/z-assoc.h @@ -2,7 +2,7 @@ * Copyright (c) 1998-2005, Index Data. * See the file LICENSE for details. * - * $Id: z-assoc.h,v 1.3 2007-04-16 21:54:23 adam Exp $ + * $Id: z-assoc.h,v 1.4 2007-05-08 12:04:50 adam Exp $ */ #ifndef YAZ_Z_ASSOC_INCLUDED @@ -63,13 +63,13 @@ class YAZ_EXPORT Z_Assoc : public IPDU_Observer { void get_otherInfoAPDU(Z_APDU *apdu, Z_OtherInformation ***oip); Z_OtherInformationUnit *update_otherInformation ( Z_OtherInformation **otherInformationP, int createFlag, - const int *oid, int categoryValue, int deleteFlag); + const Odr_oid *oid, int categoryValue, int deleteFlag); void set_otherInformationString( Z_APDU *apdu, - const int *oid, int categoryValue, const char *str); + const Odr_oid *oid, int categoryValue, const char *str); void set_otherInformationString ( Z_OtherInformation **otherInformationP, - const int *oid, int categoryValue, + const Odr_oid *oid, int categoryValue, const char *str); Z_ReferenceId *getRefID(char* str); Z_ReferenceId **get_referenceIdP(Z_APDU *apdu); diff --git a/include/yazpp/z-server.h b/include/yazpp/z-server.h index a9c5434..7b1f047 100644 --- a/include/yazpp/z-server.h +++ b/include/yazpp/z-server.h @@ -2,7 +2,7 @@ * Copyright (c) 2000-2007, Index Data. * See the file LICENSE for details. * - * $Id: z-server.h,v 1.3 2007-04-16 21:54:23 adam Exp $ + * $Id: z-server.h,v 1.4 2007-05-08 12:04:50 adam Exp $ */ #include @@ -14,7 +14,7 @@ class Z_Server; class YAZ_EXPORT Z_ServerUtility { public: void create_databaseRecord (ODR odr, Z_NamePlusRecord *rec, - const char *dbname, const int *format, + const char *dbname, const Odr_oid *format, const void *buf, int len); void create_surrogateDiagnostics(ODR odr, Z_NamePlusRecord *rec, const char *dbname, int error, @@ -81,10 +81,10 @@ class YAZ_EXPORT Yaz_Facility_Retrieval : public IServer_Facility, Z_PresentResponse *presentResponse) = 0; virtual void sr_record (const char *resultSetName, int position, - int *format, - Z_RecordComposition *comp, - Z_NamePlusRecord *namePlusRecord, - Z_Records *diagnostics) = 0; + Odr_oid *format, + Z_RecordComposition *comp, + Z_NamePlusRecord *namePlusRecord, + Z_Records *diagnostics) = 0; int init(Z_Server *server, Z_InitRequest *initRequest, Z_InitResponse *initResponse); @@ -98,7 +98,7 @@ class YAZ_EXPORT Yaz_Facility_Retrieval : public IServer_Facility, int start, int num, Z_RecordComposition *comp, int *next, int *pres, - int *oid); + Odr_oid *oid); void fetch_via_piggyback (Z_Server *s, Z_SearchRequest *searchRequest, diff --git a/src/yaz-my-server.cpp b/src/yaz-my-server.cpp index 9d6acfc..635d4de 100644 --- a/src/yaz-my-server.cpp +++ b/src/yaz-my-server.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Id: yaz-my-server.cpp,v 1.22 2007-04-16 21:54:23 adam Exp $ + * $Id: yaz-my-server.cpp,v 1.23 2007-05-08 12:04:50 adam Exp $ */ #include @@ -44,7 +44,7 @@ public: Z_PresentResponse *presentResponse); void sr_record (const char *resultSetName, int position, - int *format, + Odr_oid *format, Z_RecordComposition *comp, Z_NamePlusRecord *namePlusRecord, Z_Records *records); @@ -124,7 +124,7 @@ void MyRetrieval::sr_present (Z_PresentRequest *presentRequest, void MyRetrieval::sr_record (const char *resultSetName, int position, - int *format, + Odr_oid *format, Z_RecordComposition *comp, Z_NamePlusRecord *namePlusRecord, Z_Records *records) diff --git a/src/yaz-z-assoc.cpp b/src/yaz-z-assoc.cpp index f97838a..b0eae8a 100644 --- a/src/yaz-z-assoc.cpp +++ b/src/yaz-z-assoc.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2007, Index Data. * See the file LICENSE for details. * - * $Id: yaz-z-assoc.cpp,v 1.42 2007-04-16 21:54:23 adam Exp $ + * $Id: yaz-z-assoc.cpp,v 1.43 2007-05-08 12:04:50 adam Exp $ */ #include @@ -376,7 +376,7 @@ void Z_Assoc::get_otherInfoAPDU(Z_APDU *apdu, Z_OtherInformation ***oip) void Z_Assoc::set_otherInformationString( Z_APDU *apdu, - const int *oid, int categoryValue, const char *str) + const Odr_oid *oid, int categoryValue, const char *str) { Z_OtherInformation **otherInformation; get_otherInfoAPDU(apdu, &otherInformation); @@ -388,7 +388,7 @@ void Z_Assoc::set_otherInformationString( void Z_Assoc::set_otherInformationString ( Z_OtherInformation **otherInformation, - const int *oid, int categoryValue, const char *str) + const Odr_oid *oid, int categoryValue, const char *str) { Z_OtherInformationUnit *oi = update_otherInformation(otherInformation, 1, oid, categoryValue, 0); @@ -399,7 +399,7 @@ void Z_Assoc::set_otherInformationString ( Z_OtherInformationUnit *Z_Assoc::update_otherInformation ( Z_OtherInformation **otherInformationP, int createFlag, - const int *oid, int categoryValue, int deleteFlag) + const Odr_oid *oid, int categoryValue, int deleteFlag) { return yaz_oi_update (otherInformationP, (createFlag ? odr_encode() : 0), diff --git a/src/yaz-z-server-sr.cpp b/src/yaz-z-server-sr.cpp index 88e1d2d..872da5d 100644 --- a/src/yaz-z-server-sr.cpp +++ b/src/yaz-z-server-sr.cpp @@ -2,7 +2,7 @@ * Copyright (c) 2000-2004, Index Data. * See the file LICENSE for details. * - * $Id: yaz-z-server-sr.cpp,v 1.12 2006-03-29 13:14:18 adam Exp $ + * $Id: yaz-z-server-sr.cpp,v 1.13 2007-05-08 12:04:50 adam Exp $ * */ @@ -16,7 +16,7 @@ Z_Records *Yaz_Facility_Retrieval::pack_records (Z_Server *s, int start, int xnum, Z_RecordComposition *comp, int *next, int *pres, - int *format) + Odr_oid *format) { int recno, total_length = 0, toget = xnum, dumped_records = 0; Z_Records *records = diff --git a/src/yaz-z-server.cpp b/src/yaz-z-server.cpp index 5ad11c6..f4a6edb 100644 --- a/src/yaz-z-server.cpp +++ b/src/yaz-z-server.cpp @@ -2,7 +2,7 @@ * Copyright (c) 2000-2004, Index Data. * See the file LICENSE for details. * - * $Id: yaz-z-server.cpp,v 1.26 2007-04-16 21:54:23 adam Exp $ + * $Id: yaz-z-server.cpp,v 1.27 2007-05-08 12:04:50 adam Exp $ */ #include @@ -113,10 +113,10 @@ void Z_Server::recv_Z_PDU (Z_APDU *apdu_request, int len) * database record. */ void Z_ServerUtility::create_databaseRecord ( - ODR odr, Z_NamePlusRecord *rec, const char *dbname, const int *format, + ODR odr, Z_NamePlusRecord *rec, const char *dbname, const Odr_oid *format, const void *buf, int len) { - int *oid = odr_oiddup(odr, format); + Odr_oid *oid = odr_oiddup(odr, format); rec->databaseName = dbname ? odr_strdup (odr, dbname) : 0; rec->which = Z_NamePlusRecord_databaseRecord; rec->u.databaseRecord = z_ext_record_oid(odr, oid, -- 1.7.10.4