//---------------------------------------------------------------------------- const QtSoapType & ctkSimpleSoapClient::submitSoapRequest(const QString& methodName, QtSoapType* soapType ) { QList<QtSoapType*> list; list.append(soapType); return submitSoapRequest(methodName,list); }
//---------------------------------------------------------------------------- void ctkDicomExchangeService::releaseData(const QList<QUuid>& objectUUIDs) { QList<QtSoapType*> list; list << new ctkDicomSoapArrayOfUUIDS("objects",objectUUIDs); submitSoapRequest("ReleaseData",list); return; }
//---------------------------------------------------------------------------- QRect ctkDicomHostService::getAvailableScreen(const QRect& preferredScreen) { QtSoapStruct* input = new ctkDicomSoapRectangle("preferredScreen", preferredScreen); const QtSoapType& result = submitSoapRequest("getAvailableScreen", input); QRect resultRect = ctkDicomSoapRectangle::getQRect(result); qDebug() << "x:" << resultRect.x() << " y:" << resultRect.y(); return resultRect; }
//---------------------------------------------------------------------------- QString ctkDicomHostService::getOutputLocation(const QStringList& preferredProtocols) { QtSoapStruct* input = dynamic_cast<QtSoapStruct*>( new ctkDicomSoapArrayOfStringType("string","preferredProtocols", preferredProtocols)); const QtSoapType& result = submitSoapRequest("getOutputLocation", input); QString resultString = result.value().toString(); return resultString; }
//---------------------------------------------------------------------------- bool ctkDicomExchangeService::notifyDataAvailable( const ctkDicomAppHosting::AvailableData& data, bool lastData) { QList<QtSoapType*> list; list << new ctkDicomSoapAvailableData("data", data); list << new ctkDicomSoapBool("lastData", lastData); const QtSoapType & result = submitSoapRequest("NotifyDataAvailable",list); return ctkDicomSoapBool::getBool(result); }
//---------------------------------------------------------------------------- QList<ctkDicomAppHosting::ObjectLocator> ctkDicomExchangeService::getData( const QList<QUuid>& objectUUIDs, const QList<QString>& acceptableTransferSyntaxUIDs, bool includeBulkData) { //Q_D(ctkDicomService); QList<QtSoapType*> list; list << new ctkDicomSoapArrayOfUUIDS("objects",objectUUIDs); list << new ctkDicomSoapArrayOfStringType("UID","acceptableTransferSyntaxes", acceptableTransferSyntaxUIDs); list << new ctkDicomSoapBool("includeBulkData", includeBulkData); const QtSoapType & result = submitSoapRequest("GetData",list); //QtSoapType *tt; // list << (tt=new ctkDicomSoapArrayOfUUIDS("uuids",objectUUIDs)); extern void DumpAll(const QtSoapType& type, int indent=0); //DumpAll(*tt); // list << (tt=new ctkDicomSoapBool("includeBulkData", includeBulkData)); //DumpAll(*tt); // const QtSoapType & result = submitSoapRequest("getDataAsFile",list); DumpAll(result); //xxx return ctkDicomSoapArrayOfObjectLocators::getArray(result); }
//---------------------------------------------------------------------------- void ctkDicomHostService::notifyStatus(const ctkDicomAppHosting::Status& status) { //Q_D(ctkDicomService); QtSoapStruct* input = new ctkDicomSoapStatus("status", status); submitSoapRequest("notifyStatus", input); }
//---------------------------------------------------------------------------- void ctkDicomHostService::notifyStateChanged(ctkDicomAppHosting::State state) { QtSoapType* input = new ctkDicomSoapState("newState", state); // spec would be "state", java has "newState" FIX JAVA/STANDARD submitSoapRequest("notifyStateChanged", input); }
//---------------------------------------------------------------------------- QString ctkDicomHostService::generateUID() { const QtSoapType& result = submitSoapRequest("generateUID", NULL); QString resultUID = ctkDicomSoapUID::getUID(result); return resultUID; }