Mercurial > hg > orthanc-stone
comparison Platforms/Generic/OracleWebService.h @ 1066:b537002f83a9 broker
removing broker from deprecated classes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 15 Oct 2019 15:39:39 +0200 |
parents | c35e98d22764 |
children | 21c2b0eee53c |
comparison
equal
deleted
inserted
replaced
1065:9d42f89b8c3c | 1066:b537002f83a9 |
---|---|
41 Orthanc::WebServiceParameters parameters_; | 41 Orthanc::WebServiceParameters parameters_; |
42 | 42 |
43 class WebServiceCachedGetCommand; | 43 class WebServiceCachedGetCommand; |
44 | 44 |
45 public: | 45 public: |
46 OracleWebService(OrthancStone::MessageBroker& broker, | 46 OracleWebService(Oracle& oracle, |
47 Oracle& oracle, | |
48 const Orthanc::WebServiceParameters& parameters, | 47 const Orthanc::WebServiceParameters& parameters, |
49 OrthancStone::NativeStoneApplicationContext& context) : | 48 OrthancStone::NativeStoneApplicationContext& context) : |
50 BaseWebService(broker), | |
51 oracle_(oracle), | 49 oracle_(oracle), |
52 context_(context), | 50 context_(context), |
53 parameters_(parameters) | 51 parameters_(parameters) |
54 { | 52 { |
55 } | 53 } |
60 Orthanc::IDynamicObject* payload, // takes ownership | 58 Orthanc::IDynamicObject* payload, // takes ownership |
61 OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback, // takes ownership | 59 OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback, // takes ownership |
62 OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL, // takes ownership | 60 OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL, // takes ownership |
63 unsigned int timeoutInSeconds = 60) | 61 unsigned int timeoutInSeconds = 60) |
64 { | 62 { |
65 oracle_.Submit(new WebServicePostCommand(GetBroker(), successCallback, failureCallback, parameters_, uri, headers, timeoutInSeconds, body, payload, context_)); | 63 oracle_.Submit(new WebServicePostCommand(successCallback, failureCallback, parameters_, uri, headers, timeoutInSeconds, body, payload, context_)); |
66 } | 64 } |
67 | 65 |
68 virtual void DeleteAsync(const std::string& uri, | 66 virtual void DeleteAsync(const std::string& uri, |
69 const HttpHeaders& headers, | 67 const HttpHeaders& headers, |
70 Orthanc::IDynamicObject* payload, | 68 Orthanc::IDynamicObject* payload, |
71 OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback, | 69 OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback, |
72 OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL, | 70 OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL, |
73 unsigned int timeoutInSeconds = 60) | 71 unsigned int timeoutInSeconds = 60) |
74 { | 72 { |
75 oracle_.Submit(new WebServiceDeleteCommand(GetBroker(), successCallback, failureCallback, parameters_, uri, headers, timeoutInSeconds, payload, context_)); | 73 oracle_.Submit(new WebServiceDeleteCommand(successCallback, failureCallback, parameters_, uri, headers, timeoutInSeconds, payload, context_)); |
76 } | 74 } |
77 | 75 |
78 protected: | 76 protected: |
79 virtual void GetAsyncInternal(const std::string& uri, | 77 virtual void GetAsyncInternal(const std::string& uri, |
80 const HttpHeaders& headers, | 78 const HttpHeaders& headers, |
81 Orthanc::IDynamicObject* payload, // takes ownership | 79 Orthanc::IDynamicObject* payload, // takes ownership |
82 OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback, // takes ownership | 80 OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback, // takes ownership |
83 OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,// takes ownership | 81 OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,// takes ownership |
84 unsigned int timeoutInSeconds = 60) | 82 unsigned int timeoutInSeconds = 60) |
85 { | 83 { |
86 oracle_.Submit(new WebServiceGetCommand(GetBroker(), successCallback, failureCallback, parameters_, uri, headers, timeoutInSeconds, payload, context_)); | 84 oracle_.Submit(new WebServiceGetCommand(successCallback, failureCallback, parameters_, uri, headers, timeoutInSeconds, payload, context_)); |
87 } | 85 } |
88 | 86 |
89 virtual void NotifyHttpSuccessLater(boost::shared_ptr<BaseWebService::CachedHttpRequestSuccessMessage> cachedHttpMessage, | 87 virtual void NotifyHttpSuccessLater(boost::shared_ptr<BaseWebService::CachedHttpRequestSuccessMessage> cachedHttpMessage, |
90 Orthanc::IDynamicObject* payload, // takes ownership | 88 Orthanc::IDynamicObject* payload, // takes ownership |
91 OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback); | 89 OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback); |