16 #ifndef ALEXA_CLIENT_SDK_SAMPLEAPP_INCLUDE_SAMPLEAPP_SAMPLEAPPLICATION_H_
17 #define ALEXA_CLIENT_SDK_SAMPLEAPP_INCLUDE_SAMPLEAPP_SAMPLEAPPLICATION_H_
23 #include <unordered_map>
54 #ifdef GSTREAMER_MEDIA_PLAYER
56 #elif defined(ANDROID_MEDIA_PLAYER)
60 #ifdef BLUETOOTH_BLUEZ_PULSEAUDIO_OVERRIDE_ENDPOINTS
80 static std::unique_ptr<SampleApplication>
create(
81 std::shared_ptr<alexaClientSDK::sampleApp::ConsoleReader> consoleReader,
82 const std::vector<std::string>& configFiles,
83 const std::string& logLevel =
"",
84 std::shared_ptr<avsCommon::sdkInterfaces::diagnostics::DiagnosticsInterface> diagnostics =
nullptr);
101 bool initiateRestart();
112 std::shared_ptr<alexaClientSDK::defaultClient::DefaultClient>
getDefaultClient();
122 const std::shared_ptr<avsCommon::sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface>&
123 httpContentFetcherFactory,
124 std::shared_ptr<defaultClient::EqualizerRuntimeSetup> equalizerRuntimeSetup);
139 const std::string& playerId,
157 const std::string& playerId,
173 std::shared_ptr<alexaClientSDK::sampleApp::ConsoleReader> consoleReader,
174 const std::vector<std::string>& configFiles,
175 const std::string& logLevel,
176 std::shared_ptr<avsCommon::sdkInterfaces::diagnostics::DiagnosticsInterface> diagnostics);
187 std::shared_ptr<avsCommon::sdkInterfaces::ApplicationMediaInterfaces> createApplicationMediaPlayer(
188 const std::shared_ptr<avsCommon::sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface>&
189 httpContentFetcherFactory,
190 bool enableEqualizer,
191 const std::string& name,
192 bool enableLiveMode =
false);
194 #ifdef ENABLE_ENDPOINT_CONTROLLERS
203 bool addControllersToDefaultEndpoint(
204 std::shared_ptr<avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface> defaultEndpointBuilder);
214 bool addControllersToPeripheralEndpoint(
215 std::shared_ptr<avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface> peripheralEndpointBuilder,
216 std::shared_ptr<avsCommon::sdkInterfaces::diagnostics::DiagnosticsInterface> diagnostics);
218 std::shared_ptr<acsdkShutdownManagerInterfaces::ShutdownManagerInterface> m_shutdownManager;
222 std::shared_ptr<avsCommon::avs::initialization::AlexaClientSDKInit> m_sdkInit;
225 std::shared_ptr<alexaClientSDK::defaultClient::DefaultClient> m_client;
228 std::shared_ptr<InteractionManager> m_interactionManager;
231 std::shared_ptr<UserInputManager> m_userInputManager;
234 std::shared_ptr<GuiRenderer> m_guiRenderer;
237 std::unordered_map<std::string, std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface>>
238 m_externalMusicProviderMediaPlayersMap;
241 std::unordered_map<std::string, std::shared_ptr<avsCommon::sdkInterfaces::SpeakerInterface>>
242 m_externalMusicProviderSpeakersMap;
245 std::vector<std::shared_ptr<avsCommon::utils::RequiresShutdown>> m_shutdownRequiredList;
248 std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface> m_speakMediaPlayer;
251 std::vector<std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface>> m_audioMediaPlayerPool;
254 std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface> m_alertsMediaPlayer;
257 std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface> m_notificationsMediaPlayer;
260 std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface> m_bluetoothMediaPlayer;
263 std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface> m_systemSoundMediaPlayer;
265 #ifdef ENABLE_COMMS_AUDIO_PROXY
266 std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface> m_commsMediaPlayer;
271 std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface> m_phoneMediaPlayer;
276 std::shared_ptr<alexaClientSDK::capabilitiesDelegate::CapabilitiesDelegate> m_capabilitiesDelegate;
279 std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface> m_ringtoneMediaPlayer;
282 static std::unordered_map<std::string, avsCommon::sdkInterfaces::ChannelVolumeInterface::Type>
283 m_playerToSpeakerTypeMap;
289 std::shared_ptr<acsdkKWDImplementations::AbstractKeywordDetector> m_keywordDetector;
293 #if defined(ANDROID_MEDIA_PLAYER) || defined(ANDROID_MICROPHONE)
294 std::shared_ptr<applicationUtilities::androidUtilities::AndroidSLESEngine> m_openSlEngine;
298 #ifdef BLUETOOTH_BLUEZ_PULSEAUDIO_OVERRIDE_ENDPOINTS
299 std::shared_ptr<bluetoothImplementations::blueZ::PulseAudioBluetoothInitializer> m_pulseAudioInitializer;
303 #ifdef POWER_CONTROLLER
304 std::shared_ptr<PeripheralEndpointPowerControllerHandler> m_peripheralEndpointPowerHandler;
308 #ifdef TOGGLE_CONTROLLER
309 std::shared_ptr<PeripheralEndpointToggleControllerHandler> m_peripheralEndpointToggleHandler;
313 #ifdef RANGE_CONTROLLER
314 std::shared_ptr<PeripheralEndpointRangeControllerHandler> m_peripheralEndpointRangeHandler;
318 #ifdef MODE_CONTROLLER
319 std::shared_ptr<PeripheralEndpointModeControllerHandler> m_peripheralEndpointModeHandler;
324 std::shared_ptr<acsdkAuthorization::AuthorizationManager> m_authManager;
328 std::shared_ptr<acsdkAuthorization::lwa::LWAAuthorizationAdapter> m_lwaAdapter;
335 #endif // ALEXA_CLIENT_SDK_SAMPLEAPP_INCLUDE_SAMPLEAPP_SAMPLEAPPLICATION_H_