Mercurial > hg > orthanc-stone
comparison Framework/Toolbox/IWebService.h @ 58:468c48eaa01c wasm
refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 03 May 2017 17:35:52 +0200 |
parents | d20e25cfcf3a |
children | 288c948199e5 |
comparison
equal
deleted
inserted
replaced
57:d20e25cfcf3a | 58:468c48eaa01c |
---|---|
28 namespace OrthancStone | 28 namespace OrthancStone |
29 { | 29 { |
30 class IWebService : public boost::noncopyable | 30 class IWebService : public boost::noncopyable |
31 { | 31 { |
32 public: | 32 public: |
33 class IRequestObserver : public boost::noncopyable | 33 class ICallback : public boost::noncopyable |
34 { | 34 { |
35 public: | 35 public: |
36 virtual ~IRequestObserver() | 36 virtual ~ICallback() |
37 { | 37 { |
38 } | 38 } |
39 | 39 |
40 virtual void NotifyError(Orthanc::IDynamicObject* payload) = 0; | 40 virtual void NotifyError(const std::string& uri, |
41 Orthanc::IDynamicObject* payload) = 0; | |
41 | 42 |
42 virtual void NotifyAnswer(const std::string& answer, | 43 virtual void NotifyAnswer(const std::string& uri, |
44 const std::string& answer, | |
43 Orthanc::IDynamicObject* payload) = 0; | 45 Orthanc::IDynamicObject* payload) = 0; |
44 }; | 46 }; |
45 | 47 |
46 virtual ~IWebService() | 48 virtual ~IWebService() |
47 { | 49 { |
48 } | 50 } |
49 | 51 |
50 virtual void ScheduleGetRequest(IRequestObserver& observer, | 52 virtual void ScheduleGetRequest(ICallback& callback, |
51 const std::string& uri, | 53 const std::string& uri, |
52 Orthanc::IDynamicObject* payload) = 0; | 54 Orthanc::IDynamicObject* payload) = 0; |
53 | 55 |
54 virtual void SchedulePostRequest(IRequestObserver& observer, | 56 virtual void SchedulePostRequest(ICallback& callback, |
55 const std::string& uri, | 57 const std::string& uri, |
56 const std::string& body, | 58 const std::string& body, |
57 Orthanc::IDynamicObject* payload) = 0; | 59 Orthanc::IDynamicObject* payload) = 0; |
58 }; | 60 }; |
59 } | 61 } |