diff -r 52d644758b05 -r 76d2cf7a585e logsui/logsengine/tsrc/stubs/qthighway_stub.cpp --- a/logsui/logsengine/tsrc/stubs/qthighway_stub.cpp Fri Aug 06 14:57:47 2010 +0300 +++ b/logsui/logsengine/tsrc/stubs/qthighway_stub.cpp Mon Aug 23 18:14:51 2010 +0300 @@ -17,6 +17,7 @@ #include #include +#include #include #include "qthighway_stub_helper.h" @@ -25,12 +26,31 @@ bool qtHighwayStubRequestBg = false; bool qtHighwayStubRequestEmbedded = false; +QString qtAiwStubInterface; +QString qtAiwStubOperation; +bool qtAiwStubSynchronous = true; +bool qtAiwFailCreateRequest = false; + void QtHighwayStubHelper::reset() { qtHighwayStubService.clear(); qtHighwayStubMessage.clear(); qtHighwayStubRequestBg = false; qtHighwayStubRequestEmbedded = false; + qtAiwStubInterface.clear(); + qtAiwStubOperation.clear(); + qtAiwStubSynchronous = true; + qtAiwFailCreateRequest = false; +} + +bool QtHighwayStubHelper::isRequestSynchronous() +{ + return qtAiwStubSynchronous; +} + +void QtHighwayStubHelper::setFailCreateAiwRequest(bool fail) +{ + qtAiwFailCreateRequest = fail; } QString QtHighwayStubHelper::service() @@ -124,3 +144,80 @@ { qtHighwayStubRequestEmbedded = embedded; } + + +// ----------------------------------------------------------------------------- +// XQApplicationManager stubs +// ----------------------------------------------------------------------------- +// +XQApplicationManager::XQApplicationManager() +{ +} + +XQApplicationManager::~XQApplicationManager() +{ +} + +XQAiwRequest* XQApplicationManager::create( const QString& interface, + const QString& operation, bool embedded) +{ + if (!qtAiwFailCreateRequest) { + qtAiwStubInterface = interface; + qtAiwStubOperation = operation; + qtHighwayStubRequestEmbedded = embedded; + XQAiwInterfaceDescriptor descr; + return new XQAiwRequest(descr, operation, embedded); + } else { + return 0; + } +} + +XQAiwRequest::XQAiwRequest(const XQAiwInterfaceDescriptor &descriptor, + const QString &operation, bool embedded) +{ + Q_UNUSED(descriptor) + Q_UNUSED(operation) + Q_UNUSED(embedded) +} + +XQAiwRequest::~XQAiwRequest() +{ +} + +const QString& XQAiwRequest::operation() const +{ + return qtAiwStubOperation; +} + +const XQAiwInterfaceDescriptor& XQAiwRequest::descriptor() const +{ + return XQAiwInterfaceDescriptor(); +} + +void XQAiwRequest::setArguments(const QList &arguments) +{ + Q_UNUSED(arguments) +} + +bool XQAiwRequest::send() +{ + return true; +} + +void XQAiwRequest::setSynchronous(bool synchronous) +{ + qtAiwStubSynchronous = synchronous; +} + +XQAiwInterfaceDescriptor::XQAiwInterfaceDescriptor() +{ +} + +XQAiwInterfaceDescriptor::~XQAiwInterfaceDescriptor() +{ +} + +QString XQAiwInterfaceDescriptor::interfaceName() const +{ + return qtAiwStubInterface; +}