SearchResultPoiModule::SearchResultPoiModule(Eegeo::Helpers::IIdentityProvider& identityProvider,
                                                         MyPins::SdkModel::IMyPinsService& myPinsService,
                                                         Search::SdkModel::MyPins::ISearchResultMyPinsService& searchResultMyPinsService,
                                                         TagSearch::ISearchResultIconKeyMapper& searchResultIconKeyMapper,
                                                         Eegeo::Web::IWebLoadRequestFactory& webRequestFactory,
                                                         ExampleAppMessaging::TMessageBus& messageBus)
            {
#ifdef EEGEO_WIN
                m_pSearchResultPoiViewModel = Eegeo_NEW(DesktopSearchResultPoiViewModel)(identityProvider.GetNextIdentity(),
                                                                                  reactionControllerModel);
#else
                m_pSearchResultPoiViewModel = Eegeo_NEW(SearchResultPoiViewModel)(identityProvider.GetNextIdentity());
#endif
                
                m_pSearchResultPoiMyPinService = Eegeo_NEW(SdkModel::SearchResultPoiMyPinService)(myPinsService,
                                                                                                  searchResultMyPinsService,
                                                                                                  searchResultIconKeyMapper);
                
                m_pSearchResultPoiPinToggledMessageHandler = Eegeo_NEW(SdkModel::SearchResultPoiPinToggledMessageHandler)(*m_pSearchResultPoiMyPinService,
                                                                                                                          messageBus);
                
                m_pSearchResultPoiViewImageFetcher = Eegeo_NEW(SdkModel::SearchResultPoiViewImageFetcher)(webRequestFactory,
                                                                                                          messageBus);
                
                m_pSearchResultPoiViewOpenedMessageHandler = Eegeo_NEW(SdkModel::SearchResultPoiViewOpenedMessageHandler)(*m_pSearchResultPoiViewImageFetcher,
                                                                                                                          messageBus);
            }
 SecondaryMenuModule::SecondaryMenuModule(Eegeo::Helpers::IIdentityProvider& identityProvider,
                                          Reaction::View::IReactionControllerModel& reactionControllerModel,
                                          Search::SdkModel::ISearchQueryPerformer& searchQueryPerformer,
                                          ExampleAppMessaging::TMessageBus& messageBus,
                                          AboutPage::View::IAboutPageViewModel& aboutPageViewModel,
                                          Options::View::IOptionsViewModel& optionsViewModel,
                                          Metrics::IMetricsService& metricsService)
 {
     m_pModel = Eegeo_NEW(Menu::View::MenuModel)();
     m_pMenuOptionsModel = Eegeo_NEW(Menu::View::MenuOptionsModel)(*m_pModel);
     
     m_pViewModel = Eegeo_NEW(Menu::View::MenuViewModel)(false,
                                                         identityProvider.GetNextIdentity(),
                                                         reactionControllerModel);
     
     AddMenuSection("Secondary", *m_pModel, false);
     
     m_pPerformedSearchMessageHandler = Eegeo_NEW(PerformedSearchMessageHandler)(searchQueryPerformer,
                                                                                 messageBus,
                                                                                 metricsService);
     
     
     m_pSettingsModel = Eegeo_NEW(Menu::View::MenuModel)();
     m_pSettingsMenuOptionsModel = Eegeo_NEW(Menu::View::MenuOptionsModel)(*m_pSettingsModel);
     m_pSettingsMenuOptionsModel->AddItem("About", "About", "", "misc", Eegeo_NEW(View::AboutPageMenuOption)(*m_pViewModel,aboutPageViewModel));
     m_pSettingsMenuOptionsModel->AddItem("Options", "Options", "", "options", Eegeo_NEW(View::OptionsMenuOption)(*m_pViewModel, optionsViewModel));
 }
     WatermarkModule::WatermarkModule(Eegeo::Helpers::IIdentityProvider& identityProvider,
                                      const std::string& appName,
                                      const std::string& googleAnalyticsReferrerToken,
                                      Eegeo::Resources::Interiors::InteriorSelectionModel& interiorSelectionModel,
                                      Eegeo::Resources::Interiors::InteriorsModelRepository& interiorsModelRepository,
                                      InteriorsExplorer::SdkModel::InteriorsExplorerModel& interiorsExplorerModel,
                                      ExampleAppMessaging::TMessageBus& messageBus)
     {
         m_pViewModel = Eegeo_NEW(View::WatermarkViewModel)(identityProvider.GetNextIdentity(), false);
         
         m_pWatermarkDataFactory = Eegeo_NEW(View::WatermarkDataFactory)(appName, googleAnalyticsReferrerToken);
         
         m_pWatermarkDataRepository = Eegeo_NEW(View::WatermarkDataRepository)();
         
         m_pWatermarkDataRepository->AddWatermarkData("eegeo", m_pWatermarkDataFactory->CreateDefaultEegeo());
 
         m_pWatermarkModel = Eegeo_NEW(WatermarkModel)();
         
         m_pWatermarkInteriorStateChangedObserver = Eegeo_NEW(WatermarkInteriorStateChangedObserver)(*m_pWatermarkModel,
                                                                                                     interiorSelectionModel,
                                                                                                     interiorsModelRepository,
                                                                                                     interiorsExplorerModel,
                                                                                                     messageBus);
         AddThirdPartyWatermarkData();
     }
            SearchResultMenuModule::SearchResultMenuModule(Search::SdkModel::ISearchResultRepository& searchResultRepository,
                    Search::SdkModel::ISearchQueryPerformer& searchQueryPerformer,
                    Eegeo::Helpers::IIdentityProvider& identityProvider,
                    CameraTransitions::SdkModel::ICameraTransitionController& cameraTransitionController,
                    Reaction::View::IReactionControllerModel& reactionControllerModel,
                    ExampleAppMessaging::TMessageBus& messageBus)
            {
                m_pModel = Eegeo_NEW(Menu::View::MenuModel)();

                m_pMenuOptionsModel = Eegeo_NEW(Menu::View::MenuOptionsModel)(*m_pModel);

                m_pViewModel = Eegeo_NEW(View::SearchResultMenuViewModel)(*m_pModel,
                               false,
                               identityProvider.GetNextIdentity(),
                               reactionControllerModel);

                m_pMenuSection = Eegeo_NEW(Menu::View::MenuSectionViewModel)("Search", "search", *m_pModel, false);
                m_pViewModel->AddSection(*m_pMenuSection);

                m_pSearchResultRepositoryObserver = Eegeo_NEW(View::SearchResultRepositoryObserver)(
                                                        searchResultRepository,
                                                        messageBus
                                                    );

                m_pSearchResultMenuItemSelectedMessageHandler = Eegeo_NEW(SearchResultMenuItemSelectedMessageHandler)(
                            cameraTransitionController,
                            messageBus
                        );

                m_pSearchResultAddRemoveHandler = Eegeo_NEW(View::SearchResultAddRemoveHandler)(
                                                      *m_pMenuOptionsModel,
                                                      *m_pViewModel,
                                                      messageBus
                                                  );

                m_pSearchResultMenuSearchQueryPerformedMessageHandler = Eegeo_NEW(View::SearchResultMenuSearchQueryPerformedMessageHandler)(
                            *m_pViewModel,
                            messageBus
                        );

                m_pSearchResultMenuSearchQueryRemovedMessageHandler = Eegeo_NEW(View::SearchResultMenuSearchQueryRemovedMessageHandler)(
                            *m_pViewModel,
                            messageBus
                        );

                m_pSearchResultViewClearedObserver = Eegeo_NEW(SearchResultViewClearedObserver)(searchQueryPerformer, messageBus);
            }
WorldPinsModule::WorldPinsModule(Eegeo::Pins::PinRepository& pinRepository,
                                 Eegeo::Pins::PinController& pinController,
                                 const Eegeo::Rendering::EnvironmentFlatteningService& environmentFlatteningService,
                                 Eegeo::Helpers::IIdentityProvider& identityProvider,
                                 ExampleAppMessaging::TMessageBus& messageBus,
                                 Eegeo::Resources::Interiors::InteriorsController& interiorsController)
    : m_interiorsController(interiorsController)
{
    m_pWorldPinsFactory = Eegeo_NEW(WorldPinsFactory);

    m_pWorldPinsRepository = Eegeo_NEW(WorldPinsRepository);

    m_pWorldPinsService = Eegeo_NEW(WorldPinsService)(*m_pWorldPinsRepository,
                          *m_pWorldPinsFactory,
                          pinRepository,
                          pinController,
                          environmentFlatteningService);

    m_pWorldPinsScaleController = Eegeo_NEW(WorldPinsScaleController)(*m_pWorldPinsRepository,
                                  *m_pWorldPinsService,
                                  messageBus,
                                  m_interiorsController);

    m_pWorldPinsInFocusViewModel = Eegeo_NEW(View::WorldPinInFocusViewModel)(identityProvider.GetNextIdentity(),
                                   *m_pWorldPinsService);

    m_pWorldPinsInFocusController = Eegeo_NEW(WorldPinsInFocusController)(*m_pWorldPinsRepository,
                                    *m_pWorldPinsService,
                                    messageBus);


    m_pWorldPinInFocusObserver = Eegeo_NEW(View::WorldPinInFocusObserver)(*m_pWorldPinsInFocusViewModel,
                                 messageBus);

    m_pWorldPinsModalityObserver = Eegeo_NEW(WorldPinsModalityObserver)(*m_pWorldPinsScaleController,
                                   messageBus);


}
Пример #6
0
 ToursModule::ToursModule(Eegeo::Helpers::IIdentityProvider& identityProvider,
                          Metrics::IMetricsService& metricsService,
                          ExampleAppMessaging::TMessageBus& messageBus,
                          WorldPins::SdkModel::IWorldPinsService& worldPinsService,
                          Search::SdkModel::ISearchRefreshService& searchRefreshService,
                          Menu::View::IMenuViewModel& searchMenuViewModel,
                          Menu::View::IMenuViewModel& settingsMenuViewModel,
                          ScreenControl::View::IScreenControlViewModel& watermarkViewModel,
                          Eegeo::Streaming::ResourceCeilingProvider& resourceCeilingProvider,
                          const Eegeo::Rendering::ScreenProperties& screenProperties,
                          Eegeo::Camera::GlobeCamera::GpsGlobeCameraController& gpsGlobeCameraController,
                          Eegeo::Resources::Terrain::Heights::TerrainHeightProvider& terrainHeightProvider,
                          ExampleAppMessaging::TSdkModelDomainEventBus& sdkDomainEventBus,
                          AppModes::SdkModel::IAppModeModel& appModeModel)
 {
     m_pToursCameraModule = Eegeo_NEW(SdkModel::Camera::TourCameraModule)(resourceCeilingProvider,
                                                                          screenProperties);
     
     
     m_pTourRepository = Eegeo_NEW(SdkModel::TourRepository);
     
     m_pTourService = Eegeo_NEW(SdkModel::TourService)(*m_pTourRepository,
                                                       m_pToursCameraModule->GetCameraTransitionController(),
                                                       metricsService,
                                                       searchRefreshService,
                                                       messageBus,
                                                       sdkDomainEventBus);
     
     m_pTourWorldPinSelectionHandlerFactory = Eegeo_NEW(SdkModel::TourWorldPinSelectionHandlerFactory)(*m_pTourService,
                                                                                                       appModeModel);
     
     m_pTourAddedObserver = Eegeo_NEW(SdkModel::TourAddedObserver)(*m_pTourRepository,
                                                                   worldPinsService,
                                                                   *m_pTourWorldPinSelectionHandlerFactory);
     
     m_pTourRemovedObserver = Eegeo_NEW(SdkModel::TourRemovedObserver)(*m_pTourRepository);
     
     m_pTourActiveStateChangedMessageHandler = Eegeo_NEW(SdkModel::TourActiveStateChangedMessageHandler)(*m_pTourService,
                                                                                                         messageBus);
     
     m_pActiveTourQuitSelectedMessageHandler = Eegeo_NEW(SdkModel::ActiveTourQuitSelectedMessageHandler)(*m_pTourService,
                                                                                                         messageBus);
     
     m_pTourChangeRequestMessageHandler = Eegeo_NEW(SdkModel::TourChangeRequestMessageHandler)(*m_pTourRepository,
                                                                                               *m_pTourService,
                                                                                               messageBus);
     
     m_pTourExplorerViewModel = Eegeo_NEW(View::TourExplorer::TourExplorerViewModel)(identityProvider.GetNextIdentity(), false);
     
     m_pTourExplorerCompositeViewController = Eegeo_NEW(View::TourExplorer::TourExplorerCompositeViewController)(*m_pTourExplorerViewModel,
                                                                                                                 searchMenuViewModel,
                                                                                                                 settingsMenuViewModel,
                                                                                                                 watermarkViewModel);
     
     m_pTourSelectedViewObserver = Eegeo_NEW(View::TourExplorer::TourSelectedViewObserver)(*m_pTourExplorerCompositeViewController,
                                                                                           messageBus);
     
     
     m_pTourFullScreenImageViewModel = Eegeo_NEW(View::TourFullScreenImage::TourFullScreenImageViewModel)();
     
     m_pTourFullScreenImageCeremonyBeganObserver = Eegeo_NEW(View::TourFullScreenImage::TourFullScreenImageCeremonyBeganObserver)(*m_pTourFullScreenImageViewModel,
                                                                                                                                  messageBus);
     
     m_pTourFullScreenImageCeremonyEndedObserver = Eegeo_NEW(View::TourFullScreenImage::TourFullScreenImageCeremonyEndedObserver)(*m_pTourFullScreenImageViewModel,
                                                                                                                                  messageBus);
 }
 AboutPageModule::AboutPageModule(Eegeo::Helpers::IIdentityProvider& identityProvider,
                                  Reaction::View::IReactionControllerModel& reactionControllerModel)
 {
     std::string platformRuntimeArchitecture = (sizeof(void*) == 4) ? "32-bit" : "64-bit";
     m_pAboutPageViewModel = Eegeo_NEW(AboutPageViewModel)(identityProvider.GetNextIdentity(), reactionControllerModel, EEGEO_PLATFORM_VERSION_NUMBER, EEGEO_PLATFORM_VERSION_HASH, platformRuntimeArchitecture, AboutPageText);
 }