comparison OrthancServer/main.cpp @ 3608:7ae553d9c366 storage-commitment

created DicomUserConnection::RequestStorageCommitment()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 20 Jan 2020 18:44:47 +0100
parents d0ecb355db33
children c1e2b91c2ab4
comparison
equal deleted inserted replaced
3607:d0ecb355db33 3608:7ae553d9c366
95 { 95 {
96 private: 96 private:
97 ServerContext& server_; 97 ServerContext& server_;
98 98
99 // TODO - Remove this 99 // TODO - Remove this
100 static void Toto() 100 static void Toto(std::string* t)
101 { 101 {
102 std::auto_ptr<std::string> tt(t);
103
102 printf("Sleeping\n"); 104 printf("Sleeping\n");
103 boost::this_thread::sleep(boost::posix_time::milliseconds(100)); 105 boost::this_thread::sleep(boost::posix_time::milliseconds(100));
104 printf("Connect back\n"); 106 printf("Connect back\n");
105 107
106 RemoteModalityParameters p("STGCMTSCU", "localhost", 11114, ModalityManufacturer_Generic); 108 RemoteModalityParameters p("STGCMTSCU", "localhost", 11114, ModalityManufacturer_Generic);
108 110
109 std::vector<std::string> a, b, c, d; 111 std::vector<std::string> a, b, c, d;
110 a.push_back("a"); b.push_back("b"); 112 a.push_back("a"); b.push_back("b");
111 a.push_back("c"); b.push_back("d"); 113 a.push_back("c"); b.push_back("d");
112 114
113 scu.ReportStorageCommitment("transaction", a, b, c, d); 115 scu.ReportStorageCommitment(tt->c_str(), a, b, c, d);
114 //scu.ReportStorageCommitment("transaction", a, b, a, b); 116 //scu.ReportStorageCommitment("transaction", a, b, a, b);
115 117
116 /** 118 /**
117 * "After the N-EVENT-REPORT has been sent, the Transaction UID is 119 * "After the N-EVENT-REPORT has been sent, the Transaction UID is
118 * no longer active and shall not be reused for other 120 * no longer active and shall not be reused for other
134 const std::string& remoteAet, 136 const std::string& remoteAet,
135 const std::string& calledAet) 137 const std::string& calledAet)
136 { 138 {
137 // TODO - Enqueue a Storage commitment job 139 // TODO - Enqueue a Storage commitment job
138 140
139 boost::thread t(Toto); 141 boost::thread t(Toto, new std::string(transactionUid));
140 } 142 }
141 }; 143 };
142 144
143 145
144 146