+ Z_APDU *apdu = create_Z_PDU(Z_APDU_presentRequest);
+ Z_PresentRequest *req = apdu->u.presentRequest;
+
+ req->resultSetStartPoint = &start;
+ req->numberOfRecordsRequested = &number;
+
+ int oid_syntax[OID_SIZE];
+ oident prefsyn;
+ int recordSyntax;
+ get_preferredRecordSyntax (&recordSyntax);
+ if (recordSyntax != VAL_NONE)
+ {
+ prefsyn.proto = PROTO_Z3950;
+ prefsyn.oclass = CLASS_RECSYN;
+ prefsyn.value = (enum oid_value) recordSyntax;
+ oid_ent_to_oid(&prefsyn, oid_syntax);
+ req->preferredRecordSyntax = oid_syntax;
+ }
+ Z_RecordComposition compo;
+ Z_ElementSetNames *elementSetNames;
+ get_elementSetName (&elementSetNames);
+ if (elementSetNames)
+ {
+ req->recordComposition = &compo;
+ compo.which = Z_RecordComp_simple;
+ compo.u.simple = elementSetNames;
+ }
+
+ if (m_cookie)
+ set_otherInformationString(&req->otherInfo, VAL_COOKIE, 1, m_cookie);
+
+ if ( pRefId )
+ {
+ req->referenceId = getRefID(pRefId);
+ }
+
+ if ( pResultSetId )
+ {
+ req->resultSetId = pResultSetId;
+ }
+
+ return send_Z_PDU(apdu);
+}
+
+void Yaz_IR_Assoc::set_proxy(const char *str)
+{
+ delete [] m_proxy;
+ m_proxy = 0;
+ if (str)
+ {
+ m_proxy = new char[strlen(str)+1];
+ strcpy (m_proxy, str);
+ }
+}
+
+void Yaz_IR_Assoc::set_cookie(const char *str)
+{
+ delete [] m_cookie;
+ m_cookie = 0;
+ if (str)
+ {
+ m_cookie = new char[strlen(str)+1];
+ strcpy(m_cookie, str);
+ }
+}
+
+const char *Yaz_IR_Assoc::get_cookie()
+{
+ return m_cookie;