All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CoverageTreeManifestBinaryLoader.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "CoverageTrees.h"
7 #include "Web.h"
8 #include "WebLoadRequestCompletionCallback.h"
9 #include "ICallback.h"
10 #include <string>
11 #include <vector>
12 #include "PendingWebRequestsContainer.h"
13 #include "ICoverageTreeManifestLoader.h"
14 #include "ConfigSections.h"
15 
16 namespace Eegeo
17 {
18  namespace Streaming
19  {
20  namespace BlockCoverageTrees
21  {
23  {
24  public:
25 
27  const Config::CoverageTreeConfigSection& coverageTreeConfig,
28  Streaming::CoverageTrees::CoverageTreeDownloadFailedHandler& coverageTreeDownloadFailedHandler,
29  Streaming::CoverageTrees::CoverageTreeManifestNotifier& coverageTreeManifestNotifier,
30  Streaming::CoverageTrees::ICoverageTreeResourceUpdater& coverageTreeResourceUpdater);
31 
32  void LoadCoverageTreeManifest(const std::string& url);
33 
34  bool IsStreaming() const { return m_pendingWebRequestsContainer.Size() > 0; }
35 
36  private:
37  void WebLoadCompletedHandler(Eegeo::Web::IWebResponse& webResponse);
38 
39  Web::IWebLoadRequestFactory& m_webRequestFactory;
40  const Config::CoverageTreeConfigSection m_coverageTreeConfig;
42 
43  Web::PendingWebRequestsContainer m_pendingWebRequestsContainer;
44 
45  Streaming::CoverageTrees::CoverageTreeDownloadFailedHandler& m_coverageTreeDownloadFailedHandler;
46  Streaming::CoverageTrees::CoverageTreeManifestNotifier& m_coverageTreeManifestNotifier;
47  Streaming::CoverageTrees::ICoverageTreeResourceUpdater& m_coverageTreeResourceUpdater;
48  };
49  }
50  }
51 }