feat: Remove req lib reference
This commit is contained in:
@@ -12,7 +12,6 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
|
|||||||
|
|
||||||
find_package(Aurora REQUIRED)
|
find_package(Aurora REQUIRED)
|
||||||
find_package(Parser REQUIRED)
|
find_package(Parser REQUIRED)
|
||||||
find_package(Req REQUIRED)
|
|
||||||
find_package(URDepends REQUIRED)
|
find_package(URDepends REQUIRED)
|
||||||
find_package(DCMTK REQUIRED)
|
find_package(DCMTK REQUIRED)
|
||||||
set(DCMTK_WITH_JPEG OFF)
|
set(DCMTK_WITH_JPEG OFF)
|
||||||
@@ -26,14 +25,12 @@ add_executable(UR ${cpp_files} ${cu_files} ${cxx_files} ${header_files} ${Auror
|
|||||||
target_include_directories(UR PUBLIC ./src/)
|
target_include_directories(UR PUBLIC ./src/)
|
||||||
target_include_directories(UR PUBLIC ${Aurora_INCLUDE_DIRS})
|
target_include_directories(UR PUBLIC ${Aurora_INCLUDE_DIRS})
|
||||||
target_include_directories(UR PUBLIC ${DCMTK_INCLUDE_DIRS})
|
target_include_directories(UR PUBLIC ${DCMTK_INCLUDE_DIRS})
|
||||||
target_include_directories(UR PUBLIC ${Req_INCLUDES_DIRS})
|
|
||||||
target_include_directories(UR PUBLIC ${Parser_INCLUDE_DIRS})
|
target_include_directories(UR PUBLIC ${Parser_INCLUDE_DIRS})
|
||||||
target_include_directories(UR PUBLIC ${URDepends_INCLUDES_DIRS})
|
target_include_directories(UR PUBLIC ${URDepends_INCLUDES_DIRS})
|
||||||
target_include_directories(UR PUBLIC ${DCMTK_INCLUDE_DIRS})
|
target_include_directories(UR PUBLIC ${DCMTK_INCLUDE_DIRS})
|
||||||
target_link_libraries(UR PUBLIC ${Aurora_Libraries})
|
target_link_libraries(UR PUBLIC ${Aurora_Libraries})
|
||||||
target_link_libraries(UR PUBLIC dcmdata)
|
target_link_libraries(UR PUBLIC dcmdata)
|
||||||
target_link_libraries(UR PUBLIC matio)
|
target_link_libraries(UR PUBLIC matio)
|
||||||
target_link_libraries(UR PUBLIC Req)
|
|
||||||
target_link_libraries(UR PUBLIC Parser)
|
target_link_libraries(UR PUBLIC Parser)
|
||||||
|
|
||||||
target_link_libraries(UR PUBLIC URDepends::TransDetection)
|
target_link_libraries(UR PUBLIC URDepends::TransDetection)
|
||||||
@@ -65,7 +62,7 @@ enable_testing()
|
|||||||
file(GLOB_RECURSE test_cpp test/*.cpp)
|
file(GLOB_RECURSE test_cpp test/*.cpp)
|
||||||
add_executable(UR_Test ${cpp_files} ${header_files} ${Aurora_Source} ${test_cpp} )
|
add_executable(UR_Test ${cpp_files} ${header_files} ${Aurora_Source} ${test_cpp} )
|
||||||
target_include_directories(UR_Test PUBLIC ./test/ ./src/)
|
target_include_directories(UR_Test PUBLIC ./test/ ./src/)
|
||||||
target_compile_options(UR_Test PUBLIC ${Aurora_Complie_Options} "-march=native")
|
# target_compile_options(UR_Test PUBLIC ${Aurora_Complie_Options} "-march=native")
|
||||||
target_include_directories(UR_Test PUBLIC ${DCMTK_INCLUDE_DIRS})
|
target_include_directories(UR_Test PUBLIC ${DCMTK_INCLUDE_DIRS})
|
||||||
target_include_directories(UR_Test PUBLIC ${Aurora_INCLUDE_DIRS})
|
target_include_directories(UR_Test PUBLIC ${Aurora_INCLUDE_DIRS})
|
||||||
target_include_directories(UR_Test PUBLIC ${Parser_INCLUDE_DIRS})
|
target_include_directories(UR_Test PUBLIC ${Parser_INCLUDE_DIRS})
|
||||||
|
|||||||
@@ -1,36 +1,16 @@
|
|||||||
#include "notify.h"
|
#include "notify.h"
|
||||||
#include "Request.h"
|
|
||||||
#include "log/log.h"
|
#include "log/log.h"
|
||||||
namespace Recon {
|
namespace Recon {
|
||||||
std::string ReconID;
|
std::string ReconID;
|
||||||
Req::Request req;
|
|
||||||
bool notifyStart(const std::string& aReconID ){
|
bool notifyStart(const std::string& aReconID ){
|
||||||
ReconID = aReconID;
|
return true;
|
||||||
Req::Request::Init();
|
|
||||||
req.setClientCertificate("/home/krad/workdir/ReconTester/client.crt","/home/krad/workdir/ReconTester/client.key");
|
|
||||||
std::string str = "{\"ReconID\": \""+ReconID+"\"}";
|
|
||||||
std::unordered_map<std::string, std::string> headers;
|
|
||||||
headers["Content-Type"] = "application/json";
|
|
||||||
auto resp = req.post("https://localhost:5002/Task/Start/",str,headers);
|
|
||||||
return resp->httpCode() == 200;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool notifyFinish(){
|
bool notifyFinish(){
|
||||||
std::string str = "{\"ReconID\": \""+ReconID+"\"}";
|
return true;
|
||||||
std::unordered_map<std::string, std::string> headers;
|
|
||||||
headers["Content-Type"] = "application/json";
|
|
||||||
auto resp = req.post("https://localhost:5002/Task/Finish/",str,headers);
|
|
||||||
Req::Request::Dispose();
|
|
||||||
return resp->httpCode() == 200;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool notifyProgress( int percent){
|
bool notifyProgress( int percent){
|
||||||
char buffer[2048] = {0};
|
return true;
|
||||||
sprintf(buffer, "https://localhost:5002/Task/Notify/%d/", percent);
|
|
||||||
std::string str = "{\"ReconID\": \""+ReconID+"\"}";
|
|
||||||
std::unordered_map<std::string, std::string> headers;
|
|
||||||
headers["Content-Type"] = "application/json";
|
|
||||||
auto resp = req.post(buffer,str,headers);
|
|
||||||
return resp->httpCode() == 200;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user