All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RoutingWebservice.h
1 #pragma once
2 
3 #include "IRoutingWebservice.h"
4 #include "Types.h"
5 #include "IWebLoadRequestFactory.h"
6 #include "Routes.h"
7 #include "RoutingQueryIdGenerator.h"
8 #include "Web.h"
9 #include "WebLoadRequestCompletionCallback.h"
10 #include "CallbackCollection.h"
11 #include <map>
12 
13 
14 namespace Eegeo
15 {
16  namespace Routes
17  {
18  namespace Webservice
19  {
21  {
22  public:
24  RoutingRequestBuilder& routingRequestBuilder,
25  Web::IWebLoadRequestFactory& webRequestFactory);
26 
28 
29  RoutingQueryId BeginRoutingQuery(const RoutingQueryOptions& options) override;
30  void CancelQuery(RoutingQueryId routingQueryId) override;
31 
32  void RegisterQueryCompletedCallback(RoutingQueryCompletedCallback& callback) override;
33  void UnregisterQueryCompletedCallback(RoutingQueryCompletedCallback& callback) override;
34 
35  private:
36 
37  void OnQueryComplete(Web::IWebResponse& webResponse);
38 
39  RoutingQueryId NextRoutingQueryId();
40 
41  RoutingRequestBuilder& m_routingRequestBuilder;
42  Web::IWebLoadRequestFactory& m_webRequestFactory;
44  RoutingQueryIdGenerator m_routingQueryIdGenerator;
45  std::map<RoutingQueryId, Web::IWebLoadRequest*> m_webRequests;
47  };
48  }
49  }
50 }