All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WindowsPlatformAbstractionModule.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include <string>
6 #include <set>
7 
8 #include "Types.h"
9 #include "IPlatformAbstractionModule.h"
10 #include "Cache.h"
11 #include "WindowsUrlEncoder.h"
12 #include "WindowsFileIO.h"
13 #include "WindowsGlTaskContextFactory.h"
14 #include "Web.h"
15 #include "WindowsTextureFileLoader.h"
16 #include "WindowsCacheFileIO.h"
17 #include "WindowsConnectivityService.h"
18 #include "WindowsConnectivityTimer.h"
19 #include "Rendering.h"
20 #include "IWorkPool.h"
21 #include "Web.h"
22 #include "DefaultWorkPool.h"
23 #include "SceneBuilderModuleFactory.h"
24 #include "Concurrency.h"
25 #include "IPNGDecoder.h"
26 
27 namespace Eegeo
28 {
29  namespace Unity
30  {
31  struct UnityCallbacks;
32  }
33 
34  namespace Windows
35  {
37  {
38  public:
40  Helpers::Jpeg::IJpegLoader& jpegLoader,
41  EGLDisplay& display,
42  EGLContext& context,
43  EGLSurface& surface,
44  const std::string& apiKey,
45  const Unity::UnityCallbacks* pUnityCallbacks = nullptr);
46 
48 
49  Helpers::ITextureFileLoader& GetTextureFileLoader() const;
50  Web::IWebLoadRequestFactory& GetWebLoadRequestFactory() const;
51  Web::IWebLoadRequestFactory& GetPlatformWebLoadRequestFactory() const;
52  Web::IWebProxySettings& GetProxySettings() const;
53  Web::ISSLSettings& GetSSLSettings() const;
54  Helpers::IHttpCache& GetHttpCache() const;
55  Helpers::IFileIO& GetFileIO() const;
56  Helpers::UrlHelpers::IUrlEncoder& GetUrlEncoder() const;
57  Eegeo::Web::IConnectivityService& GetConnectivityService() const;
58  Concurrency::Tasks::IWorkPool& GetWorkPool() const;
59 
60  void OnPause();
61  void OnResume();
62  void Update();
63 
64  Windows::WindowsUrlEncoder& GetWindowsUrlEncoder() const;
65  Web::IWebLoadRequestFactory& GetWindowsWebLoadRequestFactory() const;
66  Web::Cache::HttpCache& GetWindowsHttpCache() const;
67  Windows::WindowsFileIO& GetWindowsFileIO() const;
68  Windows::WindowsTextureFileLoader& GetWindowsTextureFileLoader() const;
69  Windows::WindowsGlTaskContextFactory& GetWindowsGlTaskContextFactory() const;
70  Windows::WindowsCacheFileIO& GetWindowsCacheFileIO() const;
71 
72  Web::WebRequestService& GetWebRequestService() const;
73 
74  void UpdateSurface(EGLSurface& surface);
75  void ReloadHttpCacheRepresentationFromStorage();
76 
77  Modules::ISceneBuilderModuleFactory& GetSceneBuilderModuleFactory() override;
78  Rendering::AsyncTexturing::ITextureFactory& GetTextureFactory() const override
79  {
80  return *m_pTextureFactory;
81  }
82 
83  private:
84  Windows::WindowsUrlEncoder* m_pWindowsUrlEncoder;
85  Web::WebModule* m_pWebModule;
86  Web::Cache::HttpCache* m_pWindowsHttpCache;
87  Windows::WindowsFileIO* m_pWindowsFileIO;
88  ITextureFileLoader* m_pTextureFileLoader;
89  Windows::WindowsGlTaskContextFactory* m_pWindowsGlTaskContextFactory;
90  Web::IWebLoadRequestFactory* m_pPlatformWebLoadRequestFactory;
91  Windows::WindowsConnectivityService* m_pWindowsConnectivityService;
92  Windows::WindowsConnectivityTimer* m_pWindowsConnectivityTimer;
93  Modules::SceneBuilderModuleFactory* m_pSceneBuilderModuleFactory;
94  Concurrency::IThreadService* m_pThreadService;
95  Helpers::PNG::IPNGDecoder* m_pPNGDecoder;
96  Web::IProxyAutoConfigRunner* m_pPacRunner;
97 
98  Windows::WindowsCacheFileIO* m_pWindowsCacheFileIO;
101  };
102  }
103 }