All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
BuildingFootprintWebLoader.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 
6 #include "Types.h"
7 #include "BuildingFootprints.h"
8 #include "Web.h"
9 #include "WebLoadRequestCompletionCallback.h"
10 #include "BuildingFootprintWebLoaderResult.h"
11 #include "ICallback.h"
12 #include "PendingWebRequestsContainer.h"
13 #include <string>
14 #include <unordered_map>
15 
16 
17 namespace Eegeo
18 {
19  namespace BuildingFootprints
20  {
22  {
23  public:
25  using CancelHandle = Web::TWebRequestId;
26 
28 
29  CancelHandle LoadFootprintResource(const std::string& url, ICallback& callback);
30 
31  void CancelLoad(CancelHandle handle);
32 
33  private:
34  void WebLoadCompletedHandler(Eegeo::Web::IWebResponse& webLoadResponse);
35 
36  Web::IWebLoadRequestFactory& m_webRequestFactory;
38  Web::PendingWebRequestsContainer m_pendingWebRequestsContainer;
39  std::unordered_map<CancelHandle, Web::IWebLoadRequest*> m_pendingWebRequestsByCancelHandle;
40  };
41  }
42 }