-/*
- * Copyright (c) 1998-2004, Index Data.
+/* This file is part of the yazpp toolkit.
+ * Copyright (C) 1998-2008 Index Data and Mike Taylor
* See the file LICENSE for details.
- *
- * $Id: yaz-z-assoc.cpp,v 1.40 2006-10-10 13:31:49 adam Exp $
*/
#include <assert.h>
#include <yaz/log.h>
#include <yazpp/z-assoc.h>
#include <yaz/otherinfo.h>
+#include <yaz/oid_db.h>
using namespace yazpp_1;
}
else
{
- close();
+ m_PDU_Observable->shutdown();
failNotify();
}
}
void Z_Assoc::close()
{
- m_PDU_Observable->close ();
+ m_PDU_Observable->close_session();
}
int Z_Assoc::server(const char *addr)
}
}
-void Z_Assoc::set_otherInformationString (
+void Z_Assoc::set_otherInformationString(
Z_APDU *apdu,
- int oidval, int categoryValue,
- const char *str)
+ const Odr_oid *oid, int categoryValue, const char *str)
{
Z_OtherInformation **otherInformation;
get_otherInfoAPDU(apdu, &otherInformation);
if (!otherInformation)
return;
- set_otherInformationString(otherInformation, oidval, categoryValue, str);
-}
-
-void Z_Assoc::set_otherInformationString (
- Z_OtherInformation **otherInformation,
- int oidval, int categoryValue,
- const char *str)
-{
- int oid[OID_SIZE];
- struct oident ent;
- ent.proto = PROTO_Z3950;
- ent.oclass = CLASS_USERINFO;
- ent.value = (oid_value) oidval;
- if (!oid_ent_to_oid (&ent, oid))
- return ;
set_otherInformationString(otherInformation, oid, categoryValue, str);
}
+
void Z_Assoc::set_otherInformationString (
Z_OtherInformation **otherInformation,
- 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);
Z_OtherInformationUnit *Z_Assoc::update_otherInformation (
Z_OtherInformation **otherInformationP, int createFlag,
- int *oid, int categoryValue, int deleteFlag)
+ const Odr_oid *oid, int categoryValue, int deleteFlag)
{
return yaz_oi_update (otherInformationP,
(createFlag ? odr_encode() : 0),