All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
OSXPlatformAbstractionModule.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "IPlatformAbstractionModule.h"
7 #include "OSXUrlEncoder.h"
8 #include "OSXFileIO.h"
9 #include "Helpers.h"
10 #include "OSXTextureFileLoader.h"
11 #include "Web.h"
12 #include "Tasks.h"
13 #include "OSXGlTaskContextFactory.h"
14 #include "Rendering.h"
15 #include "IJpegLoader.h"
16 #include "Web.h"
17 #include "OSXConnectivityService.h"
18 #include "DefaultWorkPool.h"
19 #include "SceneBuilderModuleFactory.h"
20 #include "NativeTextureFactory.h"
21 #import <OpenGL/OpenGL.h>
22 #import <Cocoa/Cocoa.h>
23 
24 namespace Eegeo
25 {
26  namespace OSX
27  {
29  {
30  public:
32  NSOpenGLPixelFormat* pPixelFormat,
33  const std::string& resourcePath,
34  const std::string& apiKey,
35  const Unity::UnityCallbacks* pUnityCallbacks = NULL);
36 
38 
39  Helpers::ITextureFileLoader& GetTextureFileLoader() const;
40  Web::IWebLoadRequestFactory& GetWebLoadRequestFactory() const;
41  Web::IWebLoadRequestFactory& GetPlatformWebLoadRequestFactory() const { return *m_pPlatformWebLoadRequestFactory; }
42  Web::IWebProxySettings& GetProxySettings() const;
43  Web::ISSLSettings& GetSSLSettings() const;
44  Helpers::IHttpCache& GetHttpCache() const;
45  Helpers::IFileIO& GetFileIO() const;
46  Helpers::UrlHelpers::IUrlEncoder& GetUrlEncoder() const;
47  Eegeo::Web::IConnectivityService& GetConnectivityService() const;
48  Concurrency::Tasks::IWorkPool& GetWorkPool() const;
49  Modules::ISceneBuilderModuleFactory& GetSceneBuilderModuleFactory();
50  Rendering::AsyncTexturing::ITextureFactory& GetTextureFactory() const;
51 
52  void OnPause();
53  void Update();
54  void OnResume();
55 
56  private:
57  OSXUrlEncoder* m_pOSXUrlEncoder;
58  OSX::OSXFileIO* m_pOSXFileIO;
59  Helpers::IHttpCache* m_pOSXHttpCache;
60  Helpers::PNG::IPNGDecoder* m_pPNGDecoder;
61  Helpers::ITextureFileLoader* m_pOSXTextureFileLoader;
62  Web::WebModule* m_pWebModule;
63  Web::IWebLoadRequestFactory* m_pPlatformWebLoadRequestFactory;
64  OSX::OSXGlTaskContextFactory* m_pOSXGlTaskContextFactory;
65  OSX::OSXConnectivityService* m_pOSXConnectivityService;
67  Concurrency::IThreadService* m_pThreadService;
68  Modules::SceneBuilderModuleFactory m_sceneBuilderModuleFactory;
70  };
71  }
72 }
73