+const char *IR_Assoc::get_proxy()
+{
+ return m_proxy;
+}
+
+const char *IR_Assoc::get_host()
+{
+ return m_host;
+}
+
+void IR_Assoc::recv_searchRequest(Z_SearchRequest *searchRequest)
+{
+ Z_APDU *apdu = create_Z_PDU(Z_APDU_searchResponse);
+ send_Z_PDU(apdu, 0);
+}
+
+void IR_Assoc::recv_presentRequest(Z_PresentRequest *presentRequest)
+{
+ Z_APDU *apdu = create_Z_PDU(Z_APDU_presentResponse);
+ send_Z_PDU(apdu, 0);
+}
+
+void IR_Assoc::recv_initRequest(Z_InitRequest *initRequest)
+{
+ Z_APDU *apdu = create_Z_PDU(Z_APDU_initResponse);
+ send_Z_PDU(apdu, 0);
+}
+
+void IR_Assoc::recv_searchResponse (Z_SearchResponse *searchResponse)
+{
+}
+
+void IR_Assoc::recv_presentResponse (Z_PresentResponse *presentResponse)
+{
+}
+
+void IR_Assoc::recv_initResponse(Z_InitResponse *initResponse)
+{
+}
+
+void IR_Assoc::recv_extendedServicesResponse(Z_ExtendedServicesResponse *ExtendedServicesResponse)
+{
+}
+
+int IR_Assoc::get_lastReceived()
+{
+ return m_lastReceived;
+}
+
+void IR_Assoc::set_lastReceived(int lastReceived)
+{
+ m_lastReceived = lastReceived;
+}
+
+int IR_Assoc::send_initRequest(char* pRefId)
+{
+ Z_APDU *apdu = create_Z_PDU(Z_APDU_initRequest);
+ Z_InitRequest *req = apdu->u.initRequest;
+
+ ODR_MASK_SET(req->options, Z_Options_search);
+ ODR_MASK_SET(req->options, Z_Options_present);
+ ODR_MASK_SET(req->options, Z_Options_namedResultSets);
+ ODR_MASK_SET(req->options, Z_Options_triggerResourceCtrl);
+ ODR_MASK_SET(req->options, Z_Options_scan);
+ ODR_MASK_SET(req->options, Z_Options_sort);
+ ODR_MASK_SET(req->options, Z_Options_extendedServices);
+ ODR_MASK_SET(req->options, Z_Options_delSet);
+
+ ODR_MASK_SET(req->protocolVersion, Z_ProtocolVersion_1);
+ ODR_MASK_SET(req->protocolVersion, Z_ProtocolVersion_2);
+ ODR_MASK_SET(req->protocolVersion, Z_ProtocolVersion_3);
+
+ if ( pRefId )
+ {
+ req->referenceId = getRefID(pRefId);
+ }
+
+ if (m_proxy && m_host)
+ set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_proxy,
+ 1, m_host);
+ if (m_cookie)
+ set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_cookie,
+ 1, m_cookie);
+ return send_Z_PDU(apdu, 0);
+}
+
+int IR_Assoc::send_deleteResultSetRequest(char* pResultSetId, char* pRefId)
+{
+ char* ResultSetIds[1];
+
+ Z_APDU *apdu = create_Z_PDU(Z_APDU_deleteResultSetRequest);
+ Z_DeleteResultSetRequest *req = apdu->u.deleteResultSetRequest;
+
+ if ( pResultSetId )
+ {
+ *req->deleteFunction = Z_DeleteResultSetRequest_list;
+ req->num_resultSetList = 1;
+ ResultSetIds[0] = pResultSetId;
+ req->resultSetList = ResultSetIds;
+ }
+ else
+ {
+ *req->deleteFunction = Z_DeleteResultSetRequest_all;
+ }
+
+ if ( pRefId )
+ {
+ req->referenceId = getRefID(pRefId);
+ }
+
+ if (m_proxy && m_host)
+ set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_proxy,
+ 1, m_host);
+ if (m_cookie)
+ set_otherInformationString(&req->otherInfo, yaz_oid_userinfo_cookie,
+ 1, m_cookie);
+
+ return send_Z_PDU(apdu, 0);
+}
+
+
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+