All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PropResourceWebLoader.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "BuildingFootprints.h"
7 #include "Web.h"
8 #include "WebLoadRequestCompletionCallback.h"
9 #include "ICallback.h"
10 #include "PendingWebRequestsContainer.h"
11 #include "InteriorRenderableFactory.h"
12 #include "InteriorsMaterials.h"
13 #include "PropResourceWebLoaderResult.h"
14 #include <string>
15 
16 
17 namespace Eegeo
18 {
19  namespace Resources
20  {
21  namespace Interiors
22  {
24  {
25  public:
27 
29  const std::string& propAssetBaseUrl,
30  Web::IWebLoadRequestFactory& webRequestFactory,
31  Builder::ChunkedPropBuilder& chunkedPropBuilder,
32  IInteriorsMaterialService& materialService,
33  Materials::IInteriorsMaterialDtoRepository& materialDtoRepository);
34 
35  void LoadPropResource(const std::string& relativeUrl, IPropResourceCallback& callback);
36 
37  private:
38  void WebMeshLoadCompletedHandler(Eegeo::Web::IWebResponse& webLoadResponse);
39 
40  static std::string GetTextureRootFromUrl(const std::string& url);
41 
42  const std::string m_propAssetBaseUrl;
43  Web::IWebLoadRequestFactory& m_webRequestFactory;
45  Web::PendingWebRequestsContainer m_pendingWebRequestsContainer;
46  Builder::ChunkedPropBuilder& m_chunkedPropBuilder;
47  IInteriorsMaterialService& m_materialService;
48  Materials::IInteriorsMaterialDtoRepository& m_materialDtoRepository;
49  };
50  }
51  }
52 }