2 #include <qi/session.hpp>
3 #include <qi/application.hpp>
4 #include <qi/type/dynamicobjectbuilder.hpp>
5 #include <testsession/testsessionpair.hpp>
6 #include <testsession/testsession.hpp>
16 qiLogInfo() <<
">>>> File Transfer Progress = " << (progress * 100.0) <<
"%";
21 qiLogInfo() <<
"Working on image file at " << imageFilePath <<
" ...";
23 boost::this_thread::sleep_for(boost::chrono::milliseconds(300));
24 qiLogInfo() <<
"Working on image file at " << imageFilePath <<
" - DONE";
29 qiLogInfo() <<
"Storing image file at " << imageFilePath <<
" into the ImageStore...";
35 imageStore->storeImage(file,
name);
37 qiLogInfo() <<
"Storing image file at " << imageFilePath <<
" into the ImageStore - DONE";
54 const std::string& imageFile,
55 const std::string& imageFilePath)
61 qi::FileCopyToLocal fileOp{file, imageFilePath};
67 fileOp.start().wait();
76 void doSomeWork(qi::SessionPtr clientSession,
const qi::Path& imagePath,
const std::string& imageName)
78 qi::AnyObject aliceServices = clientSession->service(
"AliceServices").value();
89 qi::DynamicObjectBuilder objectBuilder;
91 qi::AnyObject aliceServices = objectBuilder.object();
92 serverSession->registerService(
"AliceServices", aliceServices);
95 int main(
int argc,
char** argv)
97 ::TestMode::forceTestMode(TestMode::Mode_SD);
98 qi::Application
app(argc, argv);
103 const auto imageFilePath = qi::Path::fromNative(argv[1]);
104 const auto imageID = qi::Path::fromNative(argv[2]).str();
105 TestSessionPair sessionPair;